CanvasGridModel


Description:

[ CCode ( has_construct_function = false , type = "GooCanvasItemModel*" ) ]
public CanvasGridModel (CanvasItemModel? parent, double x, double y, double width, double height, double x_step, double y_step, double x_offset, double y_offset, ...)

Creates a new grid model.

Here's an example showing how to create a grid:

<informalexample><programlisting> GooCanvasItemModel *grid = goo_canvas_grid_model_new (mygroup, 100.0, 100.0, 400.0, 200.0, 20.0, 20.0, 10.0, 10.0, "horz-grid-line-width", 4.0, "horz-grid-line-color", "yellow", "vert-grid-line-width", 2.0, "vert-grid-line-color", "red", "border-width", 3.0, "border-color", "white", "fill-color", "blue", NULL); </programlisting>< /informalexample>

Parameters:

parent

the parent model, 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 unref to free it.

x

the x coordinate of the left of the grid.

y

the y coordinate of the top of the grid.

width

the width of the grid.

height

the height of the grid.

x_step

the distance between the vertical grid lines.

y_step

the distance between the horizontal grid lines.

x_offset

the distance before the first vertical grid line.

y_offset

the distance before the first horizontal grid line.

...

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

Returns:

a new grid model.




2022 vala-language.org