root/gaphor/tags/gaphor-0.12.0/gaphor/diagram/include.py

Revision 1241, 0.7 kB (checked in by arj..@yirdis.nl, 2 years ago)

Cleanup: removed resource() from gaphor.diagram; removed future imports.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 """
2 Use case inclusion relationship.
3 """
4
5 from gaphor import UML
6 from gaphor.diagram.diagramline import DiagramLine
7
8 class IncludeItem(DiagramLine):
9     """
10     Use case inclusion relationship.
11     """
12
13     __uml__ = UML.Include
14     __stereotype__ = 'include'
15
16     def __init__(self, id=None):
17         DiagramLine.__init__(self, id)
18
19     def draw_head(self, context):
20         cr = context.cairo
21         cr.set_dash((), 0)
22         cr.move_to(15, -6)
23         cr.line_to(0, 0)
24         cr.line_to(15, 6)
25         cr.stroke()
26         cr.move_to(0, 0)
27
28     def draw(self, context):
29         context.cairo.set_dash((7.0, 5.0), 0)
30         super(IncludeItem, self).draw(context)
31
32
33 # vim:sw=4:et
Note: See TracBrowser for help on using the browser.