CanvasGridModel


Object Hierarchy:

Goo.CanvasGridModel Goo.CanvasGridModel Goo.CanvasGridModel Goo.CanvasItemModelSimple Goo.CanvasItemModelSimple Goo.CanvasItemModelSimple->Goo.CanvasGridModel GLib.Object GLib.Object GLib.Object->Goo.CanvasItemModelSimple Goo.CanvasItemModel Goo.CanvasItemModel Goo.CanvasItemModel->Goo.CanvasGridModel Goo.CanvasItemModel->Goo.CanvasItemModelSimple

Description:

[ CCode ( type_id = "goo_canvas_grid_model_get_type ()" ) ]
public class CanvasGridModel : CanvasItemModelSimple, CanvasItemModel

GooCanvasGridModel represents a model for grid items.

A grid consists of a number of equally-spaced horizontal and vertical grid lines, plus an optional border.

It is a subclass of CanvasItemModelSimple and so inherits all of the style properties such as "stroke-color", "fill-color" and "line-width".

It also implements the CanvasItemModel interface, so you can use the CanvasItemModel functions such as raise and rotate.

To create a CanvasGridModel use CanvasGridModel.

To get or set the properties of an existing CanvasGridModel, use @get and @set.

To respond to events such as mouse clicks on the grid you must connect to the signal handlers of the corresponding CanvasGrid objects. (See get_item and item_created.)

The grid's position and size is specified with the x, y, width and height properties.

The x_step and y_step properties specify the distance between grid lines. The x_offset and y_offset properties specify the distance before the first grid lines.

The horizontal or vertical grid lines can be hidden using the show_horz_grid_lines and show_vert_grid_lines properties.

The width of the border can be set using the border_width property. The border is drawn outside the area specified with the x, y, width and height properties.

Other properties allow the colors and widths of the grid lines to be set. The grid line color and width properties override the standard stroke_color and line_width properties, enabling different styles for horizontal and vertical grid lines.


Namespace: Goo
Package: goocanvas-2.0

Content:

Properties:

Creation methods:

Fields:

Inherited Members: