BufferSurface
Object Hierarchy:
Description:
A buffer containing an internal Cairo-usable surface and context, designed for usage with large, rarely updated draw operations.
Namespace: Granite.Drawing
Package: granite
Content:
Properties:
- public Context context { get; }
The Cairo.Context for the internal surface. All drawing operations done on this Granite.Drawing.BufferSurface should use this context.
- public int height { get; }
The height of the BufferSurface, in pixels.
- public Surface surface { get; }
The Cairo.Surface which will store the results of all drawing operations made with Granite.Drawing.BufferSurface.context.
- public int width { get; }
The width of the Granite.Drawing.BufferSurface, in pixels.
Creation methods:
- public BufferSurface (int width, int height)
Constructs a new, empty Granite.Drawing.BufferSurface with the supplied dimensions.
- public BufferSurface.with_buffer_surface (int width, int height, BufferSurface model)
Constructs a new, empty Granite.Drawing.BufferSurface with the supplied dimensions, using the supplied Granite.Drawing.BufferSurface as a model.
- public BufferSurface.with_surface (int width, int height, Surface model)
Constructs a new, empty Granite.Drawing.BufferSurface with the supplied dimensions, using the supplied Cairo.Surface as a model.
Methods:
- public Color average_color ()
Averages all the colors in the internal Cairo.Surface.
- public void clear ()
Clears the internal Cairo.Surface, making all pixels fully transparent.
- public void exponential_blur (int radius)
Performs a blur operation on the internal Cairo.Surface, using an exponential blurring algorithm. This method is usually the fastest and produces good-looking results (though not quite as good as gaussian's).
- public void fast_blur (int radius, int process_count = 1)
Performs a blur operation on the internal Cairo.Surface, using the fast-blur algorithm found here http://incubator.quasimondo.com/processing/superfastblur.pde.
- public void gaussian_blur (int radius)
Performs a blur operation on the internal Cairo.Surface, using a gaussian blurring algorithm. This method is very slow, albeit producing debatably the best-looking results, and in most cases developers should use the exponential blurring algorithm instead.
- public Pixbuf load_to_pixbuf ()
Creates a Gdk.Pixbuf from internal Cairo.Surface.
Inherited Members:
All known members inherited from class GLib.Object