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 [struct`Rect`] is a rectangular area of pixels. This is a struct for performing simple rectangle algebra.
- equalsrect(r2)¶
- Parameters:
r2 (
Vips.Rect) – second rectangle- Returns:
TRUEif self is equal to r2.- Return type:
Is self equal to r2?
- includespoint(x, y)¶
- Parameters:
- Returns:
TRUEif self contains (x, y).- Return type:
Does self contain point (x, y)?
- includesrect(r2)¶
- Parameters:
r2 (
Vips.Rect) – inner rectangle- Returns:
TRUEif r2 is a subset of self.- Return type:
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()¶
- Returns:
TRUEif self contains no pixels.- Return type:
Is self empty? ie. zero width or height.
- normalise()¶
Make sure width and height are >0 by moving the origin and flipping the rect.