def __init__(self): self._scene = QtScene() self._bounding_box = None for item in (self._make_polygon(), ): self._add_item(item) self._scene.bounding_box = self._bounding_box # Fixme:
def __init__(self, dxf_path): self._importer = DxfImporter(dxf_path) self._scene = QtScene() self._bounding_box = None for item in self._importer: self._add_item(item) self._scene.bounding_box = self._bounding_box # Fixme:
def __init__(self): self._scene = QtScene() self._bounding_box = None self._line_width = 5. for path in self._make_figure1(): self._add_item(path) self._scene.bounding_box = self._bounding_box # Fixme:
def __init__(self, svg_path): self._bounding_box = None self._item_counter = 0 self._scene = QtScene() super().__init__(svg_path) # Fixme: self._scene.bounding_box = self._bounding_box self._logger.info('Number of SVG item: {}'.format(self._item_counter)) self._logger.info('Number of scene item: {}'.format(self._scene.number_of_items))
def __init__(self): self._scene = QtScene() self._bounding_box = None for path in ( self._make_directional_path((0, 0)), self._make_rounded_rectangle((20, 0), width=10, height=15, radius=5), self._make_closed_path((35, 0), radius=None), self._make_closed_path((55, 0), radius=3), self._make_absolute_cw_path((0, 40), radius=3), self._make_absolute_ccw_path((0, 45), radius=3), self._make_quadratic((25, 40)), self._make_absolute_quadratic((35, 40)), self._make_cubic((40, 40)), self._make_absolute_cubic((50, 40)), ): self._add_path(path) self._scene.bounding_box = self._bounding_box # Fixme:
flat_ellipses_bezier = [] for segments in ellipses_bezier: flat_ellipses_bezier += list(segments) return [ *flat_ellipses_bezier, *ellipse_arc.to_bezier(), ] ############################################## def _add_item(self, item): path_style = GraphicPathStyle( line_width=self._line_width, stroke_color=Colors.black, stroke_style=StrokeStyle.SolidLine, cap_style=CapStyle.RoundCap, ) self._scene.add_geometry(item, path_style) # Fixme: why here ??? self._update_bounding_box(item) #################################################################################################### scene = QtScene() scene_builder = SceneBuilder() application.qml_application.scene = scene_builder.scene