Top | Description | ![]() | ![]() | ![]() | ![]() |
#define | VIPS_RECT_RIGHT() |
#define | VIPS_RECT_BOTTOM() |
#define | VIPS_RECT_HCENTRE() |
#define | VIPS_RECT_VCENTRE() |
gboolean | vips_rect_isempty () |
gboolean | vips_rect_includespoint () |
gboolean | vips_rect_includesrect () |
gboolean | vips_rect_equalsrect () |
gboolean | vips_rect_overlapsrect () |
void | vips_rect_marginadjust () |
void | vips_rect_intersectrect () |
void | vips_rect_unionrect () |
VipsRect * | vips_rect_dup () |
void | vips_rect_normalise () |
gbooleanvips_rect_isempty (constVipsRect *r
);
Isr
empty? ie. zero width or height.
gbooleanvips_rect_includespoint (constVipsRect *r
,int x
,int y
);
Doesr
contain point (x
,y
)?
gbooleanvips_rect_includesrect (constVipsRect *r1
,constVipsRect *r2
);
Isr2
a subset ofr1
?
gbooleanvips_rect_equalsrect (constVipsRect *r1
,constVipsRect *r2
);
Isr1
equal tor2
?
gbooleanvips_rect_overlapsrect (constVipsRect *r1
,constVipsRect *r2
);
Dor1
andr2
have a non-empty intersection?
voidvips_rect_marginadjust (VipsRect *r
,int n
);
Enlarger
byn
. +1 means out one pixel.
voidvips_rect_intersectrect (constVipsRect *r1
,constVipsRect *r2
,VipsRect *out
);
Fillout
with the intersection ofr1
andr2
.out
can equalr1
orr2
.
voidvips_rect_unionrect (constVipsRect *r1
,constVipsRect *r2
,VipsRect *out
);
Fillout
with the bounding box ofr1
andr2
.out
can equalr1
orr2
.
VipsRect *vips_rect_dup (constVipsRect *r
);
Duplicate a rect to the heap. You need to free the result withg_free()
.
voidvips_rect_normalise (VipsRect *r
);
Make sure width and height are >0 by moving the origin and flipping therect.
typedef struct {int left;int top;int width;int height;} VipsRect;
AVipsRect is a rectangular area of pixels. This is a struct forperforming simple rectangle algebra.