summaryrefslogtreecommitdiffstats
path: root/src/display/nr-light.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2011-06-20 19:33:57 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2011-06-20 19:33:57 +0000
commita39e3c37a508f9a389fc55270ae0336ad2f76f0e (patch)
tree952db81c3238005e975f21845734444bba28ff40 /src/display/nr-light.cpp
parentMeasure Tool: support measuring of text elements (without having to manually ... (diff)
parentFix outline view (diff)
downloadinkscape-a39e3c37a508f9a389fc55270ae0336ad2f76f0e.tar.gz
inkscape-a39e3c37a508f9a389fc55270ae0336ad2f76f0e.zip
Merge Cairo rendering branch
(bzr r10326)
Diffstat (limited to 'src/display/nr-light.cpp')
-rw-r--r--src/display/nr-light.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/display/nr-light.cpp b/src/display/nr-light.cpp
index 74d83da70..65912470d 100644
--- a/src/display/nr-light.cpp
+++ b/src/display/nr-light.cpp
@@ -13,12 +13,12 @@
#include <cmath>
-#include "libnr/nr-pixops.h"
#include "display/nr-light.h"
#include "display/nr-3dutils.h"
#include "filters/distantlight.h"
#include "filters/pointlight.h"
#include "filters/spotlight.h"
+#include "color.h"
namespace Inkscape {
namespace Filters {
@@ -38,9 +38,9 @@ void DistantLight::light_vector(NR::Fvector &v) {
}
void DistantLight::light_components(NR::Fvector &lc) {
- lc[LIGHT_RED] = NR_RGBA32_R(color);
- lc[LIGHT_GREEN] = NR_RGBA32_G(color);
- lc[LIGHT_BLUE] = NR_RGBA32_B(color);
+ lc[LIGHT_RED] = SP_RGBA32_R_U(color);
+ lc[LIGHT_GREEN] = SP_RGBA32_G_U(color);
+ lc[LIGHT_BLUE] = SP_RGBA32_B_U(color);
}
PointLight::PointLight(SPFePointLight *light, guint32 lighting_color, const Geom::Affine &trans) {
@@ -61,9 +61,9 @@ void PointLight::light_vector(NR::Fvector &v, gdouble x, gdouble y, gdouble z) {
}
void PointLight::light_components(NR::Fvector &lc) {
- lc[LIGHT_RED] = NR_RGBA32_R(color);
- lc[LIGHT_GREEN] = NR_RGBA32_G(color);
- lc[LIGHT_BLUE] = NR_RGBA32_B(color);
+ lc[LIGHT_RED] = SP_RGBA32_R_U(color);
+ lc[LIGHT_GREEN] = SP_RGBA32_G_U(color);
+ lc[LIGHT_BLUE] = SP_RGBA32_B_U(color);
}
SpotLight::SpotLight(SPFeSpotLight *light, guint32 lighting_color, const Geom::Affine &trans) {
@@ -101,9 +101,9 @@ void SpotLight::light_components(NR::Fvector &lc, const NR::Fvector &L) {
spmod = 0;
else
spmod = std::pow(spmod, speExp);
- lc[LIGHT_RED] = spmod * NR_RGBA32_R(color);
- lc[LIGHT_GREEN] = spmod * NR_RGBA32_G(color);
- lc[LIGHT_BLUE] = spmod * NR_RGBA32_B(color);
+ lc[LIGHT_RED] = spmod * SP_RGBA32_R_U(color);
+ lc[LIGHT_GREEN] = spmod * SP_RGBA32_G_U(color);
+ lc[LIGHT_BLUE] = spmod * SP_RGBA32_B_U(color);
}
} /* namespace Filters */