diff options
author | Armin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de> | 2023-02-10 11:36:15 +0100 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@me.com> | 2023-02-12 10:54:06 +0000 |
commit | 43de98fb59ef3cd1c6eabd3174d57634b7d501a9 (patch) | |
tree | 2e926642ae6c4d595fa546bd02b21535c9e6a740 /drawinglayer/source/processor3d | |
parent | 496b1b3179ca096dea1fd91ab2408c02f16b06cf (diff) |
MCGR: Add/Provide GradientSteps to FillGradientAttribute
MCGR stands for MultiColorGRadient. This change allows/
prepares adding multiple color steps to gradient rendering.
This is preparation work to allow rendering MCGRs in the
future. All places are adapted in a way that currently
no change of behaviour will happen. It will be the base
to get MCGR rendering/decompose for Primitives and our
internal/existing gradients working.
Change-Id: I28bbd7d10b8670042343ada2a66b5909d3d31bbd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146748
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'drawinglayer/source/processor3d')
-rw-r--r-- | drawinglayer/source/processor3d/defaultprocessor3d.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drawinglayer/source/processor3d/defaultprocessor3d.cxx b/drawinglayer/source/processor3d/defaultprocessor3d.cxx index b9159c46c73f..6be8e78d0d59 100644 --- a/drawinglayer/source/processor3d/defaultprocessor3d.cxx +++ b/drawinglayer/source/processor3d/defaultprocessor3d.cxx @@ -61,8 +61,8 @@ namespace drawinglayer::processor3d const basegfx::B2DRange aOutlineRange(0.0, 0.0, rPrimitive.getTextureSize().getX(), rPrimitive.getTextureSize().getY()); const attribute::GradientStyle aGradientStyle(rFillGradient.getStyle()); sal_uInt32 nSteps(rFillGradient.getSteps()); - const basegfx::BColor& aStart(rFillGradient.getStartColor()); - const basegfx::BColor& aEnd(rFillGradient.getEndColor()); + const basegfx::BColor aStart(rFillGradient.getColorSteps().front().getColor()); + const basegfx::BColor aEnd(rFillGradient.getColorSteps().back().getColor()); const sal_uInt32 nMaxSteps(sal_uInt32((aStart.getMaximumDistance(aEnd) * 127.5) + 0.5)); std::shared_ptr< texture::GeoTexSvx > pNewTex; |