def METHOD_NAME(self, component, gc, view_bounds=None, mode="normal"):
    if not self._position_valid:
        tmp = self.component.map_screen([self._data_position])
        if len(tmp.shape) == 2:
            tmp = tmp[0]
        self._updating = True
        self.position = tmp
        self._updating = False
        self._position_valid = True
    if not self._bounds_valid:
        data_x2 = self._data_position[0] + self._data_bounds[0]
        data_y2 = self._data_position[1] + self._data_bounds[1]
        tmp = self.component.map_screen((data_x2, data_y2))
        if len(tmp.shape) == 2:
            tmp = tmp[0]
        x2, y2 = tmp
        x, y = self.position
        self._updating = True
        self.bounds = [x2 - x, y2 - y]
        self._updating = False
        self._bounds_valid = True
    with gc:
        gc.set_antialias(0)
        gc.set_line_width(self.border_size)
        gc.set_stroke_color(self.border_color_)
        gc.clip_to_rect(
            component.x, component.y, component.width, component.height
        )
        rect = self.position + self.bounds
        if self.color != "transparent":
            if self.alpha:
                color = list(self.color_)
                if len(color) == 4:
                    color[3] = self.alpha
                else:
                    color += [self.alpha]
            else:
                color = self.color_
            gc.set_fill_color(color)
            gc.rect(*rect)
            gc.draw_path()
        else:
            gc.rect(*rect)
            gc.stroke_path()