Re: [ft-devel] one question answered, and another comes (Re: FT_Bitmap_Convert, and FreeType's bitmap format vs Cairo's)

Alexei Podtelezhnikov <[email protected]>
Newsgroups gmane.comp.fonts.freetype.devel,gmane.comp.lib.cairo
Message-ID <CAJU=AjWTLqty+c4ioxq1VZMv=ppoLm_V28Z-QNnF198uyput=A@mail.gmail.com>
> So I have managed re-written all almost all of freetype-py's drawing examples from doing very slow numpy-based compositing to using cairo (pycairo), except one last problem I think. One of freetype-py's drawing example uses a vector sum between a clip of the drawing surface with the current drawing pattern to see if we are drawing over something that's already drawn in this single line:
>
> if (I[y-h//2:y-h//2+h, x-w//2:x-w//2+w,0] * L).sum() == 0:
>
> i.e. this calculates if L will draw on anything previously drawn in I. I am trying to figure out how to do this in cairo.
>
> How does one check if two shapes overlap, or two paths intersect, in cairo?

Check if you have pixels with coverage more than 1. If coverage is
capped at 1, render the components individually and see if the total
coverage of individual components exceeds the coverage of the combo.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.