diff options
author | Armin Le Grand <alg@apache.org> | 2012-10-04 15:27:22 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-06-11 10:32:54 +0100 |
commit | 59db4be207ca6651a29366d326436ba2f40bb6ab (patch) | |
tree | 6fb697302f7c650a4b5ed2ff71551caf231cce3b /basegfx/source/tools | |
parent | 5e39bc0937940e8d0f78668366e9de447269f0df (diff) |
Related: #i120604# corrected 3d gradients
adapted basegfx to be smarter in some areas
(cherry picked from commit 888e64505474808166c29ada24178cc3e58d6c18)
Conflicts:
basegfx/inc/basegfx/pixel/bpixel.hxx
basegfx/inc/basegfx/point/b2dhompoint.hxx
basegfx/inc/basegfx/point/b3dhompoint.hxx
basegfx/inc/basegfx/raster/rasterconvert3d.hxx
basegfx/inc/basegfx/tuple/b2dtuple.hxx
basegfx/inc/basegfx/tuple/b2i64tuple.hxx
basegfx/inc/basegfx/tuple/b2ituple.hxx
basegfx/inc/basegfx/tuple/b3dtuple.hxx
basegfx/inc/basegfx/tuple/b3i64tuple.hxx
basegfx/inc/basegfx/tuple/b3ituple.hxx
basegfx/source/point/b2dhompoint.cxx
basegfx/source/tuple/b2ituple.cxx
Change-Id: Id92864093dd40d34bd20b130cc3b405a7b8f9d91
Diffstat (limited to 'basegfx/source/tools')
-rw-r--r-- | basegfx/source/tools/gradienttools.cxx | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/basegfx/source/tools/gradienttools.cxx b/basegfx/source/tools/gradienttools.cxx index 83b6e21e0f32..11bd62f61843 100644 --- a/basegfx/source/tools/gradienttools.cxx +++ b/basegfx/source/tools/gradienttools.cxx @@ -355,19 +355,20 @@ namespace basegfx { const B2DPoint aCoor(rGradInfo.getBackTextureTransform() * rUV); - if(aCoor.getX() < 0.0 || aCoor.getX() > 1.0) - { - return 0.0; - } + // Ignore Y, this is not needed at all for Y-Oriented gradients + // if(aCoor.getX() < 0.0 || aCoor.getX() > 1.0) + // { + // return 0.0; + // } if(aCoor.getY() <= 0.0) { - return 0.0; + return 0.0; // start value for inside } if(aCoor.getY() >= 1.0) { - return 1.0; + return 1.0; // end value for outside } const sal_uInt32 nSteps(rGradInfo.getSteps()); @@ -384,16 +385,17 @@ namespace basegfx { const B2DPoint aCoor(rGradInfo.getBackTextureTransform() * rUV); - if(aCoor.getX() < 0.0 || aCoor.getX() > 1.0) - { - return 0.0; - } + // Ignore Y, this is not needed at all for Y-Oriented gradients + //if(aCoor.getX() < 0.0 || aCoor.getX() > 1.0) + //{ + // return 0.0; + //} const double fAbsY(fabs(aCoor.getY())); if(fAbsY >= 1.0) { - return 0.0; + return 1.0; // use end value when outside in Y } const sal_uInt32 nSteps(rGradInfo.getSteps()); |