| crcanvas: A GTK/Cairo Canvas Widget | ||||
|---|---|---|---|---|
CrArrow;
CrItem* cr_arrow_new (CrItem *parent,
int point_id,
const gchar *first_arg_name,
...);
void cr_arrow_connect_parent (CrArrow *arrow,
CrItem *parent);
"angle" gdouble : Read / Write "depth" gdouble : Read / Write "fatness" gdouble : Read / Write "length" gdouble : Read / Write "point-id" gint : Read / Write "scaleable" gboolean : Read / Write "x-offset" gdouble : Read / Write "y-offset" gdouble : Read / Write
The arrow is typically used at the start or end of a line, but can be used independently or part of some other arrangement. The cr_arrow_new convenience constructor will automatically place the arrow on a point of the line segment if it is called with CrVector or CrLine as a parent group.
When the convenience constructor cr_arrow_new is used the "angle", "scaleable", "x_offset", "y_offset", "x", and "y" properties are set and updated automatically. When the arrow used in some other way, these properties need to be set-up by the user.
CrItem* cr_arrow_new (CrItem *parent, int point_id, const gchar *first_arg_name, ...);
A convenience function to create an arrow-head and add it to a canvas
item parent group in one step. If the item is added to a CrVector or a
CrLine parent, then most set-up will be taken care of automatically by this
constructor.
|
The parent item. |
|
Negative values count from the back and point toward the end. Positive values count from the front and point toward the beginning. Use 0 for a 'start' arrow and -1 for an 'end' arrow. This is only valid when parented to a CrLine or CrVector item. |
|
|
|
|
Returns : |
A reference to a new CrItem. You must call g_object_ref if you intend to use this reference outside the local scope. |
void cr_arrow_connect_parent (CrArrow *arrow, CrItem *parent);
Connects the arrow to a parent line or vector so it can automatically
align itself. Normally, when using the C convenience constructor
cr_arrow_new, it is not necessary to call this. The routine is here for
language bindings or where g_object_new is used.
"angle" property"angle" gdouble : Read / Write
The angle in radians to which the arrow points. Zero points East. Positive angles increase CW. When parented to #CrLine or #CrVector, this property will be set automatically.
Allowed values: [-3.14159,6.28319]
Default value: 0
"depth" property"depth" gdouble : Read / Write
The concaveness or convexness if negative.
Default value: 3
"fatness" property"fatness" gdouble : Read / Write
How wide measured perpendicular to the pointing direction.
Default value: 7
"length" property"length" gdouble : Read / Write
How long from the tip to the end along the direction it is pointing.
Default value: 14
"point-id" property"point-id" gint : Read / Write
Negative values count from the back and point toward the end. Positive values count from the front and point toward the beginning. Use 0 for a 'start' arrow and -1 for an 'end' arrow. This is only valid when parented to a #CrLine or #CrVector item.
Allowed values: >= -2147483647
Default value: -1
"scaleable" property"scaleable" gboolean : Read / Write
If the arrow should scale to conform to item units. Setting this to FALSE will cause the arrow to always be the same size. When using the arrow with #CrLine or #CrVector, this will be set automatically to conform to the 'line-scaleable' property. See also #CrInverse for another way to achieve ths same effect.
Default value: TRUE
"x-offset" property"x-offset" gdouble : Read / Write
A device offset from the arrow's point. Only used when scaleable=FALSE.
Default value: 0
"y-offset" property"y-offset" gdouble : Read / Write
A device offset from the arrow's point. Only used when scaleable=FALSE.
Default value: 0