def draw(self, context): """Draw name and multiplicity of the line end. """ if not self.subject: return cr = context.cairo text_draw( cr, self._name, self.font, lambda w, h: (self._name_bounds.x, self._name_bounds.y), ) text_draw( cr, self._mult, self.font, lambda w, h: (self._mult_bounds.x, self._mult_bounds.y), ) for b in (self._name_bounds, self._mult_bounds): text_draw_focus_box(context, b.x, b.y, b.width, b.height)
def draw(self, context, bounding_box): x, y, w, h = super().draw(context, bounding_box) text_draw_focus_box(context, x, y, w, h) self.bounding_box = Rectangle(x, y, width=w, height=h)
def draw(self, context, bounding_box): x, y, w, h = super().draw(context, bounding_box) text_draw_focus_box(context, x, y, w, h)