summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-04-19 15:37:51 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-04-19 15:37:51 +0200
commit94b172649c072c3fc4e0314338beae5cb2ddb12c (patch)
treeb576ae501c360badd3b4c7d84897afaf816a6504
parent6cbd11816c0980f21f69967e0fcd8a998219c079 (diff)
dump EmrPolylineto16
-rw-r--r--msodumper/emfrecord.py20
1 files changed, 19 insertions, 1 deletions
diff --git a/msodumper/emfrecord.py b/msodumper/emfrecord.py
index 32d8b43..37e353c 100644
--- a/msodumper/emfrecord.py
+++ b/msodumper/emfrecord.py
@@ -354,6 +354,24 @@ class EmrPolypolygon16(EMFRecord):
assert self.pos - posOrig == self.Size
+class EmrPolylineto16(EMFRecord):
+ """Draws one or more straight lines based upon the current position."""
+ 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.RectL(self, "Bounds").dump()
+ self.printAndSet("Count", self.readuInt32(), hexdump=False)
+ print '<aPoints>'
+ for i in range(self.Count):
+ wmfrecord.PointS(self, "aPoint").dump()
+ print '</aPoints>'
+ assert self.pos - posOrig == self.Size
+
+
class EmrPolybezierto16(EMFRecord):
"""Draws one or more Bezier curves based on the current position."""
def __init__(self, parent):
@@ -633,7 +651,7 @@ RecordType = {
0x00000056: ['EMR_POLYGON16', EmrPolygon16],
0x00000057: ['EMR_POLYLINE16'],
0x00000058: ['EMR_POLYBEZIERTO16', EmrPolybezierto16],
- 0x00000059: ['EMR_POLYLINETO16'],
+ 0x00000059: ['EMR_POLYLINETO16', EmrPolylineto16],
0x0000005A: ['EMR_POLYPOLYLINE16'],
0x0000005B: ['EMR_POLYPOLYGON16', EmrPolypolygon16],
0x0000005C: ['EMR_POLYDRAW16'],