def draw(self, preserve=False): self._draw = True self._fill = False if (self._last_pen_color != self._color or self._last_line_width != self._line_width): self.dc.set_draw_color(self._color[0], self._color[1], self._color[2]) self.dc.set_text_color(self._color[0], self._color[1], self._color[2]) self.dc.set_line_width(self._line_width) self._last_pen_color = self._color self._last_line_width = self._line_width self._draw_and_fill() self._draw = False if not preserve: self._fun_stack = [] return BaseDc.draw(self, preserve)
def draw(self, preserve=False): self._draw = True self._fill = False self.dc.SetBrush(self.transparent_brush) if (self._last_pen_color != self._color or self._last_line_width != self._line_width): self._last_pen = wx.Pen( wx.Colour(self._color[0], self._color[1], self._color[2]), (self._line_width + 0.49) * self.scale, style=wx.SOLID, ) self._last_pen_color = self._color self._last_line_width = self._line_width self.dc.SetPen(self._last_pen) self._draw_and_fill() self._draw = False if not preserve: self._fun_stack = [] return BaseDc.draw(self, preserve)
def draw(self): if not self.calc_only: self.ctx.DrawPath(self.path) self.path = None BaseDc.draw(self)