Cairo Antialiasing Outline Issue?

Bill Spitzak spitzak at gmail.com
Fri Apr 26 09:33:19 UTC 2024


Absolutely he should make sure his code is not drawing the lines with some
other color, and then attempting to "erase" them by drawing them again
with the background color. This will produce visible and unavoidable
artifacts in the antialiased edges.


On Fri, Apr 26, 2024 at 11:27 AM Uli Schlachter <psychon at znc.in> wrote:

> Hi,
>
> Am 20.04.24 um 18:38 schrieb Richard Rosenman:
> > Can you see the faint greenish outline within the yellow:
>
> actually, I cannot.
>
> However, I looked at the individual color channels of the image and
> noticed that the blue channel is completely empty except for some
> outline around the lines. This outline "reaches into" the upper part of
> the image. I guess this is what you are talking about.
>
> I don't really know what causes this. As others in the thread wrote,
> this might be some inaccuracies somewhere in the code. However, to me it
> seems more like the lines were drawn against a transparent background
> with antialiasing. The result would look good against a transparent
> background, but not when later drawn against a background of the same
> color.
>
> But this is just a guess.
>
> If my guess is correct, perhaps you can somehow re-arranges things to
> draw these lines directly against their later background.
>
> Another alternative would be to use "poor man's antialiasing": Draw in a
> higher resolution without antialiasing and scale down later.
>
> If you happen to have a self-contained C program that reproduces this
> problem, I might be able to dig deeper. However, I am not sure how
> helpful the result be to you in the near future.
>
> Cheers,
> Uli
> --
> 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/20240426/ffd07ea0/attachment.htm>


More information about the cairo mailing list