if self._gdiIndex in self._image._outlineColours:
# Need to construct a brush to match the outline pen's colour
if self._image._outlinePen:
if self._gdiIndex in self._image._outlineColours:
# Need to construct a brush to match the outline pen's colour
if self._image._outlinePen:
elif self._op == DRAWOP_DRAW_ARC:
dc.DrawArc(self._x2 + xoffset, self._y2 + yoffset, self._x3 + xoffset, self._y3 + yoffset, self._x1 + xoffset, self._y1 + yoffset)
elif self._op == DRAWOP_DRAW_ELLIPTIC_ARC:
elif self._op == DRAWOP_DRAW_ARC:
dc.DrawArc(self._x2 + xoffset, self._y2 + yoffset, self._x3 + xoffset, self._y3 + yoffset, self._x1 + xoffset, self._y1 + yoffset)
elif self._op == DRAWOP_DRAW_ELLIPTIC_ARC:
- dc.DrawEllipticArc(self._x1 + xoffset, self._y1 + yoffset, self._x2, self._y2, self._x3 * 360 / (2 * math.pi), self.y3 * 360 / (2 * math.pi))
+ dc.DrawEllipticArc(self._x1 + xoffset, self._y1 + yoffset, self._x2, self._y2, self._x3 * 360 / (2 * math.pi), self._y3 * 360 / (2 * math.pi))
elif self._op == DRAWOP_DRAW_POINT:
dc.DrawPoint(self._x1 + xoffset, self._y1 + yoffset)
elif self._op == DRAWOP_DRAW_TEXT:
elif self._op == DRAWOP_DRAW_POINT:
dc.DrawPoint(self._x1 + xoffset, self._y1 + yoffset)
elif self._op == DRAWOP_DRAW_TEXT:
def Scale(self, scaleX, scaleY):
for i in range(self._noPoints):
def Scale(self, scaleX, scaleY):
for i in range(self._noPoints):
def Translate(self, x, y):
for i in range(self._noPoints):
def Translate(self, x, y):
for i in range(self._noPoints):
- self._points[i][0] = x1 * cosTheta - y1 * sinTheta + x * (1 - cosTheta) + y * sinTheta
- self._points[i][1] = x1 * sinTheta + y1 * cosTheta + y * (1 - cosTheta) + x * sinTheta
+ self._points[i] = x1 * cosTheta - y1 * sinTheta + x * (1 - cosTheta) + y * sinTheta, x1 * sinTheta + y1 * cosTheta + y * (1 - cosTheta) + x * sinTheta
def OnDrawOutline(self, dc, x, y, w, h, oldW, oldH):
dc.SetBrush(wx.TRANSPARENT_BRUSH)
def OnDrawOutline(self, dc, x, y, w, h, oldW, oldH):
dc.SetBrush(wx.TRANSPARENT_BRUSH)
for op in self._ops:
op.Rotate(x, y, theta, sinTheta, cosTheta)
for op in self._ops:
op.Rotate(x, y, theta, sinTheta, cosTheta)
- angles = [0.0, math.pi / 2, math.pi, 3 * pi / 2]
+ angles = [0.0, math.pi / 2, math.pi, 3 * math.pi / 2]