summaryrefslogtreecommitdiffstats
path: root/src/sp-guide.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2011-08-27 16:05:32 +0000
committerKrzysztof Kosinski <tweenk.pl@gmail.com>2011-08-27 16:05:32 +0000
commitd6af1140ee108cc7d7fb6e0ba89ff7e30bb7ad3a (patch)
tree69ea9c65f725d83ae1bc267ea5a0358a1bc1d793 /src/sp-guide.cpp
parentRemove all NRRect use. (diff)
downloadinkscape-d6af1140ee108cc7d7fb6e0ba89ff7e30bb7ad3a.tar.gz
inkscape-d6af1140ee108cc7d7fb6e0ba89ff7e30bb7ad3a.zip
Completely remove NRRect, NRRectL, in-svg-plane.h
(bzr r10582.1.6)
Diffstat (limited to 'src/sp-guide.cpp')
-rw-r--r--src/sp-guide.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/sp-guide.cpp b/src/sp-guide.cpp
index a06d098d0..5d30800d6 100644
--- a/src/sp-guide.cpp
+++ b/src/sp-guide.cpp
@@ -116,7 +116,7 @@ static void sp_guide_class_init(SPGuideClass *gc)
static void sp_guide_init(SPGuide *guide)
{
- guide->normal_to_line = component_vectors[Geom::Y];
+ guide->normal_to_line = Geom::Point(0.,1.);
guide->point_on_line = Geom::Point(0.,0.);
guide->color = 0x0000ff7f;
guide->hicolor = 0xff00007f;
@@ -205,9 +205,9 @@ static void sp_guide_set(SPObject *object, unsigned int key, const gchar *value)
{
if (value && !strcmp(value, "horizontal")) {
/* Visual representation of a horizontal line, constrain vertically (y coordinate). */
- guide->normal_to_line = component_vectors[Geom::Y];
+ guide->normal_to_line = Geom::Point(0., 1.);
} else if (value && !strcmp(value, "vertical")) {
- guide->normal_to_line = component_vectors[Geom::X];
+ guide->normal_to_line = Geom::Point(1., 0.);
} else if (value) {
gchar ** strarray = g_strsplit(value, ",", 2);
double newx, newy;
@@ -220,11 +220,11 @@ static void sp_guide_set(SPObject *object, unsigned int key, const gchar *value)
guide->normal_to_line = direction;
} else {
// default to vertical line for bad arguments
- guide->normal_to_line = component_vectors[Geom::X];
+ guide->normal_to_line = Geom::Point(1., 0.);
}
} else {
// default to vertical line for bad arguments
- guide->normal_to_line = component_vectors[Geom::X];
+ guide->normal_to_line = Geom::Point(1., 0.);
}
sp_guide_set_normal(*guide, guide->normal_to_line, false);
}
@@ -493,11 +493,11 @@ char *sp_guide_description(SPGuide const *guide, const bool verbose)
gchar *shortcuts = g_strdup_printf("; %s", _("<b>Shift+drag</b> to rotate, <b>Ctrl+drag</b> to move origin, <b>Del</b> to delete"));
- if ( are_near(guide->normal_to_line, component_vectors[X]) ||
- are_near(guide->normal_to_line, -component_vectors[X]) ) {
+ if ( are_near(guide->normal_to_line, Geom::Point(1., 0.)) ||
+ are_near(guide->normal_to_line, -Geom::Point(1., 0.)) ) {
descr = g_strdup_printf(_("vertical, at %s"), position_string_x->str);
- } else if ( are_near(guide->normal_to_line, component_vectors[Y]) ||
- are_near(guide->normal_to_line, -component_vectors[Y]) ) {
+ } else if ( are_near(guide->normal_to_line, Geom::Point(0., 1.)) ||
+ are_near(guide->normal_to_line, -Geom::Point(0., 1.)) ) {
descr = g_strdup_printf(_("horizontal, at %s"), position_string_y->str);
} else {
double const radians = guide->angle();