[cairo] Polyline overshoot
Frans Meulenbroeks
fransmeulenbroeks at yahoo.com
Wed Mar 16 06:34:28 UTC 2022
Hi Uli, all
Yes the links and the info therein definitely helped to explain what is going on.Maybe naively I expected the corner where the line segments intersect to be the common point.
This would probably be as expected when working with pixel graphics, but with vector graphics I guess the overshoot I am seeing is due to rounding issues in the angle of the vectors that represent the line angles
Kind regards, Frans.
Op dinsdag 15 maart 2022 09:54:04 CET schreef Uli Schlachter <psychon at znc.in>:
Hi,
Am 14.03.22 um 08:54 schrieb Frans Meulenbroeks:
[...]
> What I do not fully understand is why miter join would create the overshoot I was seeing.
>
> I had expected that this would not draw before or after the coordinate the line ends (and at least not overshooting two or three pixels)
> Kind regards, Frans
[...]
Well, does the image on [0] help? If not, copy that code and change the
path to have a smaller angle. The smaller the angle, the longer will be
the "angle" of the line join (which is why the miter limit setting
exists, since otherwise very small angles would create a line join that
is almost infinitely long).
Hope this helps,
Uli
[0]: https://www.cairographics.org/samples/set_line_join/
--
If you have a problem, and you use threads to solve it, then you have
two problems and four of them happen randomly in a way you cannot
reproduce but your users suffer.
-- pq in #wayland
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo/attachments/20220316/a0e3dd03/attachment.htm>
More information about the cairo
mailing list