def draw_feed_line(self, p1, p2, start_angle, end_angle=None, depth=0.0): """Draw a line from :p1: to :p2: on the preview layer that represents a linear feed. :depth: Current tool depth in machine units """ style = self._build_style('feedline', '#PreviewLineEnd0', self.feed_line_width, depth) self.inkex.create_line(p1.x, p1.y, p2.x, p2.y, style) if end_angle is not None and not geom.float_eq(end_angle, (p2 -p1).angle()): pass if end_angle is not None: line = geom.Line(p1, p2) self._draw_brush_markers(line, start_angle, end_angle)
def _blowout_polygon(self, vertices): if geom.float_eq(self.blowup_scale, 1.0): return vertices centroid = self._polygon_centroid(vertices) - self.doc_center offset = ((centroid * self.blowup_scale) - centroid) return [geom.P(v) + offset for v in vertices]