/external/fonttools/Tests/pens/ |
D | ttGlyphPen_test.py | 24 pen = self.penClass(font.getGlyphSet()) 28 getattr(oldGlyph, self.drawMethod)(pen) 30 newGlyph = pen.glyph() 49 pen = TTGlyphPen(None) 50 pen.moveTo((0, 0)) 52 pen.moveTo((1, 0)) 55 pen = TTGlyphPen(None) 56 pen.moveTo((0, 0)) 57 pen.closePath() 58 assert not pen.points [all …]
|
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 | 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 | freetypePen_test.py | 17 def box(pen, offset=(0, 0)): argument 18 pen.moveTo((0 + offset[0], 0 + offset[1])) 19 pen.lineTo((0 + offset[0], 500 + offset[1])) 20 pen.lineTo((500 + offset[0], 500 + offset[1])) 21 pen.lineTo((500 + offset[0], 0 + offset[1])) 22 pen.closePath() 25 def draw_cubic(pen): argument 26 pen.moveTo((50, 0)) 27 pen.lineTo((50, 500)) 28 pen.lineTo((200, 500)) [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 | 48 pen = getattr(converted, self.pen_getter_name)() 49 quadpen = self.Cu2QuPen(pen, MAX_ERR, **kwargs) 96 pen = self.Pen() 97 quadpen = self.Cu2QuPen(pen, MAX_ERR) 101 self.assertEqual(str(pen).splitlines(), [ 162 pen = DummyPen() 163 quadpen = Cu2QuPen(pen, MAX_ERR) 167 self.assertEqual(str(pen).splitlines(), [ 173 pen = DummyPen() 174 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 | 175 self.pen = segmentPen 181 pen = self.pen 202 pen.moveTo(movePt) 228 pen.lineTo(pt) 231 pen.curveTo(*points) 234 pen.qCurveTo(*points) 239 pen.closePath() 241 pen.endPath() 246 self.pen.addComponent(glyphName, transform) 257 self.pen = GuessSmoothPointPen(pointPen) [all …]
|
D | cu2quPen.py | 46 self.pen = ReverseContourPen(other_pen) 48 self.pen = other_pen 70 self.pen.moveTo(self.start_pt) 82 self.pen.lineTo(pt) 92 self.pen.qCurveTo(*points) 125 self.pen.closePath() 131 self.pen.endPath() 136 self.pen.addComponent(glyphName, transformation) 156 self.pen = ReverseContourPointPen(other_point_pen) 158 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) 149 pen = RecordingPen() variable 150 pen.moveTo((0, 0)) 151 pen.lineTo((0, 100)) 152 pen.curveTo((50, 75), (60, 50), (50, 25)) 153 pen.closePath() 155 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 283 pen = RecordingPen() 284 parse_path("M-3e38 3E+38L-3E-38,3e-38", pen) 291 assert pen.value == expected 300 pen = RecordingPen() [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 | 19 def drawTestGlyph(pen): argument 20 pen.moveTo((100, 100)) 21 pen.lineTo((100, 1000)) 22 pen.qCurveTo((200, 900), (400, 900), (500, 1000)) 23 pen.lineTo((500, 100)) 24 pen.closePath() 61 pen = T2CharStringPen(None, None, CFF2=True) 62 drawTestGlyph(pen) 63 charString = pen.getCharString() 94 pen = TTGlyphPen(None) [all …]
|
/external/fonttools/Tests/ttLib/tables/ |
D | _g_l_y_f_test.py | 259 pen = TTGlyphPen(glyphSet) 260 pen.addComponent("dummy", (1, 0, 0, 1, 0, 0)) 261 composite = pen.glyph() 298 pen = RecordingPen() 299 glyfTable["glyph00003"].draw(pen, glyfTable=glyfTable) 313 self.assertEqual(pen.value, expected) 322 pen = RecordingPointPen() 323 glyfTable["glyph00003"].drawPoints(pen, glyfTable=glyfTable) 331 self.assertEqual(pen.value[:len(expected)], expected) 387 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 | 95 def parse_path(pathdef, pen, current_pos=(0, 0), arc_class=EllipticalArc): argument 125 have_arcTo = hasattr(pen, "arcTo") 155 pen.endPath() 157 pen.moveTo((current_pos.real, current_pos.imag)) 172 pen.lineTo((start_pos.real, start_pos.imag)) 173 pen.closePath() 184 pen.lineTo((pos.real, pos.imag)) 192 pen.lineTo((pos.real, pos.imag)) 200 pen.lineTo((pos.real, pos.imag)) 213 pen.curveTo((control1.real, control1.imag), [all …]
|