Class

VipsRegion

Description [src]

class Vips.Region : Vips.Object {
  parent_object: VipsObject,
  im: VipsImage*,
  valid: VipsRect
}

A small part of a VipsImage. valid holds the left/top/width/height of the area of pixels that are available from the region.

See also: VIPS_REGION_ADDR(), vips_region_new(), vips_region_prepare().

Hierarchy

hierarchy this VipsRegion ancestor_0 VipsObject ancestor_0--this ancestor_1 GObject ancestor_1--ancestor_0

Ancestors

Constructors

vips_region_new

Create a region. VipsRegion s start out empty, you need to call vips_region_prepare() to fill them with pixels.

Instance methods

vips_region_black

Paints 0 into the valid part of reg.

vips_region_buffer

The region is transformed so that at least r pixels are available as a memory buffer that can be written to.

vips_region_copy

Copy from one region to another. Copy area r from inside reg to dest, positioning the area of pixels at x, y. The two regions must have pixels which are the same size.

vips_region_equalsregion

Do two regions point to the same piece of image? ie.

vips_region_fetch

Generate an area of pixels and return a copy. The result must be freed with g_free(). The requested area must be completely inside the image.

vips_region_height
No description available.
vips_region_image

The region is transformed so that at least r pixels are available to be read from the image. The image needs to be a memory buffer or represent a file on disc that has been mapped or can be mapped.

vips_region_invalidate

Mark a region as containing invalid pixels. Calling this function means that the next time vips_region_prepare() is called, the region will be recalculated.

vips_region_paint

Paints value into reg covering rectangle r. r is clipped against reg->valid.

vips_region_paint_pel

Paints ink into reg covering rectangle r. r is clipped against reg->valid.

vips_region_position

Set the position of a region. This only affects reg->valid, ie. the way pixels are addressed, not reg->data, the pixels which are addressed. Clip against the size of the image. Do not allow negative positions, or positions outside the image.

vips_region_prepare

Vips_region_prepare() fills reg with pixels. After calling, you can address at least the area r with VIPS_REGION_ADDR() and get valid pixels.

vips_region_prepare_to

Like vips_region_prepare(): fill reg with the pixels in area r.

vips_region_region

Make VIPS_REGION_ADDR() on reg go to dest instead.

vips_region_shrink

Write the pixels target in to from the x2 larger area in from. Non-complex uncoded images and LABQ only. Images with alpha (see vips_image_hasalpha()) shrink with pixels scaled by alpha to avoid fringing.

vips_region_shrink_method

Write the pixels target in to from the x2 larger area in from. Non-complex uncoded images and LABQ only. Images with alpha (see vips_image_hasalpha()) shrink with pixels scaled by alpha to avoid fringing.

vips_region_width
No description available.
Methods inherited from VipsObject (27)

Please see VipsObject for a full list of methods.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

Properties inherited from VipsObject (2)
Vips.Object:description
No description available.
Vips.Object:nickname
No description available.

Signals

Signals inherited from VipsObject (4)
Vips.Object::close

The ::close signal is emitted once during object close. The object is dying and may not work.

Vips.Object::postbuild

The ::postbuild signal is emitted once just after successful object construction. Return non-zero to cause object construction to fail.

Vips.Object::postclose

The ::postclose signal is emitted once after object close. The object pointer is still valid, but nothing else.

Vips.Object::preclose

The ::preclose signal is emitted once just before object close starts. The oject is still alive.

Signals inherited from GObject (1)
GObject.Object::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct VipsRegionClass {
  VipsObjectClass parent_class;
  
}
Class members
parent_class
VipsObjectClass
  No description available.