-
Notifications
You must be signed in to change notification settings - Fork 589
How to Check if Rectangles are Disjoint
Algebraic functions of rectangle and points can be used to check inclusion of such objects. Questions like "Is rectangle R1 contained in rectangle R2?" or "Is point P outside or inside rectangle R?" can easily be answered.
For rectangles, points and matrices, the list()
and tuple()
functions will return sequences of the coordinates. Therefore:
tuple(r1 & r2) == (0, 0, 0, 0)
means that r1 and r2 are disjoint.
tuple(r1 | r2) == tuple(r1)
means that r2 is completely contained in r1.
Note that r2 in the above examples can be a rectangle or a point.
HOWTO Button annots with JavaScript
HOWTO work with PDF embedded files
HOWTO extract text from inside rectangles
HOWTO extract text in natural reading order
HOWTO create or extract graphics
HOWTO create your own PDF Drawing
Rectangle inclusion & intersection
Metadata & bookmark maintenance