generativepy has moved to the pythoninformer.com website, and this page might not be up to date. Please visit the new location.
paratick function adds a small arrow marker to a line, of the type often used in geometric diagrams to show that two lines are parallel. They look like this:
You can add 1, 2 or 3 markers.
paratick(ctx, a, b, count=1, length=4, gap=1)
|ctx||Context||The Pycairo Context to draw to|
|a||(number, number)||Tuple (x, y) for point a|
|b||(number, number)||Tuple (x, y) for point b|
|count||int||Number of ticks on the line, 1, 2 or 3.|
|length||number||length of the tick in user units.|
|gap||number||Gap between ticks in user units.|
Draws an tick across the line ab. The tick is half way between points
b, and points towards
See the example in the angle_marker article.
Copyright (c) Axlesoft Ltd 2021