summaryrefslogtreecommitdiffstats
path: root/src/display/nr-light.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2010-08-14 19:22:11 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2010-08-14 19:22:11 +0000
commitaa844be794b36b44b624e579db7f0945b5d3927b (patch)
treef83306b1ac51d8089373023162945eb25951bf68 /src/display/nr-light.cpp
parentFix paint bucket tool (diff)
downloadinkscape-aa844be794b36b44b624e579db7f0945b5d3927b.tar.gz
inkscape-aa844be794b36b44b624e579db7f0945b5d3927b.zip
Completely remove NRPixBlock
(bzr r9508.1.67)
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 a3373aadb..3d441a8ec 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::Matrix &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::Matrix &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 */