GooData Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
GooCurve2dGooCurve2d — a curve on a rectangle background (scaled by at least one GooAxis). |
struct GooCurve2d; struct GooCurve2dClass; GooCurve2d * goo_curve2d_new (,
GooCanvasItem *ParentGooAxis *AxisX
,GooAxis *AxisY
,GooDataPoints *Dat
,...
);void goo_curve2d_get_area_properties (GooCurve2d *Curve2d
,...
);void goo_curve2d_get_errors_properties (GooCurve2d *Curve2d
,...
);void goo_curve2d_get_markers_properties (GooCurve2d *Curve2d
,...
);void goo_curve2d_get_perpens_properties (GooCurve2d *Curve2d
,...
);void goo_curve2d_get_vectors_properties (GooCurve2d *Curve2d
,...
);void goo_curve2d_set_area_properties (GooCurve2d *Curve2d
,...
);void goo_curve2d_set_errors_properties (GooCurve2d *Curve2d
,...
);void goo_curve2d_set_markers_properties (GooCurve2d *Curve2d
,...
);void goo_curve2d_set_perpens_properties (GooCurve2d *Curve2d
,...
);void goo_curve2d_set_vectors_properties (GooCurve2d *Curve2d
,...
);
"area-direction"gchar : Read / Write "area-linetype"gchar : Read / Write "channels"gchar : Read / Write "errors"gchar : Read / Write "line-type"gchar : Read / Write "markers"gchar : Read / Write "perpendiculars"gchar : Read / Write "vectors"gchar : Read / Write
GooCurve2d is a subclass of goo_canvas_item_raise()
goo_canvas_item_rotate()
To create a GooCurve2d use goo_curve2d_new()
.
Setting a style property on a GooCurve2d will affect all children in the GooCurve2d group (unless the children override the property setting).
The GooCurve2d group contains these childs:
a
a
a
a
a
a
The childrens are drawn in the given order, so the vectors will be on top and the area is in the background. It's unlikely to use all childs at once. By default just the curve line gets drawn.
To set or get individual properties for the childs use the functions goo_curve2d_[get|set]_XYZ_properties with XYZ for area, perpens, markers, errors and vectors. The remaining item (curve line) is contolled directly by the GooCurve2d properties.
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 GooCurve2d. Instead put the background box, the GooAxis and the
GooCurve2d in to a
struct GooCurve2dClass;
The
GooCurve2d * goo_curve2d_new (,
GooCanvasItem *ParentGooAxis *AxisX
,GooAxis *AxisY
,GooDataPoints *Dat
,...
);
Creates a new curve item.
|
the parent item, or NULL g_object_unref() |
|
the X axis to scale the data |
|
the Y axis to scale the data |
|
the data values to draw with |
|
optional pairs of property names and values, and a terminating NULL |
Returns : |
a new curve2d item. [transfer full] |
Since 0.0
void goo_curve2d_get_area_properties (GooCurve2d *Curve2d
,...
);
Get one or more properties of the areas
|
a GooCurve2d |
|
optional pairs of property names and values, and a terminating NULL |
Since 0.0
void goo_curve2d_get_errors_properties (GooCurve2d *Curve2d
,...
);
Get one or more properties of the errors
|
a GooCurve2d |
|
optional pairs of property names and values, and a terminating NULL |
Since 0.0
void goo_curve2d_get_markers_properties (GooCurve2d *Curve2d
,...
);
Get one or more properties of the markers
|
a GooCurve2d |
|
optional pairs of property names and values, and a terminating NULL |
Since 0.0
void goo_curve2d_get_perpens_properties (GooCurve2d *Curve2d
,...
);
Get one or more properties of the perpendiculars
|
a GooCurve2d |
|
optional pairs of property names and values, and a terminating NULL |
Since 0.0
void goo_curve2d_get_vectors_properties (GooCurve2d *Curve2d
,...
);
Get one or more properties of the vectors
|
a GooCurve2d |
|
optional pairs of property names and values, and a terminating NULL |
Since 0.0
void goo_curve2d_set_area_properties (GooCurve2d *Curve2d
,...
);
Set one or more properties for the areas
|
a GooCurve2d |
|
optional pairs of property names and values, and a terminating NULL |
Since 0.0
void goo_curve2d_set_errors_properties (GooCurve2d *Curve2d
,...
);
Set one or more properties for the errors
|
a GooCurve2d |
|
optional pairs of property names and values, and a terminating NULL |
Since 0.0
void goo_curve2d_set_markers_properties (GooCurve2d *Curve2d
,...
);
Set one or more properties for the markers
|
a GooCurve2d |
|
optional pairs of property names and values, and a terminating NULL |
Since 0.0
void goo_curve2d_set_perpens_properties (GooCurve2d *Curve2d
,...
);
Set one or more properties for the perpendiculars
|
a GooCurve2d |
|
optional pairs of property names and values, and a terminating NULL |
Since 0.0
void goo_curve2d_set_vectors_properties (GooCurve2d *Curve2d
,...
);
Set one or more properties for the vectors
|
a GooCurve2d |
|
optional pairs of property names and values, and a terminating NULL |
Since 0.0
"area-direction"
property"area-direction"gchar : Read / Write
Draw a colored area from the curve to a given line. This may contain
no value to draw no area (= default). Example "" or NULL
one of the start letters 'n', 'w', 's', 'e' (for north, west, ...) to draw the area to the given border of the background box. Example: "e" or "east".
the start letter 'x' and a value to draw the area to the given value at the X-axis. Example: "x 1.5".
the start letter 'y' and a value to draw the area to the given value at the Y-axis. Example: "y 1.5".
the start letter 'h' and a value to draw the area to the X-value of
the given channel in Dat
(the area is between both curves in horizontal
direction). Example: "h 3"
the start letter 'v' and a value to draw the area to the Y-value of
the given channel in Dat
(the area is between both curves in vertical
direction). Example: "v 3"
Default value: NULL
Since 0.0
"area-linetype"
property"area-linetype"gchar : Read / Write
The type of the areas curve line (ignored if
no value to draw the area curve by straight lines between the points in Dat
.
Example "" or NULL
the start letter "h" to draw a stepped curve (histrogram style), starting with a horizontal line. Example: "h" or "Horizontal".
the start letter "v" to draw a stepped curve (histrogram style), starting with a vertical line. Example: "v" or "Vertical".
the start letter "b" to draw a smooth curve (smoothing by a quadratic bezier curve). Example: "b" or "bezier".
the start letter "b" and a value in the range [0,1] to draw a smooth curve
(smoothing by cubic bezier curve). The value specifies a smoothing factor.
The bigger the value the smoother the line at the points. If the value is
outside the range it will be set to the nearest border. For details see
Default value: NULL
Since 0.0
"channels"
property"channels"gchar : Read / Write
The channels (columns) in the Dat
array for the values of the curve.
The first value is for X channel, the second is Y.
In case of an nagative value the position isn't red from the Dat
array.
Instead all values are placed equidistantly on the axis in the given order.
This may contain
no value to use default channels (X = 0, Y = 1). Example "" or NULL
one value to set the Y-channel, X is set to -1. Example: "3" (is equal to "-1 3").
two values to set both, the X and the Y channel. Example: "7 9" for X-channel = 7 and Y-channel = 9.
When a channel number is greater than the number of columns in Dat
no curve will be drawn.
Default value: NULL
Since 0.0
"errors"
property"errors"gchar : Read / Write
The size and the channels for error markers. An error marker is a
T-shaped line drawn in positive or negative X- or Y-direction to
show the possible error at a point. Each direction may have its
own channel in Dat
. But the same channel also can be used to draw error
markers equidistantly in more than one direction. This may contain:
no value to draw no error lines (= default). Example "" or NULL
one value for the line size and one channel to drawn error lines equidistantly above and below the point.
one value for the line size and two channels to drawn error lines above and below the point. The first channel sets the distance for the upper line and the second channel sets the lower error line.
one value for the line size and three channels to drawn error lines above and below the point and equidistantly to the left and right. The first two channels set the vertical distances and the third channel sets the equidistant right and left error line.
one value for the line size and four channels to drawn individual error lines above, below, left and right the point. The first pair of channels set the vertical distances and the second pair set the horizontal distances of the error lines.
The size value has to be set for each direction. It specifies the width of the T-shaped line in global scale. If the size is smaller or equal to 0.0 the default value of 8.0 is set.
The distances of the error lines are scalled by the corresponding GooAxis,
so Dat
should contain the error values in the same scale as the points. Note:
you can use variable sized markers (property
To omit the error lines in one direction set the corresponding channel to -1.
Negative values in the Dat
error channels will be scaled by -1 before
drawing the error markers.
Default value: NULL
Since 0.0
"line-type"
property"line-type"gchar : Read / Write
The type of the curve line. This may contain:
no value to draw the curve by straight lines between the points in Dat
.
Example "" or NULL
the start letter "n" to draw no curve. Example: "n" or "none".
the start letter "h" to draw a stepped curve (histrogram style), starting with a horizontal line. Example: "h" or "Horizontal".
the start letter "v" to draw a stepped curve (histrogram style), starting with a vertical line. Example: "v" or "Vertical".
the start letter "b" to draw a smooth curve by a quadratic bezier curve. Example: "b" or "bezier".
the start letter "b" and a value in the range [0,1] to draw a smooth curve by a cubic bezier curve with (if the value is outside the range it will be set to the nearest border). Example: "b 0.6" or "bezier 0.6".
In case of a cubic bezier curve the value sets a form factor, used to specify
the distance of the computed bezier points from the given curve points. A high
form factor makes the line moderately curved at the Dat
points. The factor
1.0 sets a distance of 50 % of the line length between the Dat
points.
The factor 0.0 sets no distance between curve points and bezier points
(equals to a straight line).
Default value: NULL
Since 0.0
"markers"
property"markers"gchar : Read / Write
The size and the type of the markers. This may contain
no value for no markers: Example: NULL
one value for markers in this fixed size, scaled in global scaling. Example: "14"
two values for fixed marker size (global scaling) and marker type
(GooDataMarkers
). Example: "14 " & GOO_MARKER_CROSS
the start letter 'c' and a value to set a channel to read the
marker size from. The markers will be variable scaled by the values of
the given channel in Dat
. Global scalling is used as in the Dat
.
the start letter 'c' and two values to set a channel
(marker size) and the marker type.
Example "Channel 2 " & GOO_MARKER_FLOWER to generate flower markers
for size values red from channel 2 in Dat
.
the start letter 'c' and three values to set a channel
(marker size), the marker type and a scaling factor.
Example "Channel 2 " & GOO_MARKER_CIRCLE & " 3.5" to generate circle
markers of the size values red from channel 2 in Dat
and scaled by 3.5.
the start letter 'd' to generate default markers (GOO_MARKER_CIRCLE
)
in default size (8.0). Example "d" or "Default"
the start letter 'd' and a marker type (GooDataMarkers
) to generate
the specified marker type in default size (8.0).
Example "d " & GOO_MARKER_CROSS
If the marker type specification (if any) is outside the range of
GooDataMarkers
the standard marker type is used (GOO_MARKER_CIRCLE
).
Default value: NULL
Since 0.0
"perpendiculars"
property"perpendiculars"gchar : Read / Write
Draw perpendiculars from the curve points to a given direction and value. This may contain
no value to draw no perpendiculars (= default). Example "" or NULL
one of the start letters 'n', 'w', 's', 'e' (for north, west, ...) to draw perpendiculars to the given border of the background box. Example: "e" or "east".
the start letter 'x' and a value to draw perpendiculars to the given value at the X-axis. Example: "x -1.5".
the start letter 'y' and a value to draw perpendiculars to the given value at the Y-axis. Example: "y -1.5".
the start letter 'h' and a value to draw perpendiculars to the X-value of
the given channel in Dat
(the perpendiculars are between both curves in horizontal
direction). Example: "H 3"
the start letter 'v' and a value to draw perpendiculars to the Y-value of
the given channel in Dat
(the perpendiculars are between both curves in vertical
direction). Example: "V 3"
Default value: NULL
Since 0.0
"vectors"
property"vectors"gchar : Read / Write
The channels for vectors. A vector is a straight line drawn to either a slope value or a direction specified by the X- and Y-value of two vector channels. This may contain:
no value to draw no vector lines (= default). Example "" or NULL
two values for the channels in Dat
to read the difference vector
from.
The start letter 'z' and one or two values for the channel in Dat
to read slope value and the optional length of the slope line
(defaults to 8).
The difference vectors are scalled by the corresponding GooAxis,
so Dat
should contain the vector values in the same scale as the points.
Default value: NULL
Since 0.0