Top | ![]() |
![]() |
![]() |
![]() |
GwyVectorLayer * | gwy_layer_quad_new () |
gint | gwy_layer_quad_get_n_lines () |
void | gwy_layer_quad_set_n_lines () |
gboolean | gwy_layer_quad_get_convex () |
void | gwy_layer_quad_set_convex () |
GObject ╰── GInitiallyUnowned ╰── GwyDataViewLayer ╰── GwyVectorLayer ╰── GwyLayerQuad
GwyLayerQuad allows selection of general quadrilaterals. It uses GwySelectionQuad selection type.
When it represents a projective transformation of a rectangle, it should be convex and GwyLayerQuad:n-lines can be used to give a more refined view of the perspective transformation using subdivision lines. For the selection of arbitrary quadrilaterals, GwyLayerQuad:n-lines should be zero.
The quadrilateral selection needs to be initialised. The layer can only edit a quadrilateral selection; it cannot create one from scratch.
GwyVectorLayer *
gwy_layer_quad_new (void
);
Creates a new quadrilateral vector layer.
gint
gwy_layer_quad_get_n_lines (GwyLayerQuad *layer
);
Gets the number of refinement lines of a quadrilateral vector layer.
void gwy_layer_quad_set_n_lines (GwyLayerQuad *layer
,gint n_lines
);
Sets the number of refinement lines of a quadrilateral vector layer.
The perimeter is always drawn. If n_lines
is zero nothing else is drawn. Otherwise n_lines
extra lines are drawn
in the interior between opposite sides, corresponding to the refinement of the quadrilateral as if it was the
result of a projective transformation of a rectangle.
gboolean
gwy_layer_quad_get_convex (GwyLayerQuad *layer
);
Reports whether a quadrilateral vector layer has visibly convex quads.
void gwy_layer_quad_set_convex (GwyLayerQuad *layer
,gboolean convex
);
Sets whether a quadrilateral vector layer only allows convex quadrilaterals.
If convex
is set to TRUE
the selection should not contain non-convex quadrilaterals. If it does, the behaviour
is undefined.