diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-04-19 15:33:00 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-04-19 15:33:00 +0200 |
commit | cf9435aec77f0a51794b7c096426809369c14632 (patch) | |
tree | ec2331f951e3e3a53801ef1f9d288a7e4dcb359f | |
parent | 21ec259db088e4fc3a57c83fd3e6f04b8c6741ce (diff) |
dump EmrPolybezierto16
-rw-r--r-- | msodumper/emfrecord.py | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/msodumper/emfrecord.py b/msodumper/emfrecord.py index 3e2573c..0d2dc3d 100644 --- a/msodumper/emfrecord.py +++ b/msodumper/emfrecord.py @@ -354,6 +354,24 @@ class EmrPolypolygon16(EMFRecord): assert self.pos - posOrig == self.Size +class EmrPolybezierto16(EMFRecord): + """Draws one or more Bezier curves based on 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 EmrMovetoex(EMFRecord): """Specifies the coordinates of a new drawing position, in logical units.""" @@ -600,7 +618,7 @@ RecordType = { 0x00000055: ['EMR_POLYBEZIER16'], 0x00000056: ['EMR_POLYGON16', EmrPolygon16], 0x00000057: ['EMR_POLYLINE16'], - 0x00000058: ['EMR_POLYBEZIERTO16'], + 0x00000058: ['EMR_POLYBEZIERTO16', EmrPolybezierto16], 0x00000059: ['EMR_POLYLINETO16'], 0x0000005A: ['EMR_POLYPOLYLINE16'], 0x0000005B: ['EMR_POLYPOLYGON16', EmrPolypolygon16], |