GooSimpleCurve2d

GooSimpleCurve2d — a simple curve scaled by at least one GooAxis.

Synopsis

struct              GooSimplecurve2d;
struct              GooSimplecurve2dClass;
GooCanvasItem *     goo_simplecurve2d_new               (GooCanvasItem *Parent,
                                                         GooAxis *AxisX,
                                                         GooAxis *AxisY,
                                                         GooDataPoints *Dat,
                                                         guint ChX,
                                                         guint ChY,
                                                         ...);

Description

GooSimplecurve2d is a subclass of GooCanvasPolyline and so inherits all of the style properties such as "stroke-color", "fill-color" and "line-width". It also inherits the GooCanvasItem interface, so you can use the GooCanvasItem functions such as goo_canvas_item_raise() and goo_canvas_item_rotate().

To create a GooSimplecurve2d use goo_simplecurve2d_new().

The position and the scale of the curve are connected to the GooAxis for X- and Y direction. Also the transformation matrix of the GooAxis is applied to the GooCurve2d. Note: it's not supported to move the GooAxis after creating the GooSimplecurve2d. Instead put the background box, the GooAxis and the GooSimplecurve2d in to a GooCanvasGroup and move the entire group.

In contrast to the GooCurve2d the GooSimplecurve2d doesn't support smooth lines, markers, error-markers, areas, perpendiculars or vectors. It's just a straight line between some points. But it's faster and it consumes less memory, so it should be prefered when you have to draw a huge amount of of points.

Details

struct GooSimplecurve2d

struct GooSimplecurve2d;

The GooSimplecurve2d struct contains private data only.


struct GooSimplecurve2dClass

struct GooSimplecurve2dClass;

The GooSimplecurve2dClass struct contains private data only.


goo_simplecurve2d_new ()

GooCanvasItem *     goo_simplecurve2d_new               (GooCanvasItem *Parent,
                                                         GooAxis *AxisX,
                                                         GooAxis *AxisY,
                                                         GooDataPoints *Dat,
                                                         guint ChX,
                                                         guint ChY,
                                                         ...);

Creates a new simple curve item.

The simple curve does support points scaled by one or two axis. If you need smooth lines, markers, error-markers, areas, perpendiculars or vectors, have a look at GooCurve2d.

To draw points only (and omit the lines between the points) a line dash has to be set. It have to have exact two entries, the first is 0.0 and the second is greater than the sum of both axis length (the height + width of the background box). Use CAIRO_LINE_CAP_ROUND or CAIRO_LINE_CAP_SQUARE with property "line-cap" to draw rounded or squared points.

Parent :

the parent item, or NULL. If a parent is specified, it will assume ownership of the item, and the item will automatically be freed when it is removed from the parent. Otherwise call g_object_unref() to free it.

AxisX :

the X axis to scale the data

AxisY :

the Y axis to scale the data

Dat :

the data values to draw with

ChX :

the channel number for X values in Dat

ChY :

the channel number for Y values in Dat

... :

optional pairs of property names and values, and a terminating NULL.

Returns :

a new Simplecurve2d item. [transfer full]

Since 0.0