Code

comment fix
[inkscape.git] / src / display / canvas-grid.h
1 #ifndef INKSCAPE_CANVAS_GRID_H
2 #define INKSCAPE_CANVAS_GRID_H
4 /*
5  * Inkscape::CXYGrid
6  *
7  * Generic (and quite unintelligent) grid item for gnome canvas
8  *
9  * Copyright (C) Johan Engelen 2006 <johan@shouraizou.nl>
10  * Copyright (C) Lauris Kaplinski 2000
11  *
12  */
14 #include <display/sp-canvas.h>
16 namespace Inkscape {
18 #define INKSCAPE_TYPE_CXYGRID            (Inkscape::cxygrid_get_type ())
19 #define INKSCAPE_CXYGRID(obj)            (GTK_CHECK_CAST ((obj), INKSCAPE_TYPE_CXYGRID, CXYGrid))
20 #define INKSCAPE_CXYGRID_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), INKSCAPE_TYPE_CXYGRID, CXYGridClass))
21 #define INKSCAPE_IS_CXYGRID(obj)         (GTK_CHECK_TYPE ((obj), INKSCAPE_TYPE_CXYGRID))
22 #define INKSCAPE_IS_CXYGRID_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), INKSCAPE_TYPE_CXYGRID))
25 /** \brief  All the variables that are tracked for a grid specific
26             canvas item. */
27 struct CXYGrid : public SPCanvasItem{
28         NR::Point origin;  /**< Origin of the grid */
29         NR::Point spacing; /**< Spacing between elements of the grid */
30         guint32 color;     /**< Color for normal lines */
31         guint32 empcolor;  /**< Color for emphisis lines */
32         gint empspacing;   /**< Spacing between emphisis lines */
33         bool scaled[2];    /**< Whether the grid is in scaled mode, which can
34                                                 be different in the X or Y direction, hense two
35                                                     variables */
36         NR::Point ow;      /**< Transformed origin by the affine for the zoom */
37         NR::Point sw;      /**< Transformed spacing by the affine for the zoom */
38 };
40 struct CXYGridClass {
41         SPCanvasItemClass parent_class;
42 };
44 /* Standard Gtk function */
45 GtkType cxygrid_get_type (void);
47 }; /* namespace Inkscape */
52 #endif