GimpCanvas

GimpCanvas

Synopsis

#define             GIMP_CANVAS_EVENT_MASK
                    GimpCanvas;
GtkWidget *         gimp_canvas_new                     (GimpDisplayConfig *config);
PangoLayout *       gimp_canvas_get_layout              (GimpCanvas *canvas,
                                                         const gchar *format,
                                                         ...);
void                gimp_canvas_set_bg_color            (GimpCanvas *canvas,
                                                         GimpRGB *color);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GimpOverlayBox
                                 +----GimpCanvas

Implemented Interfaces

GimpCanvas implements AtkImplementorIface and GtkBuildable.

Properties

  "config"                   GimpDisplayConfig*    : Read / Write / Construct Only

Description

Details

GIMP_CANVAS_EVENT_MASK

#define             GIMP_CANVAS_EVENT_MASK


GimpCanvas

typedef struct _GimpCanvas GimpCanvas;


gimp_canvas_new ()

GtkWidget *         gimp_canvas_new                     (GimpDisplayConfig *config);

Creates a new GimpCanvas widget.

The GimpCanvas widget is a GtkDrawingArea abstraction. It manages a set of graphic contexts for drawing on a GIMP display. If you draw using a GimpCanvasStyle, GimpCanvas makes sure that the associated GdkGC is created. All drawing on the canvas needs to happen by means of the GimpCanvas drawing functions. Besides from not needing a GdkGC pointer, the GimpCanvas drawing functions look and work like their GdkDrawable counterparts. GimpCanvas gracefully handles attempts to draw on the unrealized widget.

Returns :

a new GimpCanvas widget

gimp_canvas_get_layout ()

PangoLayout *       gimp_canvas_get_layout              (GimpCanvas *canvas,
                                                         const gchar *format,
                                                         ...);

Returns a layout which can be used for pango_cairo_show_layout(). The layout belongs to the canvas and should not be freed, not should a pointer to it be kept around after drawing.

canvas :

a GimpCanvas widget

format :

a standard printf() format string.

Returns :

a PangoLayout owned by the canvas.

gimp_canvas_set_bg_color ()

void                gimp_canvas_set_bg_color            (GimpCanvas *canvas,
                                                         GimpRGB *color);

Sets the background color of the canvas's window. This is the color the canvas is set to if it is cleared.

canvas :

a GimpCanvas widget

color :

a color in GimpRGB format

Property Details

The "config" property

  "config"                   GimpDisplayConfig*    : Read / Write / Construct Only