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

Revision 1241, 0.6 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 Generalization --
3 """
4
5 import gobject
6
7 from gaphor import UML
8 from gaphor.diagram.diagramline import DiagramLine
9
10 class GeneralizationItem(DiagramLine):
11
12     __uml__ = UML.Generalization
13     __relationship__ = 'general', None, 'specific', 'generalization'
14
15     def __init__(self, id=None):
16         DiagramLine.__init__(self, id)
17        
18     def draw_head(self, context):
19         cr = context.cairo
20         cr.move_to(0, 0)
21         cr.line_to(15, -10)
22         cr.line_to(15, 10)
23         cr.close_path()
24         cr.stroke()
25         cr.move_to(15, 0)
26
27 # vim:sw=4:et:ai
Note: See TracBrowser for help on using the browser.