Vips.Rect¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
height |
r/w |
height of rectangle |
|
left |
r/w |
left edge of rectangle |
|
top |
r/w |
top edge of rectangle |
|
width |
r/w |
width of rectangle |
Methods¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class Vips.Rect¶
A
Vips.Rect
is a rectangular area of pixels. This is a struct for performing simple rectangle algebra.- equalsrect(r2)¶
-
Is self equal to r2?
- includespoint(x, y)¶
- Parameters:
- Returns:
True
if self contains (x, y).- Return type:
Does self contain point (x, y)?
- includesrect(r2)¶
-
Is r2 a subset of self?
- intersectrect(r2)¶
- Parameters:
r2 (
Vips.Rect
) – input rectangle 2- Returns:
output rectangle
- Return type:
out:
Vips.Rect
Fill out with the intersection of self and r2. out can equal self or r2.
- isempty()¶
-
Is self empty? ie. zero width or height.
- normalise()¶
Make sure width and height are >0 by moving the origin and flipping the rect.