PlankDrawingDockSurface

PlankDrawingDockSurface — A dock surface is a wrapper class for a cairo_surface_t. It encapsulates a surface/context and provides utility methods.

Synopsis

#define             PLANK_DRAWING_TYPE_DOCK_SURFACE
void                plank_drawing_dock_surface_clear    (PlankDrawingDockSurface *self);
PlankDrawingDockSurface * plank_drawing_dock_surface_copy
                                                        (PlankDrawingDockSurface *self);
GdkPixbuf *         plank_drawing_dock_surface_to_pixbuf
                                                        (PlankDrawingDockSurface *self);
PlankDrawingDockSurface * plank_drawing_dock_surface_create_mask
                                                        (PlankDrawingDockSurface *self,
                                                         gdouble threshold,
                                                         GdkRectangle *extent);
void                plank_drawing_dock_surface_average_color
                                                        (PlankDrawingDockSurface *self,
                                                         PlankDrawingColor *result);
void                plank_drawing_dock_surface_fast_blur
                                                        (PlankDrawingDockSurface *self,
                                                         gint radius,
                                                         gint process_count);
void                plank_drawing_dock_surface_exponential_blur
                                                        (PlankDrawingDockSurface *self,
                                                         gint radius);
void                plank_drawing_dock_surface_gaussian_blur
                                                        (PlankDrawingDockSurface *self,
                                                         gint radius);
PlankDrawingDockSurface * plank_drawing_dock_surface_new
                                                        (gint width,
                                                         gint height);
PlankDrawingDockSurface * plank_drawing_dock_surface_new_with_surface
                                                        (gint width,
                                                         gint height,
                                                         cairo_surface_t *model);
PlankDrawingDockSurface * plank_drawing_dock_surface_new_with_dock_surface
                                                        (gint width,
                                                         gint height,
                                                         PlankDrawingDockSurface *model);
PlankDrawingDockSurface * plank_drawing_dock_surface_new_with_internal
                                                        (cairo_surface_t *image);
cairo_surface_t *   plank_drawing_dock_surface_get_Internal
                                                        (PlankDrawingDockSurface *self);
gint                plank_drawing_dock_surface_get_Width
                                                        (PlankDrawingDockSurface *self);
gint                plank_drawing_dock_surface_get_Height
                                                        (PlankDrawingDockSurface *self);
cairo_t *           plank_drawing_dock_surface_get_Context
                                                        (PlankDrawingDockSurface *self);
struct              PlankDrawingDockSurface;
struct              PlankDrawingDockSurfaceClass;

Object Hierarchy

  GObject
   +----PlankDrawingDockSurface

Properties

  "Context"                  gpointer              : Read / Write / Construct Only
  "Height"                   gint                  : Read / Write / Construct Only
  "Internal"                 gpointer              : Read / Write / Construct Only
  "Width"                    gint                  : Read / Write / Construct Only

Description

Details

PLANK_DRAWING_TYPE_DOCK_SURFACE

#define PLANK_DRAWING_TYPE_DOCK_SURFACE (plank_drawing_dock_surface_get_type ())

The type for PlankDrawingDockSurface.


plank_drawing_dock_surface_clear ()

void                plank_drawing_dock_surface_clear    (PlankDrawingDockSurface *self);

Clears the entire surface.

self :

the PlankDrawingDockSurface instance

plank_drawing_dock_surface_copy ()

PlankDrawingDockSurface * plank_drawing_dock_surface_copy
                                                        (PlankDrawingDockSurface *self);

Create a copy of the surface

self :

the PlankDrawingDockSurface instance

Returns :

copy of this surface

plank_drawing_dock_surface_to_pixbuf ()

GdkPixbuf *         plank_drawing_dock_surface_to_pixbuf
                                                        (PlankDrawingDockSurface *self);

Saves the current dock surface to a GdkPixbuf.

self :

the PlankDrawingDockSurface instance

Returns :

the GdkPixbuf

plank_drawing_dock_surface_create_mask ()

PlankDrawingDockSurface * plank_drawing_dock_surface_create_mask
                                                        (PlankDrawingDockSurface *self,
                                                         gdouble threshold,
                                                         GdkRectangle *extent);

Computes the mask of the surface.

self :

the PlankDrawingDockSurface instance

threshold :

 . value defining the minimum opacity [0.0 .. 1.0]. [in]

extent :

 . bounding box of the found mask. [out]

Returns :

a new surface containing the mask

plank_drawing_dock_surface_average_color ()

void                plank_drawing_dock_surface_average_color
                                                        (PlankDrawingDockSurface *self,
                                                         PlankDrawingColor *result);

Computes and returns the average color of the surface.

self :

the PlankDrawingDockSurface instance

Returns :

the average color of the surface

plank_drawing_dock_surface_fast_blur ()

void                plank_drawing_dock_surface_fast_blur
                                                        (PlankDrawingDockSurface *self,
                                                         gint radius,
                                                         gint process_count);

Performs a fast blur on the surface.

self :

the PlankDrawingDockSurface instance

radius :

 . the radius of the blur. [in]

process_count :

 . how many iterations to blur. [in]

plank_drawing_dock_surface_exponential_blur ()

void                plank_drawing_dock_surface_exponential_blur
                                                        (PlankDrawingDockSurface *self,
                                                         gint radius);

Performs an exponential blur on the surface.

self :

the PlankDrawingDockSurface instance

radius :

 . the radius of the blur. [in]

plank_drawing_dock_surface_gaussian_blur ()

void                plank_drawing_dock_surface_gaussian_blur
                                                        (PlankDrawingDockSurface *self,
                                                         gint radius);

Performs a gaussian blur on the surface. Note: This method is wickedly slow

self :

the PlankDrawingDockSurface instance

radius :

 . the radius of the blur. [in]

plank_drawing_dock_surface_new ()

PlankDrawingDockSurface * plank_drawing_dock_surface_new
                                                        (gint width,
                                                         gint height);

Creates a new dock surface.

width :

 . width of the new surface. [in]

height :

 . height of the new surface. [in]

plank_drawing_dock_surface_new_with_surface ()

PlankDrawingDockSurface * plank_drawing_dock_surface_new_with_surface
                                                        (gint width,
                                                         gint height,
                                                         cairo_surface_t *model);

Creates a new dock surface compatible with an existing cairo_surface_t.

width :

 . width of the new surface. [in]

height :

 . height of the new surface. [in]

model :

 . existing cairo_surface_t to be similar to. [in]

plank_drawing_dock_surface_new_with_dock_surface ()

PlankDrawingDockSurface * plank_drawing_dock_surface_new_with_dock_surface
                                                        (gint width,
                                                         gint height,
                                                         PlankDrawingDockSurface *model);

Creates a new dock surface compatible with an existing PlankDrawingDockSurface.

width :

 . width of the new surface. [in]

height :

 . height of the new surface. [in]

model :

 . existing PlankDrawingDockSurface to be similar to. [in]

plank_drawing_dock_surface_new_with_internal ()

PlankDrawingDockSurface * plank_drawing_dock_surface_new_with_internal
                                                        (cairo_surface_t *image);

Creates a new dock surface with the given cairo_surface_t as Internal.

image :

 . existing cairo_surface_t as Internal. [in]

plank_drawing_dock_surface_get_Internal ()

cairo_surface_t *   plank_drawing_dock_surface_get_Internal
                                                        (PlankDrawingDockSurface *self);

Get and return the current value of the "Internal" property.

The internal cairo_surface_t backing the dock surface.

self :

the PlankDrawingDockSurface instance to query

Returns :

the value of the "Internal" property

plank_drawing_dock_surface_get_Width ()

gint                plank_drawing_dock_surface_get_Width
                                                        (PlankDrawingDockSurface *self);

Get and return the current value of the "Width" property.

The width of the surface.

self :

the PlankDrawingDockSurface instance to query

Returns :

the value of the "Width" property

plank_drawing_dock_surface_get_Height ()

gint                plank_drawing_dock_surface_get_Height
                                                        (PlankDrawingDockSurface *self);

Get and return the current value of the "Height" property.

The height of the surface.

self :

the PlankDrawingDockSurface instance to query

Returns :

the value of the "Height" property

plank_drawing_dock_surface_get_Context ()

cairo_t *           plank_drawing_dock_surface_get_Context
                                                        (PlankDrawingDockSurface *self);

Get and return the current value of the "Context" property.

A cairo_t for the dock surface.

self :

the PlankDrawingDockSurface instance to query

Returns :

the value of the "Context" property

struct PlankDrawingDockSurface

struct PlankDrawingDockSurface;

A dock surface is a wrapper class for a cairo_surface_t. It encapsulates a surface/context and provides utility methods.


struct PlankDrawingDockSurfaceClass

struct PlankDrawingDockSurfaceClass {
	GObjectClass parent_class;
};

The class structure for PLANK_DRAWING_TYPE_DOCK_SURFACE. All the fields in this structure are private and should never be accessed directly.

GObjectClass parent_class;

the parent class structure

Property Details

The "Context" property

  "Context"                  gpointer              : Read / Write / Construct Only

A cairo_t for the dock surface.


The "Height" property

  "Height"                   gint                  : Read / Write / Construct Only

The height of the surface.

Default value: 0


The "Internal" property

  "Internal"                 gpointer              : Read / Write / Construct Only

The internal cairo_surface_t backing the dock surface.


The "Width" property

  "Width"                    gint                  : Read / Write / Construct Only

The width of the surface.

Default value: 0