(self, x0, y0, x1, y1, absolute, fill, border)
Set the graphics viewport and optionally draw a box (VIEW).
Set the graphics viewport and optionally draw a box (VIEW).
Set the graphics viewport and optionally draw a box ( VIEW ) .
def _set_view(self, x0, y0, x1, y1, absolute, fill, border):
        """Set the graphics viewport and optionally draw a box (VIEW)."""
        # first unset the viewport so that we can draw the box
        fill = self._get_attr_index(fill)
        border = self._get_attr_index(border)
        self.graph_view.unset()
        if fill is not None:
            self._draw_box_filled(x0, y0, x1, y1, fill)
            self._last_attr = fill
        if border is not None:
            self._draw_box(x0-1, y0-1, x1+1, y1+1, border)
            self._last_attr = border
        self.graph_view.set(x0, y0, x1, y1, absolute)
        self._last_point = self.graph_view.get_mid()
        if self._window_bounds is not None:
            self._set_window(*self._window_bounds)
def _set_view ( self , x0 , y0 , x1 , y1 , absolute , fill , border ) : # first unset the viewport so that we can draw the box fill = self . _get_attr_index ( fill ) border = self . _get_attr_index ( border ) self . graph_view . unset ( ) if fill is not None : self . _draw_box_filled ( x0 , y0 , x1 , y1 , fill ) self . _last_attr = fill if border is not None : self . _draw_box ( x0 - 1 , y0 - 1 , x1 + 1 , y1 + 1 , border ) self . _last_attr = border self . graph_view . set ( x0 , y0 , x1 , y1 , absolute ) self . _last_point = self . graph_view . get_mid ( ) if self . _window_bounds is not None : self . _set_window ( * self . _window_bounds )