Dimensioning in PIL#
Dimensions#
At present PIL has a line drawing ability but no ability to draw lines with arrows at one or both ends, this together with extension lines and slanting text are useful utilities. If the drawing is mostly orthogonal with few sloping lines then this is all you need.
Dashed Lines#
Extend PIL and add dashed lines - another useful component in making drawings.
Rasterization Lines and Circles#
Lines and circles required rasterization algorithms for screens and printers, starting with Bresenham, then using the rasterizing algorithms from Alois Zigl, gives us the tools for antialiasing.
Antialiased Dimensions#
Using the antialiased rasterised lines, circle and arc a similar set of dimensioning aids can be generated to those using just the PIL lines and arcs. To save repetitious attribute options use a dataclass.
General#
A comparison using Python classic class structure and those attuned to dataclass and the third party package attrs.