Esempio n. 1
0
    def __init__(self, project: 'Project') -> None:
        BaseViewWidget.__init__(self)
        self.setFocusPolicy(QtCore.Qt.StrongFocus)
        self.project = project

        self.image_view_cache = {}

        self.compositor = CompositeManager()

        self.trace_renderer = TraceRender(self)
        self.via_renderer = THRenderer(self)
        self.hairline_renderer = HairlineRenderer(self)

        self.debug_renderer = DebugRender(self)

        self.render_commands = StackupRenderCommands()
        self.__cad_cache = CADCache(self.project)
        self.__sel_cache = SelectionHighlightCache(self.project)

        # TODO, currently broken
        self.poly_renderer = CachedPolygonRenderer(self)

        # Initial view is a normalized 1-1-1 area.
        # Shift to be 10cm max
        self.viewState.set_scale(1./100000)

        self.boardViewState = BoardViewState()
        self.boardViewState.changed.connect(self.update)
Esempio n. 2
0
    def __init__(self, project):
        BaseViewWidget.__init__(self)
        self.project = project

        self.image_view_cache = { }

        self.pad_renderer = PadRender(self)
        self.dip_renderer = DIPRender(self)
        self.smd_renderer = SMDRender(self)
        self.trace_renderer = TraceRender(self)
        self.via_renderer = THRenderer(self)
        self.text_batch = TextBatcher(self.gls.text)
        self.poly_renderer = CachedPolygonRenderer(self)
        self.hairline_renderer = HairlineRenderer(self)
        self.passive_renderer = PassiveRender(self)

        # Initial view is a normalized 1-1-1 area.
        # Shift to be 10cm max
        self.viewState.transform = translate(-0.9, -0.9).dot(scale(1./100000))