-
Couldn't load subscription status.
- Fork 8
Open
Description
Hi,
I just discovered this library and found it quite neat for drawing flow charts. I now have a chart where multiple boxes join in a subsequent one. I chose one of them to form the backbone and just attached the second "from the side":
with Drawing() as d:
width = 5.5
height = 1
arrowlen = d.unit / 4
data_bg = "#ccecff"
process_bg = "#ffbfbf"
d.config(font="sans", lw=2)
flow.Box.defaults["fill"] = data_bg
flow.Box.defaults["w"] = width
flow.Box.defaults["h"] = height
flow.Box.defaults["minsize"] = (width, height)
flow.RoundBox.defaults["fill"] = process_bg
flow.RoundBox.defaults["w"] = width
flow.RoundBox.defaults["h"] = height
flow.RoundBox.defaults["minsize"] = (width, height)
flow.Arrow.defaults["arrowwidth"] = 0.3
flow.Arrow.defaults["arrowlength"] = 0.3
# print(flow.Box.defaults)
db = flow.Box().label("first").drop("S")
flow.Arrow().down(arrowlen)
aq = flow.RoundBox().label("second")
flow.Box().at(db.W, -3.5, height/2).label("side")
flow.Line().down(arrowlen + height / 2)
flow.Wire(arrow="->").to(aq.W)
This is exactly what I want (layout-wise). However, the Wire I use to make the elbow connection seems to spawn some Segments internally that do not care about the changed arrowwidth/length defaults, so the arrowheads have different size. I can work around this by just chaining an Arrow to the respective anchor of aq, but where should the default go for this to work? Is this a bug or intentional?
Metadata
Metadata
Assignees
Labels
No labels
