| intersects |
(Object rhs [, int rule]) |
typedict.Path |
| |
Returns
1
if the area covered by this path intersects the area covered by
rhs,
which must be a
Path,
Rectangle,
or
NULL,
and
0
if it does not.
By default, interior points in both paths are identified using the
non-zero winding rule, but setting the optional
rule
argument to
WIND_EVEN_ODD,
which is defined in
yoix.graphics,
means the even-odd winding rule will be used to identify the interior of
rhs.
| |
| Example: |
The program,
import yoix.*.*;
Path p1;
Path p2;
p1 { // "named block"
moveto(72, 72);
rlineto(72, 0);
rlineto(0, 72);
closepath();
};
p2 { // "named block"
moveto(144 - 18, 72 + 18);
rlineto(72, 0);
rlineto(0, 72);
closepath();
};
printf("p1 and p2 %s\n", p1.intersects(p2) ? "intersect" : "do not intersect");
creates two triangular paths and then prints
p1 and p2 intersect
on standard output because the two paths intersect.
| | |
| Return: |
int
| | |
| See Also: |
eointersects,
ineofill,
infill,
instroke
|
|
Yoix is a registered trademark of AT&T Inc.
|