From 16de6f228ecebe682f25f6567fabb5088aafee5f Mon Sep 17 00:00:00 2001 From: johanengelen Date: Sun, 2 Dec 2007 23:23:57 +0000 Subject: [PATCH] Improve default axonomgrid settings (colors, and spacing=1mm since it will be used for technical drawing probably. pixels seems like a strange default choice in that case) --- src/display/canvas-axonomgrid.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/display/canvas-axonomgrid.cpp b/src/display/canvas-axonomgrid.cpp index cd79e00bd..6bb5d47c0 100644 --- a/src/display/canvas-axonomgrid.cpp +++ b/src/display/canvas-axonomgrid.cpp @@ -40,6 +40,9 @@ #define SAFE_SETPIXEL //undefine this when it is certain that setpixel is never called with invalid params +#define DEFAULTGRIDCOLOR 0x0000FF20 +#define DEFAULTGRIDEMPCOLOR 0x0000FF50 + enum Dim3 { X=0, Y, Z }; #ifndef M_PI @@ -194,13 +197,13 @@ CanvasAxonomGrid::CanvasAxonomGrid (SPNamedView * nv, Inkscape::XML::Node * in_r : CanvasGrid(nv, in_repr, in_doc, GRID_AXONOMETRIC), table(1, 1) { origin[NR::X] = origin[NR::Y] = 0.0; - color = 0xff3f3f20; - empcolor = 0xFF3F3F40; + color = DEFAULTGRIDCOLOR; + empcolor = DEFAULTGRIDEMPCOLOR; empspacing = 5; - gridunit = &sp_unit_get_by_id(SP_UNIT_PX); + gridunit = &sp_unit_get_by_id(SP_UNIT_MM); angle_deg[X] = angle_deg[Z] = 30; angle_deg[Y] =0; - lengthy = 1; + lengthy = sp_units_get_pixels(1.0, *(gridunit)); angle_rad[X] = deg_to_rad(angle_deg[X]); tan_angle[X] = tan(angle_rad[X]); -- 2.30.2