Synopsis

#include <adg-1/adg.h>

struct              AdgArrow;
struct              AdgArrowClass;
AdgArrow *          adg_arrow_new                       (void);
AdgArrow *          adg_arrow_new_with_trail            (AdgTrail *trail,
                                                         gdouble pos);
void                adg_arrow_set_angle                 (AdgArrow *arrow,
                                                         gdouble angle);
gdouble             adg_arrow_get_angle                 (AdgArrow *arrow);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----AdgEntity
               +----AdgMarker
                     +----AdgArrow

Properties

  "angle"                    gdouble               : Read / Write

Description

Contains parameters on how to draw arrows, providing a way to register a custom rendering callback.

Note

By default, the "local-mix" property is set to ADG_MIX_PARENT on AdgArrow entities.

Details

struct AdgArrow

struct AdgArrow;

All fields are private and should not be used directly. Use its public methods instead.

Since 1.0


struct AdgArrowClass

struct AdgArrowClass {
};

adg_arrow_new ()

AdgArrow *          adg_arrow_new                       (void);

Creates a new undefined arrow entity. The position must be defined by setting the "trail" and "pos" properties.

Returns :

the newly created arrow entity

Since 1.0


adg_arrow_new_with_trail ()

AdgArrow *          adg_arrow_new_with_trail            (AdgTrail *trail,
                                                         gdouble pos);

Creates a new arrow on the first segment on trail at position pos, where pos is a ratio of the trail length (being 0 the start point, 1 the end point, 0.5 the middle point and so on). By default, an arrow as "local-mix" set to ADG_MIX_PARENT.

trail :

the AdgTrail where the arrow should be added

pos :

the position ratio on trail

Returns :

the newly created arrow entity

Since 1.0


adg_arrow_set_angle ()

void                adg_arrow_set_angle                 (AdgArrow *arrow,
                                                         gdouble angle);

Sets a new angle: angle will be the new opening angle of arrow. Changing the arrow angle will invalidate arrow.

arrow :

an AdgArrow

angle :

the new angle

Since 1.0


adg_arrow_get_angle ()

gdouble             adg_arrow_get_angle                 (AdgArrow *arrow);

Gets the current angle of arrow.

arrow :

an AdgArrow

Returns :

the arrow angle, in radians

Since 1.0

Property Details

The "angle" property

  "angle"                    gdouble               : Read / Write

The opening angle of the arrow.

Allowed values: [-3.14159,3.14159]

Default value: 0.523599