Added secondary mode button logic; added arrow bi-directionality; cleaned up primary button box
This commit is contained in:
24
src/data/events/brushes/dual_arrow.py
Normal file
24
src/data/events/brushes/dual_arrow.py
Normal file
@@ -0,0 +1,24 @@
|
||||
# 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)
|
Reference in New Issue
Block a user