summaryrefslogtreecommitdiffstats
path: root/src/widgets/sp-color-wheel.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2008-08-04 22:32:05 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2008-08-04 22:32:05 +0000
commit176622db4325921b8a52e4d4605452ef9ce41e5f (patch)
tree255086561d52361e075bafe4e452755f2e745d00 /src/widgets/sp-color-wheel.cpp
parentWhile drawing and constraining to specific angles (using CTRL): don't try a f... (diff)
downloadinkscape-176622db4325921b8a52e4d4605452ef9ce41e5f.tar.gz
inkscape-176622db4325921b8a52e4d4605452ef9ce41e5f.zip
NR:: => Geom:: for much of src/ui and src/widgets
(bzr r6561)
Diffstat (limited to 'src/widgets/sp-color-wheel.cpp')
-rw-r--r--src/widgets/sp-color-wheel.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/widgets/sp-color-wheel.cpp b/src/widgets/sp-color-wheel.cpp
index a31857101..b565bd485 100644
--- a/src/widgets/sp-color-wheel.cpp
+++ b/src/widgets/sp-color-wheel.cpp
@@ -21,6 +21,7 @@
#include "sp-color-wheel.h"
#include "libnr/nr-rotate-ops.h"
+#include <2geom/transforms.h>
#define WHEEL_SIZE 96
@@ -1131,17 +1132,17 @@ static void sp_color_wheel_process_in_triangle( SPColorWheel *wheel, gdouble x,
{
// njh: dot(rot90(B-C), x) = saturation
// njh: dot(B-C, x) = value
- NR::Point delta( x - (((gdouble)(wheel->_triPoints[1].x + wheel->_triPoints[2].x)) / 2.0),
+ Geom::Point delta( x - (((gdouble)(wheel->_triPoints[1].x + wheel->_triPoints[2].x)) / 2.0),
y - (((gdouble)(wheel->_triPoints[1].y + wheel->_triPoints[2].y)) / 2.0) );
gdouble rot = (M_PI * 2 * wheel->_hue );
- NR::Point result = delta * NR::rotate(rot);
+ Geom::Point result = delta * Geom::Rotate(rot);
- gdouble sat = CLAMP( result[NR::X] / (wheel->_inner * 1.5), 0.0, 1.0 );
+ gdouble sat = CLAMP( result[Geom::X] / (wheel->_inner * 1.5), 0.0, 1.0 );
gdouble halfHeight = (wheel->_inner * sin(M_PI/3.0)) * (1.0 - sat);
- gdouble value = CLAMP( ((result[NR::Y]+ halfHeight) / (2.0*halfHeight)), 0.0, 1.0 );
+ gdouble value = CLAMP( ((result[Geom::Y]+ halfHeight) / (2.0*halfHeight)), 0.0, 1.0 );
wheel->_triDirty = TRUE;