MCPcopy Create free account
hub / github.com/Distrotech/reportlab / drawOn

Method drawOn

tools/pythonpoint/customshapes.py:57–73  ·  view source on GitHub ↗
(self, canvas)

Source from the content-addressed store, hash-verified

55
56
57 def drawOn(self, canvas):
58 canvas.saveState()
59
60 canvas.setFont('Helvetica-Bold',24)
61 canvas.drawString(600, 100, 'A Custom Shape')
62
63 canvas.translate(self.x, self.y)
64 canvas.scale(self.scale, self.scale)
65 self.drawBounds(canvas)
66
67 self.drawCentre(canvas)
68 self.drawTopLeft(canvas)
69 self.drawBottomLeft(canvas)
70 self.drawBottomRight(canvas)
71 self.drawTopRight(canvas)
72
73 canvas.restoreState()
74
75
76 def curveThrough(self, path, pointlist):

Callers 1

runFunction · 0.95

Calls 12

drawBoundsMethod · 0.95
drawCentreMethod · 0.95
drawTopLeftMethod · 0.95
drawBottomLeftMethod · 0.95
drawBottomRightMethod · 0.95
drawTopRightMethod · 0.95
saveStateMethod · 0.45
setFontMethod · 0.45
drawStringMethod · 0.45
translateMethod · 0.45
scaleMethod · 0.45
restoreStateMethod · 0.45

Tested by

no test coverage detected