| 84 | | #def MoveTo(self, relative, x, y): |
|---|
| 85 | | # raise NotImplementedError |
|---|
| 86 | | #def ClosePath(self, relative): |
|---|
| 87 | | # raise NotImplementedError |
|---|
| 88 | | #def LineTo(self, relative, x, y): |
|---|
| 89 | | # raise NotImplementedError |
|---|
| 90 | | #def HLineTo(self, relative, x): |
|---|
| 91 | | # raise NotImplementedError |
|---|
| 92 | | #def VLineTo(self, relative, y): |
|---|
| 93 | | # raise NotImplementedError |
|---|
| 94 | | #def CubicBezierTo(self, relative, x1, y1, x2, y2, x, y): |
|---|
| 95 | | # raise NotImplementedError |
|---|
| 96 | | #def SmoothCurveTo(self, relative, x2, y2, x, y): |
|---|
| 97 | | # raise NotImplementedError |
|---|
| 98 | | #def QuadraticBezierTo(self, relative, x1, y1, x, y): |
|---|
| 99 | | # raise NotImplementedError |
|---|
| 100 | | #def SmoothQuadraticBezierTo(self, relative, x, y): |
|---|
| 101 | | # raise NotImplementedError |
|---|
| 102 | | #def EllipticArcTo(self, relative, rx, ry, xrotation, largeArcFlag, sweepFlag, x, y): |
|---|
| | 83 | #def move(self, relative, x, y): |
|---|
| | 84 | # raise NotImplementedError |
|---|
| | 85 | #def closepath(self, relative): |
|---|
| | 86 | # raise NotImplementedError |
|---|
| | 87 | #def line(self, relative, x, y): |
|---|
| | 88 | # raise NotImplementedError |
|---|
| | 89 | #def hline(self, relative, x): |
|---|
| | 90 | # raise NotImplementedError |
|---|
| | 91 | #def vline(self, relative, y): |
|---|
| | 92 | # raise NotImplementedError |
|---|
| | 93 | #def cubicbezier(self, relative, x1, y1, x2, y2, x, y): |
|---|
| | 94 | # raise NotImplementedError |
|---|
| | 95 | #def smoothcurve(self, relative, x2, y2, x, y): |
|---|
| | 96 | # raise NotImplementedError |
|---|
| | 97 | #def quadraticbezier(self, relative, x1, y1, x, y): |
|---|
| | 98 | # raise NotImplementedError |
|---|
| | 99 | #def smoothquadraticbezier(self, relative, x, y): |
|---|
| | 100 | # raise NotImplementedError |
|---|
| | 101 | #def ellipticarc(self, relative, rx, ry, xrotation, largeArcFlag, sweepFlag, x, y): |
|---|
| 141 | | 'M': _pathcommand('MoveTo', False, 'L', (_coord, _coord)), |
|---|
| 142 | | 'm': _pathcommand('MoveTo', True, 'l', (_coord, _coord)), |
|---|
| 143 | | |
|---|
| 144 | | 'Z': _pathcommand('ClosePath', False, 'M', ()), |
|---|
| 145 | | 'z': _pathcommand('ClosePath', True, 'm', ()), |
|---|
| 146 | | |
|---|
| 147 | | 'L': _pathcommand('LineTo', False, None, (_coord, _coord)), |
|---|
| 148 | | 'l': _pathcommand('LineTo', True, None, (_coord, _coord)), |
|---|
| 149 | | |
|---|
| 150 | | 'H': _pathcommand('HLineTo', False, None, (_coord, )), |
|---|
| 151 | | 'h': _pathcommand('HLineTo', True, None, (_coord, )), |
|---|
| 152 | | |
|---|
| 153 | | 'V': _pathcommand('VLineTo', False, None, (_coord, )), |
|---|
| 154 | | 'v': _pathcommand('VLineTo', True, None, (_coord, )), |
|---|
| 155 | | |
|---|
| 156 | | 'C': _pathcommand('CubicBezierTo', False, None, (_coord, _coord, _coord, _coord, _coord, _coord)), |
|---|
| 157 | | 'c': _pathcommand('CubicBezierTo', True, None, (_coord, _coord, _coord, _coord, _coord, _coord)), |
|---|
| 158 | | |
|---|
| 159 | | 'S': _pathcommand('SmoothCurveTo', False, None, (_coord, _coord, _coord, _coord)), |
|---|
| 160 | | 's': _pathcommand('SmoothCurveTo', True, None, (_coord, _coord, _coord, _coord)), |
|---|
| 161 | | |
|---|
| 162 | | 'Q': _pathcommand('QuadraticBezierTo', False, None, (_coord, _coord, _coord, _coord)), |
|---|
| 163 | | 'q': _pathcommand('QuadraticBezierTo', True, None, (_coord, _coord, _coord, _coord)), |
|---|
| 164 | | |
|---|
| 165 | | 'T': _pathcommand('SmoothQuadraticBezierTo', False, None, (_coord, _coord)), |
|---|
| 166 | | 't': _pathcommand('SmoothQuadraticBezierTo', True, None, (_coord, _coord)), |
|---|
| 167 | | |
|---|
| 168 | | 'A': _pathcommand('EllipticArcTo', False, None, (_coord, _coord, _rotation, _flag, _flag, _coord, _coord)), |
|---|
| 169 | | 'a': _pathcommand('EllipticArcTo', True, None, (_coord, _coord, _rotation, _flag, _flag, _coord, _coord)), |
|---|
| | 140 | 'M': _pathcommand('move', False, 'L', (_coord, _coord)), |
|---|
| | 141 | 'm': _pathcommand('move', True, 'l', (_coord, _coord)), |
|---|
| | 142 | |
|---|
| | 143 | 'Z': _pathcommand('closepath', False, 'M', ()), |
|---|
| | 144 | 'z': _pathcommand('closepath', True, 'm', ()), |
|---|
| | 145 | |
|---|
| | 146 | 'L': _pathcommand('line', False, None, (_coord, _coord)), |
|---|
| | 147 | 'l': _pathcommand('line', True, None, (_coord, _coord)), |
|---|
| | 148 | |
|---|
| | 149 | 'H': _pathcommand('hline', False, None, (_coord, )), |
|---|
| | 150 | 'h': _pathcommand('hline', True, None, (_coord, )), |
|---|
| | 151 | |
|---|
| | 152 | 'V': _pathcommand('vline', False, None, (_coord, )), |
|---|
| | 153 | 'v': _pathcommand('vline', True, None, (_coord, )), |
|---|
| | 154 | |
|---|
| | 155 | 'C': _pathcommand('cubicbezier', False, None, (_coord, _coord, _coord, _coord, _coord, _coord)), |
|---|
| | 156 | 'c': _pathcommand('cubicbezier', True, None, (_coord, _coord, _coord, _coord, _coord, _coord)), |
|---|
| | 157 | |
|---|
| | 158 | 'S': _pathcommand('smoothcurve', False, None, (_coord, _coord, _coord, _coord)), |
|---|
| | 159 | 's': _pathcommand('smoothcurve', True, None, (_coord, _coord, _coord, _coord)), |
|---|
| | 160 | |
|---|
| | 161 | 'Q': _pathcommand('quadraticbezier', False, None, (_coord, _coord, _coord, _coord)), |
|---|
| | 162 | 'q': _pathcommand('quadraticbezier', True, None, (_coord, _coord, _coord, _coord)), |
|---|
| | 163 | |
|---|
| | 164 | 'T': _pathcommand('smoothquadraticbezier', False, None, (_coord, _coord)), |
|---|
| | 165 | 't': _pathcommand('smoothquadraticbezier', True, None, (_coord, _coord)), |
|---|
| | 166 | |
|---|
| | 167 | 'A': _pathcommand('ellipticarc', False, None, (_coord, _coord, _rotation, _flag, _flag, _coord, _coord)), |
|---|
| | 168 | 'a': _pathcommand('ellipticarc', True, None, (_coord, _coord, _rotation, _flag, _flag, _coord, _coord)), |
|---|
| 232 | | return "EndPath" |
|---|
| 233 | | |
|---|
| 234 | | def MoveTo(self, relative, x, y): |
|---|
| 235 | | return "MoveTo", (relative, x, y) |
|---|
| 236 | | def ClosePath(self, relative): |
|---|
| 237 | | return "ClosePath", (relative,) |
|---|
| 238 | | def LineTo(self, relative, x, y): |
|---|
| 239 | | return "LineTo", (relative, x, y) |
|---|
| 240 | | def HLineTo(self, relative, x): |
|---|
| 241 | | return "HLineTo", (relative, x) |
|---|
| 242 | | def VLineTo(self, relative, y): |
|---|
| 243 | | return "VLineTo", (relative, y) |
|---|
| 244 | | def CubicBezierTo(self, relative, x1, y1, x2, y2, x, y): |
|---|
| 245 | | return "CubicBezierTo", (relative, x1, y1, x2, y2, x, y) |
|---|
| 246 | | def SmoothCurveTo(self, relative, x2, y2, x, y): |
|---|
| 247 | | return "SmoothCurveTo", (relative, x2, y2, x, y) |
|---|
| 248 | | def QuadraticBezierTo(self, relative, x1, y1, x, y): |
|---|
| 249 | | return "QuadraticBezierTo", (relative, x1, y1, x, y) |
|---|
| 250 | | def SmoothQuadraticBezierTo(self, relative, x, y): |
|---|
| 251 | | return "SmoothQuadraticBezierTo", (relative, x, y) |
|---|
| 252 | | def EllipticArcTo(self, relative, rx, ry, xrotation, largeArcFlag, sweepFlag, x, y): |
|---|
| 253 | | return "EllipticArcTo", (relative, rx, ry, xrotation, largeArcFlag, sweepFlag, x, y) |
|---|
| 254 | | |
|---|
| 255 | | from pprint import pprint |
|---|
| | 231 | self.results.append("end()") |
|---|
| | 232 | |
|---|
| | 233 | separator = '\n ' |
|---|