summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-04-19 15:35:25 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-04-19 15:35:25 +0200
commit6cbd11816c0980f21f69967e0fcd8a998219c079 (patch)
tree9ef9f88b67533e608dbe5c813ccfeff7fcc75ebf
parentcf9435aec77f0a51794b7c096426809369c14632 (diff)
dump EmrLineto
-rw-r--r--msodumper/emfrecord.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/msodumper/emfrecord.py b/msodumper/emfrecord.py
index 0d2dc3d..32d8b43 100644
--- a/msodumper/emfrecord.py
+++ b/msodumper/emfrecord.py
@@ -386,6 +386,20 @@ class EmrMovetoex(EMFRecord):
assert self.pos - posOrig == self.Size
+class EmrLineto(EMFRecord):
+ """Draws a line from the current position up to, but not including, the
+ specified point."""
+ def __init__(self, parent):
+ EMFRecord.__init__(self, parent)
+
+ def dump(self):
+ posOrig = self.pos
+ self.printAndSet("Type", self.readuInt32())
+ self.printAndSet("Size", self.readuInt32(), hexdump=False)
+ wmfrecord.PointL(self, "Point").dump()
+ assert self.pos - posOrig == self.Size
+
+
class EmrSelectclippath(EMFRecord):
"""Specifies the current path as a clipping region for the playback device
context, combining the new region with any existing clipping region using
@@ -585,7 +599,7 @@ RecordType = {
0x00000033: ['EMR_RESIZEPALETTE'],
0x00000034: ['EMR_REALIZEPALETTE'],
0x00000035: ['EMR_EXTFLOODFILL'],
- 0x00000036: ['EMR_LINETO'],
+ 0x00000036: ['EMR_LINETO', EmrLineto],
0x00000037: ['EMR_ARCTO'],
0x00000038: ['EMR_POLYDRAW'],
0x00000039: ['EMR_SETARCDIRECTION'],