CrVector

CrVector — A simple two point line vector where the end point can be optionally drawn to device coordinates.

Synopsis

                    CrVector;
CrItem*             cr_vector_new                       (CrItem *parent,
                                                         double x,
                                                         double y,
                                                         double x2,
                                                         double y2,
                                                         const gchar *first_arg_name,
                                                         ...);

Object Hierarchy

  GObject
   +----CrItem
         +----CrPath
               +----CrVector

Properties

  "end-scaleable"            gboolean              : Read / Write
  "x2"                       gdouble               : Read / Write
  "y2"                       gdouble               : Read / Write

Description

The is a simple way to create a two point line vector. The only difference between this object and CrLine is that the "x2" and "y2" properties can be optionally referenced to device space.

Details

CrVector

typedef struct _CrVector CrVector;


cr_vector_new ()

CrItem*             cr_vector_new                       (CrItem *parent,
                                                         double x,
                                                         double y,
                                                         double x2,
                                                         double y2,
                                                         const gchar *first_arg_name,
                                                         ...);

A convenience function to create a simple line vector and add it to a canvas item parent group in one step.

parent :

The parent item.

x :

The starting point of the vector.

y :

The starting point of the vector.

x2 :

The relative ending point of the vector along the x-axis.

y2 :

The relative ending point of the vector along the y-axis.

first_arg_name :

... :

Returns :

A reference to a new CrItem. You must call g_object_ref if you intend to use this reference outside the local scope.

Property Details

The "end-scaleable" property

  "end-scaleable"            gboolean              : Read / Write

True if the end of the vector is tied to item coordinate space. FALSE if the end of the vector is tied to device coordinate space.

Default value: TRUE


The "x2" property

  "x2"                       gdouble               : Read / Write

The length of the vector in the positive x-axis direction.

Default value: 0


The "y2" property

  "y2"                       gdouble               : Read / Write

The length of the vector in the positive y-axis direction.

Default value: 0