manpagez: man pages & more
html files: goffice
Home | html | info | man

GocStyledItem

GocStyledItem — Styled items

Object Hierarchy

  GObject
   +----GocItem
         +----GocStyledItem
               +----GocArc
               +----GocCircle
               +----GocEllipse
               +----GocLine
               +----GocPath
               +----GocPolygon
               +----GocPolyline
               +----GocRectangle
               +----GocText

Implemented Interfaces

GocStyledItem implements GOStyledObject.

Properties

  "scale-line-width"         gboolean              : Read / Write
  "style"                    GOStyle*              : Read / Write

Signals

  "style-changed"                                  : Run Last

Description

The virtual base object for canvas items with style.

Details

GocStyledItem

typedef struct _GocStyledItem GocStyledItem;


GocStyledItemClass

typedef struct {
	/* virtual */
	void	  (*init_style)     	(GocStyledItem *item, GOStyle *style);
} GocStyledItemClass;

init_style ()

style initialization handler.

goc_styled_item_set_cairo_line ()

gboolean            goc_styled_item_set_cairo_line      (GocStyledItem const *gsi,
                                                         cairo_t *cr);

Prepares the cairo context cr to draw a line according to the item style and canvas scale. The line width is scaled only if the scale-line-width property is set to TRUE. This function calls go_styled_object_set_cairo_line().

If the item drawing used goc_group_cairo_transform(), scale-line-width should be FALSE to avoid scaling twice, or go_styled_object_set_cairo_line() should be called directly instead.

gsi :

GocStyledItem

cr :

cairo_t

Returns :

TRUE if the line is not invisible

Property Details

The "scale-line-width" property

  "scale-line-width"         gboolean              : Read / Write

Whether to scale the line width when zooming.

Default value: TRUE


The "style" property

  "style"                    GOStyle*              : Read / Write

A pointer to the GOStyle object.

Signal Details

The "style-changed" signal

void                user_function                      (GocStyledItem *gsi,
                                                        GObject       *style,
                                                        gpointer       user_data)      : Run Last

The ::style-changed signal is emitted when a new style has been set on a styled item.

gsi :

the object on which the signal is emitted

style :

the new GOStyle.

user_data :

user data set when the signal handler was connected.
© manpagez.com 2000-2024
Individual documents may contain additional copyright information.