22fceed4473560fc5cf79a09ed0d7375bd80a295
1 #ifndef SP_CANVAS_AXONOMGRID_H\r
2 #define SP_CANVAS_AXONOMGRID_H\r
3 \r
4 /*\r
5 * SPCAxonomGrid\r
6 *\r
7 * Generic (and quite unintelligent) modified copy of the grid item for gnome canvas\r
8 *\r
9 * Copyright (C) 2006 Johan Engelen <johan@shouraizou.nl>\r
10 * Copyright (C) 2000 Lauris Kaplinski 2000\r
11 *\r
12 */\r
13 \r
14 #include <display/sp-canvas.h>\r
15 #include <libnr/nr-coord.h>\r
16 \r
17 \r
18 #define SP_TYPE_CAXONOMGRID (sp_caxonomgrid_get_type ())\r
19 #define SP_CAXONOMGRID(obj) (GTK_CHECK_CAST ((obj), SP_TYPE_CAXONOMGRID, SPCAxonomGrid))\r
20 #define SP_CAXONOMGRID_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), SP_TYPE_CAXONOMGRID, SPCAxonomGridClass))\r
21 #define SP_IS_CAXONOMGRID(obj) (GTK_CHECK_TYPE ((obj), SP_TYPE_CAXONOMGRID))\r
22 #define SP_IS_CAXONOMGRID_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), SP_TYPE_CAXONOMGRID))\r
23 \r
24 \r
25 /** \brief All the variables that are tracked for a axonometric grid specific\r
26 canvas item. */\r
27 struct SPCAxonomGrid : public SPCanvasItem{\r
28 NR::Point origin; /**< Origin of the grid */\r
29 double lengthy; /**< The lengths of the primary y-axis */\r
30 double angle_deg[3]; /**< Angle of each axis (note that angle[2] == 0) */\r
31 double angle_rad[3]; /**< Angle of each axis (note that angle[2] == 0) */\r
32 double tan_angle[3]; /**< tan(angle[.]) */\r
33 guint32 color; /**< Color for normal lines */\r
34 guint32 empcolor; /**< Color for emphasis lines */\r
35 gint empspacing; /**< Spacing between emphasis lines */\r
36 bool scaled; /**< Whether the grid is in scaled mode */\r
37 \r
38 NR::Point ow; /**< Transformed origin by the affine for the zoom */\r
39 double lyw; /**< Transformed length y by the affine for the zoom */\r
40 double lxw_x;\r
41 double lxw_z;\r
42 double spacing_ylines;\r
43 \r
44 NR::Point sw; /**< the scaling factors of the affine transform */\r
45 };\r
46 \r
47 struct SPCAxonomGridClass {\r
48 SPCanvasItemClass parent_class;\r
49 };\r
50 \r
51 \r
52 /* Standard Gtk function */\r
53 GtkType sp_caxonomgrid_get_type (void);\r
54 \r
55 \r
56 \r
57 #endif \r
58 \r
59 \r