25 lines
540 B
Python
25 lines
540 B
Python
|
# Python imports
|
||
|
|
||
|
# Lib imports
|
||
|
import cairo
|
||
|
|
||
|
# Application imports
|
||
|
from .arrow import Arrow
|
||
|
|
||
|
|
||
|
|
||
|
class DualArrow(Arrow):
|
||
|
def __init__(self):
|
||
|
super(DualArrow, self).__init__()
|
||
|
|
||
|
|
||
|
def process(self, brush: cairo.Context):
|
||
|
self.set_brush_data(brush)
|
||
|
|
||
|
x1, y1 = self.points[0].x, self.points[0].y
|
||
|
x2, y2 = self.points[1].x, self.points[1].y
|
||
|
|
||
|
self.draw_start_arrow_head(brush, x1, y1, x2, y2)
|
||
|
self.draw_arrow_body(brush, x1, y1, x2, y2)
|
||
|
self.draw_end_arrow_head(brush, x1, y1, x2, y2)
|