![]() |
![]() |
![]() |
GEGL-GTK Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <gegl-gtk.h> GeglGtkView * gegl_gtk_view_new (void
); GeglGtkView * gegl_gtk_view_new_for_node (GeglNode *node
); GeglNode * gegl_gtk_view_get_node (GeglGtkView *self
); void gegl_gtk_view_set_node (GeglGtkView *self
,GeglNode *node
); float gegl_gtk_view_get_x (GeglGtkView *self
); void gegl_gtk_view_set_x (GeglGtkView *self
,float x
); float gegl_gtk_view_get_y (GeglGtkView *self
); void gegl_gtk_view_set_y (GeglGtkView *self
,float y
); float gegl_gtk_view_get_scale (GeglGtkView *self
); void gegl_gtk_view_set_scale (GeglGtkView *self
,float scale
); void gegl_gtk_view_get_transformation (GeglGtkView *self
,GeglMatrix3 *matrix
); GeglGtkViewAutoscale gegl_gtk_view_get_autoscale_policy (GeglGtkView *self
); void gegl_gtk_view_set_autoscale_policy (GeglGtkView *self
,GeglGtkViewAutoscale autoscale
); enum GeglGtkViewAutoscale;
The view widget displays the output of a node in a GEGL graph. It will tracks changes in the node, and will therefore automatically show the correct content when the GEGL graph is changed.
For setting which GeglNode to display, use gegl_gtk_view_set_node()
,
or use the gegl_gtk_view_new_for_node()
convenience constructor.
Transformations:
The widget can show a transformed view of the GeglNode. Scaling and
transformations are supported, as well as autoscaling.
For manual control over the transformation see
methods gegl_gtk_view_set_scale()
, gegl_gtk_view_set_x()
and
gegl_gtk_view_set_y()
, or use the corresponding properties.
For changing the autoscaling behavior, see
gegl_gtk_view_set_autoscale_policy()
For getting the effective affine transformation applied, use
gegl_gtk_view_get_transformation()
Examples:
In the GEGL-GTK example directories, you can find code examples for how to use GeglGtkView in files with names starting with gegl-gtk-view
GeglGtkView * gegl_gtk_view_new (void
);
Create a new GeglGtkView
Returns : |
New GeglGtkView |
GeglGtkView * gegl_gtk_view_new_for_node (GeglNode *node
);
Create a new GeglGtkView for a given GeglNode
|
The GeglNode to display |
Returns : |
New GeglGtkView displaying node
|
GeglNode * gegl_gtk_view_get_node (GeglGtkView *self
);
Get the displayed GeglNode
|
A GeglGtkView Returns: (transfer none): The GeglNode this widget displays |
void gegl_gtk_view_set_node (GeglGtkView *self
,GeglNode *node
);
Change the GeglNode to display
|
A GeglGtkView |
|
a GeglNode instance or NULL . [transfer full][allow-none]
|
float gegl_gtk_view_get_x (GeglGtkView *self
);
Getter for the :x property
|
A GeglGtkView |
void gegl_gtk_view_set_x (GeglGtkView *self
,float x
);
Setter for the :x property
|
A GeglGtkView |
float gegl_gtk_view_get_y (GeglGtkView *self
);
Getter for the :y property
|
A GeglGtkView |
void gegl_gtk_view_set_y (GeglGtkView *self
,float y
);
Setter for the :y property
|
A GeglGtkView |
float gegl_gtk_view_get_scale (GeglGtkView *self
);
Getter for the :scale property
|
A GeglGtkView |
void gegl_gtk_view_set_scale (GeglGtkView *self
,float scale
);
Setter for the :scale property
|
A GeglGtkView |
void gegl_gtk_view_get_transformation (GeglGtkView *self
,GeglMatrix3 *matrix
);
Get the model->view transformation
The transformation matrix describes the transformation between the
model (the output of the GeglNode) and the view (the display in the widget).
To transform coordinates use gegl_matrix3_transform_point()
.
To get a matrix representing the view->model space transformation, use gegl_matrix3_invert()
|
A GeglGtkView |
|
Pointer to location for transformation matrix. [out caller-allocates] |
GeglGtkViewAutoscale gegl_gtk_view_get_autoscale_policy (GeglGtkView *self
);
Get the autoscaling policy
|
A GeglGtkView |
Returns : |
Current GeglGtkViewAutoscale policy in use |
void gegl_gtk_view_set_autoscale_policy (GeglGtkView *self
,GeglGtkViewAutoscale autoscale
);
Set the autoscaling policy
|
A GeglGtkView |
|
GeglGtkViewAutoscale policy to use |