Goffice Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
Synopsis
GocGroup; GocGroupClass; GocGroup * goc_group_new (GocGroup *parent
); void goc_group_add_child (GocGroup *parent
,GocItem *item
); void goc_group_remove_child (GocGroup *parent
,GocItem *item
); void goc_group_clear (GocGroup *group
); void goc_group_adjust_bounds (GocGroup const *group
,double *x0
,double *y0
,double *x1
,double *y1
); void goc_group_adjust_coords (GocGroup const *group
,double *x
,double *y
); void goc_group_cairo_transform (GocGroup const *group
,cairo_t *cr
,double x
,double y
);
Description
A GocGroup is a GocItem which just contains other items.
The contents of the canvas are stored as a tree where GocGroup items are branches and other items are leafs.
Details
goc_group_new ()
GocGroup * goc_group_new (GocGroup *parent
);
Creates a new GocGroup as a child of parent
.
goc_group_add_child ()
void goc_group_add_child (GocGroup *parent
,GocItem *item
);
Adds item
as a new child to parent
.
goc_group_remove_child ()
void goc_group_remove_child (GocGroup *parent
,GocItem *item
);
Removes item
from parent
. This function will fail if item
is not a
child of parent
.
goc_group_clear ()
void goc_group_clear (GocGroup *group
);
Destroys all group
children.
|
GocGroup |
goc_group_adjust_bounds ()
void goc_group_adjust_bounds (GocGroup const *group
,double *x0
,double *y0
,double *x1
,double *y1
);
Adds group
horizontal offset to x0
and x1
, and vertical offset to y0
and y1
. This function is called recursively so that when returning x0
,
y0
, x1
, and y1
are absolute coordinates in canvas space,
|
GocGroup |
|
first horizontal coordinate |
|
first vertical coordinate |
|
last horizontal coordinate |
|
last vertical coordinate |
goc_group_adjust_coords ()
void goc_group_adjust_coords (GocGroup const *group
,double *x
,double *y
);
Adds group
horizontal offset to x0
, and vertical offset to y0
.
This function is called recursively so that when returning x0
and
y0
are absolute coordinates in canvas space,
|
GocGroup |
|
horizontal coordinate |
|
vertical coordinate |
goc_group_cairo_transform ()
void goc_group_cairo_transform (GocGroup const *group
,cairo_t *cr
,double x
,double y
);
Translates cr
current context so that operations start at (x
,y
), which
are group
relative coordinates, and is scaled according to the containing
GocCanvas current scale (see goc_canvas_get_pixels_per_unit()
). The
translation takes all group
ancestors into account.
This function does not call cairo_save()
.