Vips.Area¶
Fields¶
Name |
Type |
Access |
Description |
|---|---|---|---|
client |
r |
||
count |
r |
||
data |
r/w |
||
free_fn |
r |
||
length |
r/w |
||
lock |
r |
||
n |
r/w |
||
sizeof_type |
r |
||
type |
r |
Methods¶
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
Details¶
- class Vips.Area¶
- classmethod free_cb(mem, area)¶
- classmethod new(free_fn, *data)¶
- Parameters:
free_fn (
Vips.CallbackFnorNone) – data will be freed with this functiondata (
objectorNone) – data will be freed with this function
- Returns:
the new
Vips.Area.- Return type:
A
Vips.Areawraps a chunk of memory. It adds reference counting and a free function. It also keeps a count and aGObject.GType, so the area can be an array.This type is used for things like passing an array of double or an array of
Vips.Objectpointers to operations, and for reference-counted immutable strings.Initial count == 1, so _unref() after attaching somewhere.
See also:
Vips.Area.unref().
- classmethod new_array(type, sizeof_type, n)¶
- Parameters:
type (
GObject.GType) –GObject.GTypeof elements to storesizeof_type (
int) – sizeof() an element in the arrayn (
int) – number of elements in the array
- Returns:
the new
Vips.Area.- Return type:
An area which holds an array of elements of some
GObject.GType. To set values for the elements, get the pointer and write.See also:
Vips.Area.unref().
- classmethod new_array_object(n)¶
-
An area which holds an array of
GObject.Objects. SeeVips.Area.new_array(). When the area is freed, eachGObject.Objectwill be unreffed.Add an extra
Noneelement at the end, handy for eg. vips_image_pipeline_array() etc.See also:
Vips.Area.unref().
- get_data()¶
- Returns:
The pointer held by self.
- length:
optionally return length in bytes here
- n:
optionally return number of elements here
- type:
optionally return element type here
- sizeof_type:
optionally return sizeof() element type here
- Return type:
(
objectorNone, length:int, n:int, type:GObject.GType, sizeof_type:int)
Return the data pointer plus optionally the length in bytes of an area, the number of elements, the
GObject.GTypeof each element and the sizeof() each element.
- unref()¶