Movatterモバイル変換


[0]ホーム

URL:


libvips

A fast image processing library with low memory needs.

DownloadInstallDocumentationIssuesWikilibvips projectslibvips on GitHub
Top  | DescriptionHomeUpPrevNext

rect

rect

Functions

#defineVIPS_RECT_RIGHT()
#defineVIPS_RECT_BOTTOM()
#defineVIPS_RECT_HCENTRE()
#defineVIPS_RECT_VCENTRE()
gbooleanvips_rect_isempty ()
gbooleanvips_rect_includespoint ()
gbooleanvips_rect_includesrect ()
gbooleanvips_rect_equalsrect ()
gbooleanvips_rect_overlapsrect ()
voidvips_rect_marginadjust ()
voidvips_rect_intersectrect ()
voidvips_rect_unionrect ()
VipsRect *vips_rect_dup ()
voidvips_rect_normalise ()

Types and Values

 VipsRect

Includes

#include <vips/vips.h>

Description

Functions

VIPS_RECT_RIGHT()

#define VIPS_RECT_RIGHT(R) ((R)->left + (R)->width)

VIPS_RECT_BOTTOM()

#define VIPS_RECT_BOTTOM(R) ((R)->top + (R)->height)

VIPS_RECT_HCENTRE()

#define VIPS_RECT_HCENTRE(R) ((R)->left + (R)->width / 2)

VIPS_RECT_VCENTRE()

#define VIPS_RECT_VCENTRE(R) ((R)->top + (R)->height / 2)

vips_rect_isempty ()

gbooleanvips_rect_isempty (constVipsRect *r);

Isr empty? ie. zero width or height.

Parameters

r

rectangle to test

 

Returns

TRUE ifrcontains no pixels.


vips_rect_includespoint ()

gbooleanvips_rect_includespoint (constVipsRect *r,int x,int y);

Doesr contain point (x,y)?

Parameters

r

rectangle to test

 

x

position to test for

 

y

position to test for

 

Returns

TRUE ifrcontains (x,y).


vips_rect_includesrect ()

gbooleanvips_rect_includesrect (constVipsRect *r1,constVipsRect *r2);

Isr2 a subset ofr1?

Parameters

r1

outer rectangle

 

r2

inner rectangle

 

Returns

TRUE ifr2is a subset ofr1.


vips_rect_equalsrect ()

gbooleanvips_rect_equalsrect (constVipsRect *r1,constVipsRect *r2);

Isr1 equal tor2?

Parameters

r1

first rectangle

 

r2

second rectangle

 

Returns

TRUE ifr1is equal tor2.


vips_rect_overlapsrect ()

gbooleanvips_rect_overlapsrect (constVipsRect *r1,constVipsRect *r2);

Dor1 andr2 have a non-empty intersection?

Parameters

r1

first rectangle

 

r2

second rectangle

 

Returns

TRUE ifr2andr1overlap.


vips_rect_marginadjust ()

voidvips_rect_marginadjust (VipsRect *r,int n);

Enlarger byn. +1 means out one pixel.

Parameters

r

rectangle to adjust

 

n

enlarge by

 

vips_rect_intersectrect ()

voidvips_rect_intersectrect (constVipsRect *r1,constVipsRect *r2,VipsRect *out);

Fillout with the intersection ofr1 andr2.out can equalr1 orr2.

Parameters

r1

input rectangle 1

 

r2

input rectangle 2

 

out

output rectangle.

[out]

vips_rect_unionrect ()

voidvips_rect_unionrect (constVipsRect *r1,constVipsRect *r2,VipsRect *out);

Fillout with the bounding box ofr1 andr2.out can equalr1 orr2.

Parameters

r1

input rectangle 1

 

r2

input rectangle 2

 

out

output rectangle.

[out]

vips_rect_dup ()

VipsRect *vips_rect_dup (constVipsRect *r);

Duplicate a rect to the heap. You need to free the result withg_free().

[skip]

Parameters

r

rectangle to duplicate

 

Returns

a pointer to copy ofrallocated on the heap.

[transfer full]


vips_rect_normalise ()

voidvips_rect_normalise (VipsRect *r);

Make sure width and height are >0 by moving the origin and flipping therect.

Parameters

r

rect to normalise

 

Types and Values

VipsRect

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.

Members

int left;

left edge of rectangle

 

int top;

top edge of rectangle

 

int width;

width of rectangle

 

int height;

height of rectangle

 

Generated by GTK-Doc V1.34.0

[8]ページ先頭

©2009-2025 Movatter.jp