Lines Matching refs:ctx
64 def __init__(self, command, node, ctx):
67 self.ctx = ctx
80 self.ctx.style = style
84 if hasattr(self.ctx, method) and style[key] != "none":
85 getattr(self.ctx, method)(style[key])
87 self.ctx.style_cache = style
120 self.ctx.write("\n// #%s" % self.attr("id"))
122 self.ctx.save()
127 self.ctx.beginPath()
130 self.ctx.transform(*trans_matrix) # unpacks argument list
135 getattr(self.ctx, self.command)(*data)
136 self.ctx.closePath()
140 self.ctx.restore()
149 self.ctx.transform(*trans_matrix)
164 def __init__(self, command, node, ctx):
165 AbstractShape.__init__(self, command, node, ctx)
188 self.ctx.beginPath()
191 self.ctx.transform(*trans_matrix) # unpacks argument list
195 self.ctx.moveTo(cx, cy - ry)
196 self.ctx.bezierCurveTo(cx + (KAPPA * rx), cy - ry, cx + rx, cy - (KAPPA * ry), cx + rx, cy)
197 self.ctx.bezierCurveTo(cx + rx, cy + (KAPPA * ry), cx + (KAPPA * rx), cy + ry, cx, cy + ry)
198 self.ctx.bezierCurveTo(cx - (KAPPA * rx), cy + ry, cx - rx, cy + (KAPPA * ry), cx - rx, cy)
199 self.ctx.bezierCurveTo(cx - rx, cy - (KAPPA * ry), cx - (KAPPA * rx), cy - ry, cx, cy - ry)
200 self.ctx.closePath()
209 self.ctx.moveTo(data[0], data[1])
213 self.ctx.lineTo(data[0], data[1])
219 self.ctx.bezierCurveTo(x1, y1, x2, y2, x, y)
282 self.ctx.translate(cx, cy)
283 self.ctx.rotate(angle)
284 self.ctx.scale(sx, sy)
285 self.ctx.arc(0, 0, r, a1, a1 + ad, 1 - sweepflag)
286 self.ctx.scale(1/sx, 1/sy)
287 self.ctx.rotate(-angle)
288 self.ctx.translate(-cx, -cy)
295 self.ctx.beginPath()
298 self.ctx.transform(*trans_matrix) # unpacks argument list
311 self.ctx.closePath()
352 self.ctx.setFont(" ".join(text))
364 self.ctx.transform(*trans_matrix) # unpacks argument list
372 self.ctx.fillText(text, _x, _y)