def draw_initial_node(_box, context, _bounding_box): cr = context.cairo r = 10 d = r * 2 path_ellipse(cr, r, r, d, d) cr.set_line_width(0.01) cr.fill()
def draw_usecase(box, context, bounding_box): cr = context.cairo rx = bounding_box.width / 2.0 ry = bounding_box.height / 2.0 cr.move_to(bounding_box.width, ry) path_ellipse(cr, rx, ry, bounding_box.width, bounding_box.height) stroke(context)
def draw(self, context): cr = context.cairo r = self.RADIUS d = r * 2 path_ellipse(cr, r, r, d, d) cr.set_line_width(0.01) cr.fill() super(InitialNodeItem, self).draw(context)
def draw(self, context): cr = context.cairo rx = self.width / 2.0 ry = self.height / 2.0 cr.move_to(self.width, ry) path_ellipse(cr, rx, ry, self.width, self.height) stroke(context)
def draw_initial_pseudostate(box, context, bounding_box): """ Draw intial pseudostate symbol. """ cr = context.cairo r = 10 d = r * 2 path_ellipse(cr, r, r, d, d) cr.set_line_width(0.01) cr.fill()
def draw(self, context): cr = context.cairo path_ellipse(cr, 0, 0, 2 * self.radius, 2 * self.radius) if context.hovered: cr.set_source_rgba(*self.colour_hovered) else: cr.set_source_rgba(*self.colour) cr.fill_preserve() #cr.set_source_rgb(0, 0, 0.8) cr.stroke()
def draw(self, context): """ Draw intial pseudostate symbol. """ super(InitialPseudostateItem, self).draw(context) cr = context.cairo r = self.RADIUS d = r * 2 path_ellipse(cr, r, r, d, d) cr.set_line_width(0.01) cr.fill()
def draw_initial_node(_box, context, _bounding_box): cr = context.cairo stroke = context.style["color"] if stroke: cr.set_source_rgba(*stroke) r = 10 d = r * 2 path_ellipse(cr, r, r, d, d) cr.set_line_width(0.01) cr.fill()
def draw(self, context): cr = context.cairo rx = old_div(self.width, 2.) ry = old_div(self.height, 2.) cr.move_to(self.width, ry) path_ellipse(cr, rx, ry, self.width, self.height) cr.stroke() super(UseCaseItem, self).draw(context)
def draw_initial_pseudostate(box, context, bounding_box): """Draw initial pseudostate symbol.""" cr = context.cairo stroke = context.style["color"] if stroke: cr.set_source_rgba(*stroke) r = 10 d = r * 2 path_ellipse(cr, r, r, d, d) cr.set_line_width(0.01) cr.fill()
def draw(self, context): cr = context.cairo rx = self.width / 2. ry = self.height / 2. cr.move_to(self.width, ry) path_ellipse(cr, rx, ry, self.width, self.height) cr.stroke() super(UseCaseItem, self).draw(context)
def draw(self, context): cr = context.cairo rx = self.width / 2.0 ry = self.height / 2.0 cr.move_to(self.width, ry) path_ellipse(cr, rx, ry, self.width, self.height) cr.stroke() super(UseCaseItem, self).draw(context)
def draw(self, context): """ Draw intial pseudostate symbol. """ super(HistoryPseudostateItem, self).draw(context) cr = context.cairo r = self.RADIUS d = r * 2 path_ellipse(cr, r, r, d, d) #cr.set_line_width(1) cr.stroke() text_center(cr, r, r, "H")
def draw(self, context): """ Draw intial pseudostate symbol. """ super(HistoryPseudostateItem, self).draw(context) cr = context.cairo r = self.RADIUS d = r * 2 path_ellipse(cr, r, r, d, d) # cr.set_line_width(1) cr.stroke() text_center(cr, r, r, "H", self.style.name_font)
def draw(self, context): cr = context.cairo style = self.style rx = self.width / 2.0 ry = self.height / 2.0 cr.move_to(self.width, ry) path_ellipse(cr, rx, ry, self.width, self.height) cr.set_source_rgba(*style("color")) cr.set_line_width(style("line-width")) cr.stroke()
def draw_history_pseudostate(box, context, bounding_box): cr = context.cairo r = 15 d = r * 2 path_ellipse(cr, r, r, d, d) # cr.set_line_width(1) cr.move_to(12, 10) cr.line_to(12, 20) cr.move_to(18, 10) cr.line_to(18, 20) cr.move_to(12, 15) cr.line_to(18, 15) cr.stroke()
def draw_final_state(box, context, bounding_box): cr = context.cairo r = 16 d = 20 path_ellipse(cr, r, r, d, d) cr.set_line_width(0.01) cr.fill() d = r * 2 path_ellipse(cr, r, r, d, d) cr.set_line_width(0.01) cr.set_line_width(2) cr.stroke()
def draw_flow_final_node(_box, context, _bounding_box): cr = context.cairo r = 10 d = r * 2 path_ellipse(cr, r, r, d, d) cr.stroke() dr = (1 - math.sin(math.pi / 4)) * r cr.move_to(dr, dr) cr.line_to(d - dr, d - dr) cr.move_to(dr, d - dr) cr.line_to(d - dr, dr) cr.stroke()
def draw_database(box, context, bounding_box): cr = context.cairo d = 0.38 x, y, width, height = bounding_box x1 = width + x y1 = height + y cr.move_to(x1, y) path_ellipse(cr, width / 2, y, width, height * d) cr.line_to(x1, y1) cr.curve_to(x1, y1, width / 2, y1 + height * d, x, y1) cr.line_to(x, y) stroke(context)
def draw_history_pseudostate(box, context, bounding_box): cr = context.cairo r = 15 d = r * 2 path_ellipse(cr, r, r, d, d) stroke(context) cr.move_to(12, 10) cr.line_to(12, 20) cr.move_to(18, 10) cr.line_to(18, 20) cr.move_to(12, 15) cr.line_to(18, 15) stroke(context, fill=False)
def draw(self, context): cr = context.cairo r = self.RADIUS d = r * 2 path_ellipse(cr, r, r, d, d) cr.stroke() dr = (1 - math.sin(math.pi / 4)) * r cr.move_to(dr, dr) cr.line_to(d - dr, d - dr) cr.move_to(dr, d - dr) cr.line_to(d - dr, dr) cr.stroke() super(FlowFinalNodeItem, self).draw(context)
def draw(self, context): cr = context.cairo nw = self._handles[NW] style = self.style rx = self.width / 2.0 ry = self.height / 2.0 cr.move_to(self.width, ry) path_ellipse(cr, rx, ry, self.width, self.height) cr.set_source_rgba(*style.fill_color) cr.fill_preserve() cr.set_source_rgba(*style.border_color) cr.set_line_width(style.border_width) cr.stroke()
def draw(self, context): cr = context.cairo r = self.RADIUS_2 + 1 d = self.RADIUS_1 * 2 path_ellipse(cr, r, r, d, d) cr.set_line_width(0.01) cr.fill() d = r * 2 path_ellipse(cr, r, r, d, d) cr.set_line_width(0.01) cr.set_line_width(2) cr.stroke() super(ActivityFinalNodeItem, self).draw(context)
def draw_activity_final_node(_box, context, _bounding_box): cr = context.cairo inner_radius = 10 outer_radius = 15 r = outer_radius + 1 d = inner_radius * 2 path_ellipse(cr, r, r, d, d) cr.set_line_width(0.01) cr.fill() d = r * 2 path_ellipse(cr, r, r, d, d) cr.set_line_width(0.01) cr.set_line_width(2) cr.stroke()
def draw_final_state(box, context, bounding_box): cr = context.cairo r = 15 d = r * 2 path_ellipse(cr, r, r, d, d) cr.set_line_width(0.01) cr.set_line_width(2) stroke(context) stroke_color = context.style["color"] if stroke_color: cr.set_source_rgba(*stroke_color) d = 20 path_ellipse(cr, r, r, d, d) cr.set_line_width(0.01) cr.fill()
def draw(self, context): """ Draw final state symbol. """ cr = context.cairo r = self.RADIUS_2 + 1 d = self.RADIUS_1 * 2 path_ellipse(cr, r, r, d, d) cr.set_line_width(0.01) cr.fill() d = r * 2 path_ellipse(cr, r, r, d, d) cr.set_line_width(0.01) cr.set_line_width(2) cr.stroke() super(FinalStateItem, self).draw(context)
def draw_activity_final_node(_box, context, _bounding_box): cr = context.cairo stroke_color = context.style["color"] if stroke_color: cr.set_source_rgba(*stroke_color) inner_radius = 10 outer_radius = 15 r = outer_radius + 1 d = r * 2 path_ellipse(cr, r, r, d, d) cr.set_line_width(0.01) cr.set_line_width(2) stroke(context) d = inner_radius * 2 path_ellipse(cr, r, r, d, d) cr.set_line_width(0.01) cr.fill()
def draw(self, context): cr = context.cairo path_ellipse(cr, 0, 0, 2 * self.radius, 2 * self.radius) cr.stroke()