[prev in list] [next in list] [prev in thread] [next in thread]
List: freetype-devel
Subject: [ft-devel] Answering my own queston - Region_t - Re: one question answered, and another comes (Re: F
From: Hin-Tak Leung <htl10 () users ! sourceforge ! net>
Date: 2017-04-25 13:27:26
Message-ID: 423354950.1249572.1493126846376 () mail ! yahoo ! com
[Download RAW message or body]
To answer my own question again - cairo has a cairo_region_intersect() and \
cairo_region_intersect_rectangle(). This is almost as good as the numpy vector sum. \
(the vector sum can pack tighter).
Unfortunately these are only exposed to python via either a python3-specific custom \
patch which Ubuntu/Debian carries (Fedora certainly does not), or use the recently \
merged pycairo 1.11 released a couple of weeks ago. (or qahirah). I'll go the pycairo \
1.11+ path.
Not quite sorry for the noise - Google doesn't really have answers to these :-).
--------------------------------------------
On Tue, 25/4/17, Hin-Tak Leung <htl10@users.sourceforge.net> wrote:
...
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?
_______________________________________________
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic