Class
GeglBuffer
Constructors
gegl_buffer_linear_new
Creates a GeglBuffer backed by a linear memory buffer, of the given
extent
in the specified format
. babl_format (“R’G’B’A u8”) for instance
to make a normal 8bit buffer.
gegl_buffer_linear_new_from_data
Creates a GeglBuffer backed by a linear memory buffer that already exists,
of the given extent
in the specified format
. babl_format (“R’G’B’A u8”)
for instance to make a normal 8bit buffer.
gegl_buffer_new
Create a new GeglBuffer of a given format with a given extent. It is possible to pass in NULL for both extent and format, a NULL extent creates an empty buffer and a NULL format makes the buffer default to “RGBA float”.
gegl_buffer_new_for_backend
Create a new GeglBuffer from a backend, if NULL is passed in the extent of the buffer will be inherited from the extent of the backend.
Functions
gegl_buffer_load
Loads an existing GeglBuffer from disk, if it has previously been saved with gegl_buffer_save it should be possible to open through any GIO transport, buffers that have been used as swap needs random access to be opened.
gegl_buffer_open
Open an existing on-disk GeglBuffer, this buffer is opened in a monitored state so multiple instances of gegl can share the same buffer. Sets on one buffer are reflected in the other.
gegl_buffer_swap_create_file
Generates a unique filename in the GEGL swap directory, suitable for
using as swap space. When the file is no longer needed, it may be
removed with gegl_buffer_swap_remove_file(); otherwise, it will be
removed when gegl_exit()
is called.
gegl_buffer_swap_has_file
Tests if path
is a swap file, that is, if it has been created
with gegl_buffer_swap_create_file(), and hasn’t been removed yet.
gegl_buffer_swap_remove_file
Removes a swap file, generated using gegl_buffer_swap_create_file(), unlinking the file, if exists.
Instance methods
gegl_buffer_add_handler
Add a new tile handler in the existing chain of tile handler of a GeglBuffer.
gegl_buffer_dup
Duplicate a buffer (internally uses gegl_buffer_copy). Aligned tiles will create copy-on-write clones in the new buffer.
gegl_buffer_flush
Flushes all unsaved data to disk, this is not necessary for shared geglbuffers opened with gegl_buffer_open since they auto-sync on writes.
gegl_buffer_flush_ext
Invokes the external flush function, if any is set on the provided buffer - this ensures that data pending - in the current implementation only OpenCL - externally to be synchronized with the buffer. Multi threaded code should call such a synchronization before branching out to avoid each of the threads having an implicit synchronization of its own.
gegl_buffer_get
Fetch a rectangular linear buffer of pixel data from the GeglBuffer, the data is converted to the desired BablFormat, if the BablFormat stored and fetched is the same this amounts to a series of memcpy’s aligned to demux the tile structure into a linear buffer.
gegl_buffer_get_abyss
Return the abyss extent of a buffer, this expands out to the parents extent in subbuffers.
gegl_buffer_get_extent
Returns a pointer to a GeglRectangle structure defining the geometry of a specific GeglBuffer, this is also the default width/height of buffers passed in to gegl_buffer_set and gegl_buffer_get (with a scale of 1.0 at least).
gegl_buffer_get_format
Get the babl format of the buffer, this might not be the format the buffer was originally created with, you need to use gegl_buffer_set_format (buf, NULL); to retrieve the original format (potentially having saved away the original format of the buffer to re-set it.)
gegl_buffer_iterator_new
Create a new buffer iterator, this buffer will be iterated through in linear chunks, some chunks might be full tiles the coordinates, see the documentation of gegl_buffer_iterator_next for how to use it and destroy it.
gegl_buffer_linear_close
This function makes sure GeglBuffer and underlying code is aware of changes being made to the linear buffer. If the request was not a compatible one it is written back to the buffer. Multiple concurrent users can be handed the same buffer (both raw access and converted).
gegl_buffer_remove_handler
Remove the provided tile handler in the existing chain of tile handler of a GeglBuffer.
gegl_buffer_sample
Query interpolate pixel values at a given coordinate using a specified form of interpolation.
gegl_buffer_sample_at_level
Query interpolate pixel values at a given coordinate using a specified form of interpolation.
gegl_buffer_sample_cleanup
Clean up resources used by sampling framework of buffer.
deprecated: 0.4.2
gegl_buffer_sampler_new
Create a new sampler, when you are done with the sampler, g_object_unref it.
gegl_buffer_sampler_new_at_level
Create a new sampler, when you are done with the sampler, g_object_unref it.
gegl_buffer_set_extent
Changes the size and position that is considered active in a buffer, this operation is valid on any buffer, reads on subbuffers outside the master buffer’s extent are at the moment undefined.
gegl_buffer_set_format
Set the babl format of the buffer, setting the babl format of the buffer requires the new format to have exactly the same bytes per pixel as the original format. If NULL is passed in the format of the buffer is reset to the original format.
gegl_buffer_set_pattern
Fill a region with a repeating pattern. Offsets parameters are
relative to the origin (0, 0) and not to the rectangle. So be carefull
about the origin of pattern
and buffer
extents.
gegl_buffer_signal_connect
This function should be used instead of g_signal_connect when connecting to the GeglBuffer::changed signal handler, GeglBuffer contains additional machinery to avoid the overhead of changes when no signal handler have been connected, if regular g_signal_connect is used; then no signals will be emitted.
Methods inherited from GeglTileHandler (9)
gegl_tile_handler_create_tile
Create a new tile associated with this tile handler.
gegl_tile_handler_damage_rect
gegl_tile_handler_damage_tile
gegl_tile_handler_dup_tile
Create a duplicate of tile
, associated with this tile handler.
gegl_tile_handler_get_source_tile
Fetches the tile at the given coordinates from handler
source. If the tile
doesn’t exist, or if handler
doesn’t have a source, creates a new tile
associated with this tile handler.
gegl_tile_handler_get_tile
Fetches the tile at the given coordinates from handler
. If the tile
doesn’t exist, creates a new tile associated with this tile handler.
gegl_tile_handler_lock
gegl_tile_handler_set_source
gegl_tile_handler_unlock
Signals
Signals inherited from GObject (1)
GObject::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.