def elliptical_arc_to(self, rx, ry, phi, large_arc_flag, sweep_flag, x2, y2): x1, y1 = self.GetCurrentPoint() arcs = svg_extras.elliptical_arc_to(self, rx, ry, phi, large_arc_flag, sweep_flag, x1, y1, x2, y2) for arc in arcs: self.curve_to(*arc)
def elliptical_arc_to(self, rx, ry, phi, large_arc_flag, sweep_flag, x2, y2): x1, y1 = self.GetCurrentPoint() arcs = svg_extras.elliptical_arc_to(self, rx, ry, phi, large_arc_flag, sweep_flag, x1, y1, x2, y2) for arc in arcs: path = wx.GraphicsRenderer_GetDefaultRenderer().CreatePath() path.MoveToPoint(x1, y1) path.AddCurveToPoint(*arc) self.AddPath(path) x1, y1 = self.GetCurrentPoint() self.MoveToPoint(x1, y1) self.CloseSubpath()
def elliptical_arc_to(self, rx, ry, phi, large_arc_flag, sweep_flag, x2, y2): import wx x1, y1 = self.GetCurrentPoint() arcs = svg_extras.elliptical_arc_to(self, rx, ry, phi, large_arc_flag, sweep_flag, x1, y1, x2, y2) for arc in arcs: path = wx.GraphicsRenderer_GetDefaultRenderer().CreatePath() path.MoveToPoint(x1, y1) path.AddCurveToPoint(*arc) self.AddPath(path) x1, y1 = self.GetCurrentPoint() self.MoveToPoint(x1, y1) self.CloseSubpath()
def elliptical_arc_to(self, rx, ry, phi, large_arc_flag, sweep_flag, x2, y2): if sys.platform == "darwin": x1, y1 = self.get_current_point() else: def _get_current_point(path): total_vertices = path.total_vertices() if total_vertices == 0: return (0.0, 0.0) return path.vertex(total_vertices - 1)[0] x1, y1 = _get_current_point(self) arcs = svg_extras.elliptical_arc_to(self, rx, ry, phi, large_arc_flag, sweep_flag, x1, y1, x2, y2) for arc in arcs: self.curve_to(*arc)
def elliptical_arc_to(self, rx, ry, phi, large_arc_flag, sweep_flag, x2, y2): if sys.platform == 'darwin': x1, y1 = self.get_current_point() else: def _get_current_point(path): total_vertices = path.total_vertices() if total_vertices == 0: return (0.0, 0.0) return path.vertex(total_vertices - 1)[0] x1, y1 = _get_current_point(self) arcs = svg_extras.elliptical_arc_to(self, rx, ry, phi, large_arc_flag, sweep_flag, x1, y1, x2, y2) for arc in arcs: self.curve_to(*arc)