GimpCanvasItem

GimpCanvasItem

Synopsis

struct              GimpCanvasItemClass;
                    GimpCanvasItem;
void                gimp_canvas_item_draw               (GimpCanvasItem *item,
                                                         cairo_t *cr);
cairo_region_t *    gimp_canvas_item_get_extents        (GimpCanvasItem *item);
gboolean            gimp_canvas_item_hit                (GimpCanvasItem *item,
                                                         gdouble x,
                                                         gdouble y);
void                gimp_canvas_item_set_visible        (GimpCanvasItem *item,
                                                         gboolean visible);
gboolean            gimp_canvas_item_get_visible        (GimpCanvasItem *item);
void                gimp_canvas_item_set_line_cap       (GimpCanvasItem *item,
                                                         cairo_line_cap_t line_cap);
void                gimp_canvas_item_set_highlight      (GimpCanvasItem *item,
                                                         gboolean highlight);
gboolean            gimp_canvas_item_get_highlight      (GimpCanvasItem *item);
void                gimp_canvas_item_begin_change       (GimpCanvasItem *item);
void                gimp_canvas_item_end_change         (GimpCanvasItem *item);
void                gimp_canvas_item_suspend_stroking   (GimpCanvasItem *item);
void                gimp_canvas_item_resume_stroking    (GimpCanvasItem *item);
void                gimp_canvas_item_suspend_filling    (GimpCanvasItem *item);
void                gimp_canvas_item_resume_filling     (GimpCanvasItem *item);

Object Hierarchy

  GObject
   +----GimpObject
         +----GimpCanvasItem
               +----GimpCanvasArc
               +----GimpCanvasBoundary
               +----GimpCanvasCorner
               +----GimpCanvasCursor
               +----GimpCanvasGrid
               +----GimpCanvasGroup
               +----GimpCanvasGuide
               +----GimpCanvasHandle
               +----GimpCanvasRectangle
               +----GimpCanvasLine
               +----GimpCanvasPath
               +----GimpCanvasPolygon
               +----GimpCanvasProgress
               +----GimpCanvasRectangleGuides
               +----GimpCanvasSamplePoint
               +----GimpCanvasTextCursor
               +----GimpCanvasTransformGuides
               +----GimpCanvasTransformPreview

Properties

  "highlight"                gboolean              : Read / Write
  "line-cap"                 gint                  : Read / Write
  "shell"                    GimpDisplayShell*     : Read / Write / Construct Only
  "visible"                  gboolean              : Read / Write

Signals

  "update"                                         : Run First

Description

Details

struct GimpCanvasItemClass

struct GimpCanvasItemClass {
  GimpObjectClass  parent_class;

  /*  signals  */
  void             (* update)      (GimpCanvasItem   *item,
                                    cairo_region_t   *region);

  /*  virtual functions  */
  void             (* draw)        (GimpCanvasItem   *item,
                                    GimpDisplayShell *shell,
                                    cairo_t          *cr);
  cairo_region_t * (* get_extents) (GimpCanvasItem   *item,
                                    GimpDisplayShell *shell);

  void             (* stroke)      (GimpCanvasItem   *item,
                                    GimpDisplayShell *shell,
                                    cairo_t          *cr);
  void             (* fill)        (GimpCanvasItem   *item,
                                    GimpDisplayShell *shell,
                                    cairo_t          *cr);

  gboolean         (* hit)         (GimpCanvasItem   *item,
                                    GimpDisplayShell *shell,
                                    gdouble           x,
                                    gdouble           y);
};


GimpCanvasItem

typedef struct _GimpCanvasItem GimpCanvasItem;


gimp_canvas_item_draw ()

void                gimp_canvas_item_draw               (GimpCanvasItem *item,
                                                         cairo_t *cr);


gimp_canvas_item_get_extents ()

cairo_region_t *    gimp_canvas_item_get_extents        (GimpCanvasItem *item);


gimp_canvas_item_hit ()

gboolean            gimp_canvas_item_hit                (GimpCanvasItem *item,
                                                         gdouble x,
                                                         gdouble y);


gimp_canvas_item_set_visible ()

void                gimp_canvas_item_set_visible        (GimpCanvasItem *item,
                                                         gboolean visible);


gimp_canvas_item_get_visible ()

gboolean            gimp_canvas_item_get_visible        (GimpCanvasItem *item);


gimp_canvas_item_set_line_cap ()

void                gimp_canvas_item_set_line_cap       (GimpCanvasItem *item,
                                                         cairo_line_cap_t line_cap);


gimp_canvas_item_set_highlight ()

void                gimp_canvas_item_set_highlight      (GimpCanvasItem *item,
                                                         gboolean highlight);


gimp_canvas_item_get_highlight ()

gboolean            gimp_canvas_item_get_highlight      (GimpCanvasItem *item);


gimp_canvas_item_begin_change ()

void                gimp_canvas_item_begin_change       (GimpCanvasItem *item);


gimp_canvas_item_end_change ()

void                gimp_canvas_item_end_change         (GimpCanvasItem *item);


gimp_canvas_item_suspend_stroking ()

void                gimp_canvas_item_suspend_stroking   (GimpCanvasItem *item);


gimp_canvas_item_resume_stroking ()

void                gimp_canvas_item_resume_stroking    (GimpCanvasItem *item);


gimp_canvas_item_suspend_filling ()

void                gimp_canvas_item_suspend_filling    (GimpCanvasItem *item);


gimp_canvas_item_resume_filling ()

void                gimp_canvas_item_resume_filling     (GimpCanvasItem *item);

Property Details

The "highlight" property

  "highlight"                gboolean              : Read / Write

Default value: FALSE


The "line-cap" property

  "line-cap"                 gint                  : Read / Write

Allowed values: [0,2]

Default value: 1


The "shell" property

  "shell"                    GimpDisplayShell*     : Read / Write / Construct Only


The "visible" property

  "visible"                  gboolean              : Read / Write

Default value: TRUE

Signal Details

The "update" signal

void                user_function                      (GimpCanvasItem *gimpcanvasitem,
                                                        gpointer        arg1,
                                                        gpointer        user_data)           : Run First

gimpcanvasitem :

the object which received the signal.

user_data :

user data set when the signal handler was connected.