When using the transform tools you quite often see some arrows used in place of the mouse cursor. This refactors the code that makes those arrows, mostly to address problems related to using the interface when using thin or thick lines. There is an approximate 36% reduction in code 344 lines down to 221.
The dashed line changes spacing with changes to line width to avoid getting thick and short dashes. The arrows themselves scale a bit nicer with changes in line width. And the arrowheads line up nicer. Code is removed because there is no need to draw arrow shafts as multiple curved segments. Without that need we don't have to draw arcs. And we don't need two arrow-drawing routines. And I also fixed a hack that assumed the shader position variable was always zero.
The following capture compares before and after this patch, admittedly at an extreme size at 4X scale. The top shows how it looks now when using thin, default, and thick lines. The bottom show the same after this patch is applied. The bottom set follows the increase in line width a bit nicer and closes the arrows nicely.
The following shows how it currently looks, with scale set to 2X and "wide lines". You will see that the arrows get too fat to look like arrows. Their points don't line up to a point. And they "blow up" and do odd things as you cross the center location:
This shows what is looks after this patch is applied with the same settings. The arrow dimensions are scaled to remain arrow-like. The points are sharp. And they behave correctly as they pass through the center:




