diff options
Diffstat (limited to 'src/display/nr-light.cpp')
| -rw-r--r-- | src/display/nr-light.cpp | 20 |
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 */ |
