diff options
Diffstat (limited to 'drawinglayer/source/processor2d/vclhelpergradient.cxx')
-rw-r--r-- | drawinglayer/source/processor2d/vclhelpergradient.cxx | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drawinglayer/source/processor2d/vclhelpergradient.cxx b/drawinglayer/source/processor2d/vclhelpergradient.cxx index b9fa91a89750..6c318dbcedc9 100644 --- a/drawinglayer/source/processor2d/vclhelpergradient.cxx +++ b/drawinglayer/source/processor2d/vclhelpergradient.cxx @@ -210,16 +210,6 @@ namespace drawinglayer ::std::vector< basegfx::BColor > aColors; basegfx::B2DPolygon aUnitPolygon; - if(attribute::GRADIENTSTYLE_RADIAL == eGradientStyle || attribute::GRADIENTSTYLE_ELLIPTICAL == eGradientStyle) - { - const basegfx::B2DPoint aCircleCenter(0.5, 0.5); - aUnitPolygon = basegfx::tools::createPolygonFromEllipse(aCircleCenter, 0.5, 0.5); - } - else - { - aUnitPolygon = basegfx::tools::createUnitPolygon(); - } - // make sure steps is not too high/low nSteps = impCalcGradientSteps(rOutDev, nSteps, aOutlineRange, sal_uInt32((rStart.getMaximumDistance(rEnd) * 127.5) + 0.5)); @@ -231,6 +221,7 @@ namespace drawinglayer texture::GeoTexSvxGradientLinear aGradient(aOutlineRange, rStart, rEnd, nSteps, fBorder, fAngle); aGradient.appendTransformations(aMatrices); aGradient.appendColors(aColors); + aUnitPolygon = basegfx::tools::createUnitPolygon(); break; } case attribute::GRADIENTSTYLE_AXIAL: @@ -238,6 +229,7 @@ namespace drawinglayer texture::GeoTexSvxGradientAxial aGradient(aOutlineRange, rStart, rEnd, nSteps, fBorder, fAngle); aGradient.appendTransformations(aMatrices); aGradient.appendColors(aColors); + aUnitPolygon = basegfx::tools::createPolygonFromRect(basegfx::B2DRange(-1, -1, 1, 1)); break; } case attribute::GRADIENTSTYLE_RADIAL: @@ -245,6 +237,7 @@ namespace drawinglayer texture::GeoTexSvxGradientRadial aGradient(aOutlineRange, rStart, rEnd, nSteps, fBorder, fOffsetX, fOffsetY); aGradient.appendTransformations(aMatrices); aGradient.appendColors(aColors); + aUnitPolygon = basegfx::tools::createPolygonFromCircle(basegfx::B2DPoint(0,0), 1); break; } case attribute::GRADIENTSTYLE_ELLIPTICAL: @@ -252,6 +245,7 @@ namespace drawinglayer texture::GeoTexSvxGradientElliptical aGradient(aOutlineRange, rStart, rEnd, nSteps, fBorder, fOffsetX, fOffsetX, fAngle); aGradient.appendTransformations(aMatrices); aGradient.appendColors(aColors); + aUnitPolygon = basegfx::tools::createPolygonFromCircle(basegfx::B2DPoint(0,0), 1); break; } case attribute::GRADIENTSTYLE_SQUARE: @@ -259,6 +253,7 @@ namespace drawinglayer texture::GeoTexSvxGradientSquare aGradient(aOutlineRange, rStart, rEnd, nSteps, fBorder, fOffsetX, fOffsetX, fAngle); aGradient.appendTransformations(aMatrices); aGradient.appendColors(aColors); + aUnitPolygon = basegfx::tools::createPolygonFromRect(basegfx::B2DRange(-1, -1, 1, 1)); break; } case attribute::GRADIENTSTYLE_RECT: @@ -266,6 +261,7 @@ namespace drawinglayer texture::GeoTexSvxGradientRect aGradient(aOutlineRange, rStart, rEnd, nSteps, fBorder, fOffsetX, fOffsetX, fAngle); aGradient.appendTransformations(aMatrices); aGradient.appendColors(aColors); + aUnitPolygon = basegfx::tools::createPolygonFromRect(basegfx::B2DRange(-1, -1, 1, 1)); break; } } |