|
From: Daniel J S. <dan...@ie...> - 2004-02-26 17:39:20
|
Oh yeah, what about this issue with the arrowhead tips extending past
the point specified in the data? I guess I'm in the camp that says that
should be fixed so that the arrowhead tip ends right at the data point
specified. It would be nice to not let people get into the habit of
compensating for that themselves and then to later have it changes. I
wrote out the formula and was going to write a patch, but unfortunately
there was nowhere that I could get the line thickness from.
Could it be kludged in some way? That is, could we add a terminal
routine (dread!) that returns the width of the line and then in the
terminal function just do some trial and error guesstimating about the
line thickness? That is, the formula for the vector to compensate is
v = - SE * w / (2 |SE| sin(alpha))
where SE is the vector in terms of start and end position, alpha is the
angle of the arrow command, and w is the width of the current line.
Since line widths are a unitless number, I assume that each terminal
needs a different routine, e.g.,
w = term->linewidth( unitless_width );
Where w is the width in appropriate graph units. Or maybe the linewidth
could be an array entry in other terminal characteristics. For now,
maybe the values could be fudged by trial and error. E.g.,
float PS_linewidth( unitless_width ) {
/* Do a crude linear approximation for now. */
return unitless_width * TRIAL_AND_ERROR_PARAMETER;
}
Any thoughts on what to do here?
Dan
|