fb:porticula NoPaste
Bereichsgrafik in Gitterbox (GooData-Beispiel)
Uploader: | TJF |
Datum/Zeit: | 21.04.2012 20:03:13 |
Hinweis: Dieser Quelltext ist Bestandteil des Projekts GooData, zu dem es auf FreeBASIC-Portal.de eine Projektseite gibt.
' This is file ex_box_area.bas
'
' Licence: GPLv3
' (C) 2012 Thomas[ dot ]Freiherr[ at ]gmx[ dot ]net
VAR root = goo_canvas_group_new(Glob, _
"line_width", line_group, _
"font", "Arial", _
NULL)
VAR title = goo_canvas_text_new(root, _
"<span size=""xx-large"">"_
"Areas in a Grid Box" _
!"</span>\n", _
0.0, 0.0, W, GOO_CANVAS_ANCHOR_SW, _
"use_markup", TRUE, _
"alignment", PANGO_ALIGN_CENTER, _
NULL)
VAR grid = goo_canvas_rect_new(root, _
0.0, 0.0, W, H, _
"line_width", line_group, _
NULL)
VAR x = goo_axis_new(root, grid, Tx, GOO_GRIDAXIS_SOUTH, _
"borders", "-3.3 3.3", _
"ticks", "1", _
NULL)
goo_axis_set_grid_properties(x, _
"stroke_color", "lightgray", _
NULL)
VAR y = goo_axis_new(root, grid, Ty, GOO_GRIDAXIS_WEST, _
"text_offset", 7., _
"borders", "-1.15 1.15", _
"ticks", ".5", _
NULL)
goo_axis_set_grid_properties(y, _
"stroke_color", "lightgray", _
NULL)
VAR zz = goo_curve_new(root, x, y, Dat, 0, 2, 0, _
"stroke_color", "green", _
"area", "y0", _
NULL)
goo_curve_set_area_properties(zz, _
"fill-color-rgba", &h00C00030, _
NULL)
VAR z = goo_curve_new(root, x, y, Dat, 0, 1, 0, _
"fill_color", "lightred", _
"stroke_color", "red", _
"area", "y0", _
NULL)
goo_curve_set_area_properties(z, _
"fill-color-rgba", &hC0000030, _
NULL)