Buffer
Object Hierarchy:
Description:
Namespace: Gegl
Package: gegl-0.4
Content:
Properties:
- public int abyss_height { get; construct; }
- public int abyss_width { get; construct; }
- public int abyss_x { get; construct; }
- public int abyss_y { get; construct; }
- public TileBackend backend { owned get; construct; }
- public void* format { get; set construct; }
- public int height { get; set construct; }
- public bool initialized { get; construct; }
- public string path { owned get; construct; }
- public int pixels { get; }
- public int px_size { get; }
- public int shift_x { get; construct; }
- public int shift_y { get; construct; }
- public int tile_height { get; construct; }
- public int tile_width { get; construct; }
- public int width { get; set construct; }
- public int x { get; set construct; }
- public int y { get; set construct; }
Static methods:
- public static Buffer load (string path)
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.
- public static Buffer open (string path)
Open an existing on-disk GeglBuffer, this buffer is opened in a monitored state so multiple instances of gegl can share the same buffer.
- public static string? swap_create_file (string? suffix)
Generates a unique filename in the GEGL swap directory, suitable for using as swap space.
- public static bool swap_has_file (string path)
Tests if
path
is a swap file, that is, if it has been created with swap_create_file, and hasn't been removed yet. - public static void swap_remove_file (string path)
Removes a swap file, generated using swap_create_file, unlinking the file, if exists.
Creation methods:
- protected Buffer ()
Create a new GeglBuffer of a given format with a given extent.
- public Buffer.for_backend (Rectangle extent, TileBackend 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.
- public Buffer.introspectable_new (string format_name, int x, int y, int width, int height)
Create a new GeglBuffer with the given format and dimensions.
Methods:
- public void add_handler (void* handler)
Add a new tile handler in the existing chain of tile handler of a GeglBuffer.
- public void clear (Rectangle roi)
Clears the provided rectangular region by setting all the associated memory to 0.
- public void copy (Rectangle src_rect, AbyssPolicy repeat_mode, Buffer dst, Rectangle dst_rect)
Copy a region from source buffer to destination buffer.
- public Buffer create_sub_buffer (Rectangle extent)
Create a new sub GeglBuffer, that is a view on a larger buffer.
- public Buffer dup ()
Duplicate a buffer (internally uses gegl_buffer_copy).
- public void 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.
- public void flush_ext (Rectangle rect)
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.
- public void freeze_changed ()
Blocks emission of the "changed" signal for this .
- public unowned Rectangle get_abyss ()
Return the abyss extent of a buffer, this expands out to the parents extent in subbuffers.
- public unowned Rectangle 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).
- public uint8[] introspectable_get (Rectangle rect, double scale, string? format_name, AbyssPolicy repeat_mode)
Fetch a rectangular linear buffer of pixel data from the GeglBuffer.
- public void introspectable_set (Rectangle rect, string format_name, uint8[] src)
Store a linear raster buffer into the GeglBuffer.
- public void linear_close (void* linear)
This function makes sure GeglBuffer and underlying code is aware of changes being made to the linear buffer.
- public void remove_handler (void* handler)
Remove the provided tile handler in the existing chain of tile handler of a GeglBuffer.
- public void sample_cleanup ()
Clean up resources used by sampling framework of buffer.
- public void save (string path, Rectangle roi)
Write a GeglBuffer to a file.
- public bool set_abyss (Rectangle abyss)
Changes the size and position of the abyss rectangle of a buffer.
- public void set_color (Rectangle rect, Color color)
Sets the region covered by rect to the specified color.
- public void set_color_from_pixel (Rectangle rect, void* pixel, Object pixel_format)
Sets the region covered by rect to the the provided pixel.
- public bool set_extent (Rectangle 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.
- public void set_pattern (Rectangle rect, Buffer pattern, int x_offset, int y_offset)
Fill a region with a repeating pattern.
- public bool share_storage (Buffer buffer2)
Checks if a pair of buffers share the same underlying tile storage.
- public long signal_connect (string detailed_signal, Callback c_handler)
This function should be used instead of g_signal_connect when connecting to the GeglBuffer:
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. - public void thaw_changed ()
Unblocks emission of the "changed" signal for this.
Signals:
Inherited Members:
All known members inherited from class Gegl.TileHandler
All known members inherited from class GLib.Object