/external/fonttools/Tests/pens/ |
D | perimeterPen_test.py | 4 def draw1_(pen): argument 5 pen.moveTo( (254, 360) ) 6 pen.lineTo( (771, 367) ) 7 pen.curveTo( (800, 393), (808, 399), (819, 412) ) 8 pen.curveTo( (818, 388), (774, 138), (489, 145) ) 9 pen.curveTo( (188, 145), (200, 398), (200, 421) ) 10 pen.curveTo( (209, 409), (220, 394), (254, 360) ) 11 pen.closePath() 13 def draw2_(pen): argument 14 pen.moveTo( (254, 360) ) [all …]
|
D | areaPen_test.py | 6 def draw1_(pen): argument 7 pen.moveTo( (254, 360) ) 8 pen.lineTo( (771, 367) ) 9 pen.curveTo( (800, 393), (808, 399), (819, 412) ) 10 pen.curveTo( (818, 388), (774, 138), (489, 145) ) 11 pen.curveTo( (188, 145), (200, 398), (200, 421) ) 12 pen.curveTo( (209, 409), (220, 394), (254, 360) ) 13 pen.closePath() 15 def draw2_(pen): argument 16 pen.moveTo( (254, 360) ) [all …]
|
D | ttGlyphPen_test.py | 21 pen = TTGlyphPen(font.getGlyphSet()) 25 oldGlyph.draw(pen) 27 newGlyph = pen.glyph() 42 pen = TTGlyphPen(None) 43 pen.moveTo((0, 0)) 45 pen.moveTo((1, 0)) 48 pen = TTGlyphPen(None) 49 pen.moveTo((0, 0)) 50 pen.closePath() 51 self.assertFalse(pen.points) [all …]
|
D | t2CharStringPen_test.py | 20 pen = T2CharStringPen(100, {}) 21 pen.moveTo((0, 0)) 22 pen.lineTo((10, 0)) 23 pen.lineTo((10, 10)) 24 pen.lineTo((0, 10)) 25 pen.closePath() # no-op 26 pen.moveTo((10, 10)) 27 pen.lineTo((10, 20)) 28 pen.lineTo((0, 20)) 29 pen.lineTo((0, 10)) [all …]
|
D | pointInsidePen_test.py | 8 def draw_triangles(pen): argument 9 pen.moveTo((0,0)); pen.lineTo((10,5)); pen.lineTo((10,0)) 10 pen.moveTo((9,1)); pen.lineTo((4,1)); pen.lineTo((9,4)) 11 pen.closePath() 30 def draw_curves(pen): argument 31 pen.moveTo((0,0)); pen.curveTo((9,1), (9,4), (0,5)) 32 pen.moveTo((10,5)); pen.curveTo((1,4), (1,1), (10,0)) 33 pen.closePath() 52 def draw_qCurves(pen): argument 53 pen.moveTo((0,0)); pen.qCurveTo((15,2), (0,5)) [all …]
|
D | pointPen_test.py | 94 pen = _TestSegmentPen() 95 ppen = PointToSegmentPen(pen) 100 self.assertEqual("10 10 moveto 10 20 lineto endpath", repr(pen)) 103 pen = _TestSegmentPen() 104 ppen = PointToSegmentPen(pen) 110 self.assertEqual("10 10 moveto 10 20 lineto 20 20 lineto closepath", repr(pen)) 113 pen = _TestSegmentPen() 114 ppen = PointToSegmentPen(pen) 121 self.assertEqual("10 10 moveto 10 20 20 20 20 40 curveto closepath", repr(pen)) 124 pen = _TestSegmentPen() [all …]
|
D | basePen_test.py | 39 def draw(self, pen): argument 40 pen.moveTo((0.0, 0.0)) 41 pen.lineTo((0.0, 100.0)) 42 pen.curveTo((50.0, 75.0), (60.0, 50.0), (50.0, 25.0), (0.0, 0.0)) 43 pen.closePath() 48 pen = _TestPen() 49 pen.moveTo((0.5, -4.3)) 50 self.assertEqual("0.5 -4.3 moveto", repr(pen)) 51 self.assertEqual((0.5, -4.3), pen.getCurrentPoint()) 54 pen = _TestPen() [all …]
|
D | hashPointPen_test.py | 9 def drawPoints(self, pen): argument 10 pen.beginPath(identifier="abc") 11 pen.addPoint((0.0, 0.0), "line", False, "start", identifier="0000") 12 pen.addPoint((10, 110), "line", False, None, identifier="0001") 13 pen.addPoint((50.0, 75.0), None, False, None, identifier="0002") 14 pen.addPoint((60.0, 50.0), None, False, None, identifier="0003") 15 pen.addPoint((50.0, 0.0), "curve", True, "last", identifier="0004") 16 pen.endPath() 20 def drawPoints(self, pen): argument 21 pen.beginPath(identifier="abc") [all …]
|
D | boundsPen_test.py | 5 def draw_(pen): argument 6 pen.moveTo((0, 0)) 7 pen.lineTo((0, 100)) 8 pen.qCurveTo((50, 75), (60, 50), (50, 25), (0, 0)) 9 pen.curveTo((-50, 25), (-60, 50), (-50, 75), (0, 100)) 10 pen.closePath() 13 def bounds_(pen): argument 14 return " ".join(["%.0f" % c for c in pen.bounds]) 19 pen = BoundsPen(None) 20 draw_(pen) [all …]
|
D | recordingPen_test.py | 10 def draw(self, pen): argument 11 pen.moveTo((0.0, 0.0)) 12 pen.lineTo((0.0, 100.0)) 13 pen.curveTo((50.0, 75.0), (60.0, 50.0), (50.0, 0.0)) 14 pen.closePath() 16 def drawPoints(self, pen): argument 17 pen.beginPath(identifier="abc") 18 pen.addPoint((0.0, 0.0), "line", False, "start", identifier="0000") 19 pen.addPoint((0.0, 100.0), "line", False, None, identifier="0001") 20 pen.addPoint((50.0, 75.0), None, False, None, identifier="0002") [all …]
|
D | cu2quPen_test.py | 47 pen = getattr(converted, self.pen_getter_name)() 48 quadpen = self.Cu2QuPen(pen, MAX_ERR, **kwargs) 95 pen = self.Pen() 96 quadpen = self.Cu2QuPen(pen, MAX_ERR) 100 self.assertEqual(str(pen).splitlines(), [ 161 pen = DummyPen() 162 quadpen = Cu2QuPen(pen, MAX_ERR) 166 self.assertEqual(str(pen).splitlines(), [ 172 pen = DummyPen() 173 quadpen = Cu2QuPen(pen, MAX_ERR) [all …]
|
D | cocoaPen_test.py | 21 def draw(pen): argument 22 pen.moveTo((50, 0)) 23 pen.lineTo((50, 500)) 24 pen.lineTo((200, 500)) 25 pen.curveTo((350, 500), (450, 400), (450, 250)) 26 pen.curveTo((450, 100), (350, 0), (200, 0)) 27 pen.closePath() 44 pen = CocoaPen(None) 45 draw(pen) 48 cocoaPathToString(pen.path) [all …]
|
D | quartzPen_test.py | 27 def draw(pen): argument 28 pen.moveTo((50, 0)) 29 pen.lineTo((50, 500)) 30 pen.lineTo((200, 500)) 31 pen.curveTo((350, 500), (450, 400), (450, 250)) 32 pen.curveTo((450, 100), (350, 0), (200, 0)) 33 pen.closePath() 64 pen = QuartzPen(None) 65 draw(pen) 68 quartzPathToString(pen.path) [all …]
|
/external/fonttools/Lib/fontTools/pens/ |
D | teePen.py | 18 for pen in self.pens: 19 pen.moveTo(p0) 21 for pen in self.pens: 22 pen.lineTo(p1) 24 for pen in self.pens: 25 pen.qCurveTo(*points) 27 for pen in self.pens: 28 pen.curveTo(*points) 30 for pen in self.pens: 31 pen.closePath() [all …]
|
D | pointPen.py | 168 self.pen = segmentPen 173 pen = self.pen 193 pen.moveTo(movePt) 218 pen.lineTo(pt) 221 pen.curveTo(*points) 224 pen.qCurveTo(*points) 229 pen.closePath() 231 pen.endPath() 235 self.pen.addComponent(glyphName, transform) 246 self.pen = GuessSmoothPointPen(pointPen) [all …]
|
D | cu2quPen.py | 44 self.pen = ReverseContourPen(other_pen) 46 self.pen = other_pen 68 self.pen.moveTo(self.start_pt) 80 self.pen.lineTo(pt) 90 self.pen.qCurveTo(*points) 123 self.pen.closePath() 129 self.pen.endPath() 134 self.pen.addComponent(glyphName, transformation) 153 self.pen = ReverseContourPointPen(other_point_pen) 155 self.pen = other_point_pen [all …]
|
D | recordingPen.py | 14 def replayRecording(recording, pen): argument 23 getattr(pen, operator)(*operands) 65 def replay(self, pen): argument 66 replayRecording(self.value, pen) 143 pen = RecordingPen() variable 144 pen.moveTo((0, 0)) 145 pen.lineTo((0, 100)) 146 pen.curveTo((50, 75), (60, 50), (50, 25)) 147 pen.closePath() 149 pprint(pen.value)
|
/external/fonttools/Tests/svgLib/path/ |
D | parser_test.py | 229 pen = RecordingPen() 230 parse_path(pathdef, pen) 232 assert pen.value == expected 273 pen = RecordingPen() 274 parse_path("M-3.4e38 3.4E+38L-3.4E-38,3.4e-38", pen) 281 assert pen.value == expected 291 pen = RecordingPen() 292 parse_path("M300,200 h-150 a150,150 0 1,0 150,-150 z", pen) 324 result = list(pen.value) 343 pen = ArcRecordingPen() [all …]
|
D | path_test.py | 40 pen = RecordingPen() 45 svg.draw(pen) 49 assert pen.value == EXPECTED_PEN_COMMANDS 52 pen = RecordingPen() 54 svg.draw(pen) 56 assert pen.value == EXPECTED_PEN_COMMANDS 59 pen = RecordingPen() 62 svg.draw(pen) 64 assert pen.value == [
|
/external/fonttools/Tests/cu2qu/ |
D | ufo_test.py | 183 pen = glyph.getPen() 185 getattr(pen, operator)(*args) 221 pen = glyph.getPen() 222 pen.moveTo((0, 0)) 223 pen.qCurveTo((1, 1), (2, 2)) 224 pen.closePath() 229 pen = glyph.getPen() 230 pen.moveTo((0, 0)) 231 pen.lineTo((1, 1)) 232 pen.curveTo((2, 2), (3, 3), (4, 4)) [all …]
|
/external/fonttools/Tests/fontBuilder/ |
D | fontBuilder_test.py | 29 def drawTestGlyph(pen): argument 30 pen.moveTo((100, 100)) 31 pen.lineTo((100, 1000)) 32 pen.qCurveTo((200, 900), (400, 900), (500, 1000)) 33 pen.lineTo((500, 100)) 34 pen.closePath() 71 pen = T2CharStringPen(None, None, CFF2=True) 72 drawTestGlyph(pen) 73 charString = pen.getCharString() 104 pen = TTGlyphPen(None) [all …]
|
/external/fonttools/Tests/ttLib/tables/ |
D | _g_l_y_f_test.py | 260 pen = TTGlyphPen(glyphSet) 261 pen.addComponent("dummy", (1, 0, 0, 1, 0, 0)) 262 composite = pen.glyph() 299 pen = RecordingPen() 300 glyfTable["glyph00003"].draw(pen, glyfTable=glyfTable) 314 self.assertEqual(pen.value, expected) 323 pen = RecordingPointPen() 324 glyfTable["glyph00003"].drawPoints(pen, glyfTable=glyfTable) 332 self.assertEqual(pen.value[:len(expected)], expected) 371 pen = TTGlyphPen(glyphSet) [all …]
|
/external/python/cpython3/Lib/turtledemo/ |
D | forest.py | 65 def doit1(level, pen): argument 66 pen.hideturtle() 67 start(pen, 20, -208) 68 t = tree( [pen], 80, level, 0.1, [[ (45,0.69), (0,0.65), (-45,0.71) ]] ) 71 def doit2(level, pen): argument 72 pen.hideturtle() 73 start(pen, -135, -130) 74 t = tree( [pen], 120, level, 0.1, [[ (45,0.69), (-45,0.71) ]] ) 77 def doit3(level, pen): argument 78 pen.hideturtle() [all …]
|
/external/fonttools/Lib/fontTools/svgLib/path/ |
D | parser.py | 92 def parse_path(pathdef, pen, current_pos=(0, 0), arc_class=EllipticalArc): argument 122 have_arcTo = hasattr(pen, "arcTo") 152 pen.endPath() 154 pen.moveTo((current_pos.real, current_pos.imag)) 169 pen.lineTo((start_pos.real, start_pos.imag)) 170 pen.closePath() 181 pen.lineTo((pos.real, pos.imag)) 189 pen.lineTo((pos.real, pos.imag)) 197 pen.lineTo((pos.real, pos.imag)) 210 pen.curveTo((control1.real, control1.imag), [all …]
|
D | __init__.py | 49 def draw(self, pen): argument 51 pen = TransformPen(pen, self.transform) 56 original_pen = pen 59 pen = TransformPen(original_pen, transform) 61 pen = original_pen 62 parse_path(path, pen)
|