Code

NR:: => Geom:: for much of src/ui and src/widgets
[inkscape.git] / src / widgets / sp-color-wheel.cpp
index a318571016ce12c4f9d7e8976c90af46ed12b1a0..b565bd485ff59d25acc90166c3507f9ff42067a0 100644 (file)
@@ -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;