22#include <config_options.h>
30#include <com/sun/star/awt/ColorStopSequence.hdl>
32#include <osl/endian.h>
34namespace com {
namespace sun {
namespace star {
namespace uno {
class Any; } } } }
35namespace com {
namespace sun {
namespace star {
namespace awt {
struct Gradient2; } } } }
36namespace basegfx {
class B2DRange; }
44 struct ColorToBColorConverter
63 ColorToBColorConverter GetRGBColor()
const
68 ColorToBColorConverter(sal_uInt32 nColor)
73 : mValue(sal_uInt32(nBlue) | (sal_uInt32(nGreen) << 8) | (sal_uInt32(nRed) << 16))
77 : ColorToBColorConverter(
88 constexpr explicit operator sal_Int32()
const
90 return sal_Int32(mValue);
93 constexpr explicit operator sal_uInt32()
const
108 class UNLESS_MERGELIBS(BASEGFX_DLLPUBLIC) ODFGradientInfo
114 B2DHomMatrix maTextureTransform;
122 B2DHomMatrix maBackTextureTransform;
128 double mfAspectRatio;
135 sal_uInt32 mnRequestedSteps;
139 : mfAspectRatio(1.0),
145 B2DHomMatrix aTextureTransform,
147 sal_uInt32 nRequestedSteps)
148 : maTextureTransform(
std::move(aTextureTransform)),
149 mfAspectRatio(fAspectRatio),
150 mnRequestedSteps(nRequestedSteps)
154 ODFGradientInfo(
const ODFGradientInfo& rODFGradientInfo)
155 : maTextureTransform(rODFGradientInfo.getTextureTransform()),
156 maBackTextureTransform(rODFGradientInfo.maBackTextureTransform),
157 mfAspectRatio(rODFGradientInfo.getAspectRatio()),
158 mnRequestedSteps(rODFGradientInfo.getRequestedSteps())
162 ODFGradientInfo& operator=(
const ODFGradientInfo& rODFGradientInfo)
164 maTextureTransform = rODFGradientInfo.getTextureTransform();
165 maBackTextureTransform = rODFGradientInfo.maBackTextureTransform;
166 mfAspectRatio = rODFGradientInfo.getAspectRatio();
167 mnRequestedSteps = rODFGradientInfo.getRequestedSteps();
173 bool operator==(
const ODFGradientInfo& rGeoTexSvx)
const;
175 const B2DHomMatrix& getTextureTransform()
const {
return maTextureTransform; }
176 const B2DHomMatrix& getBackTextureTransform()
const;
177 double getAspectRatio()
const {
return mfAspectRatio; }
178 sal_uInt32 getRequestedSteps()
const {
return mnRequestedSteps; }
180 void setTextureTransform(
const B2DHomMatrix& rNew)
182 maTextureTransform = rNew;
183 maBackTextureTransform.identity();
210 BColorStops& rColorStops,
211 BColor& rSingleColor);
231 BColorStops& rColorStops,
232 BColorStops& rAlphaStops,
233 const BColor& rSingleColor,
234 const BColor& rSingleAlpha);
247 sal_uInt32 nRequestedSteps,
248 const BColor& rStart,
273 const B2DRange& rTargetArea,
274 sal_uInt32 nRequestedSteps,
293 const ODFGradientInfo& rGradInfo);
323 const B2DRange& rTargetArea,
324 sal_uInt32 nRequestedSteps,
343 const ODFGradientInfo& rGradInfo);
368 const B2DRange& rTargetArea,
369 const B2DVector& rOffset,
370 sal_uInt32 nRequestedSteps,
388 const ODFGradientInfo& rGradInfo);
413 const B2DRange& rTargetArea,
414 const B2DVector& rOffset,
415 sal_uInt32 nRequestedSteps,
434 const ODFGradientInfo& rGradInfo);
459 const B2DRange& rTargetArea,
460 const B2DVector& rOffset,
461 sal_uInt32 nRequestedSteps,
480 const ODFGradientInfo& rGradInfo);
505 const B2DRange& rTargetArea,
506 const B2DVector& rOffset,
507 sal_uInt32 nRequestedSteps,
526 const ODFGradientInfo& rGradInfo);
#define BASEGFX_DLLPUBLIC
Base Color class with three double values.
ODFGradientInfo createRadialODFGradientInfo(const B2DRange &rTargetArea, const B2DVector &rOffset, sal_uInt32 nSteps, double fBorder)
Create matrix for ODF's radial gradient definition.
double getAxialGradientAlpha(const B2DPoint &rUV, const ODFGradientInfo &rGradInfo)
Calculate axial gradient blend value.
ODFGradientInfo createAxialODFGradientInfo(const B2DRange &rTargetArea, sal_uInt32 nSteps, double fBorder, double fAngle)
Create matrix for ODF's axial gradient definition.
double getLinearGradientAlpha(const B2DPoint &rUV, const ODFGradientInfo &rGradInfo)
Calculate linear gradient blend value.
double getRectangularGradientAlpha(const B2DPoint &rUV, const ODFGradientInfo &rGradInfo)
Calculate rectangular gradient blend value.
double getEllipticalGradientAlpha(const B2DPoint &rUV, const ODFGradientInfo &rGradInfo)
Calculate elliptical gradient blend value.
double getSquareGradientAlpha(const B2DPoint &rUV, const ODFGradientInfo &rGradInfo)
Calculate square gradient blend value.
void synchronizeColorStops(BColorStops &rColorStops, BColorStops &rAlphaStops, const BColor &rSingleColor, const BColor &rSingleAlpha)
ODFGradientInfo createLinearODFGradientInfo(const B2DRange &rTargetArea, sal_uInt32 nSteps, double fBorder, double fAngle)
Create matrix for ODF's linear gradient definition.
void prepareColorStops(const basegfx::BGradient &rGradient, BColorStops &rColorStops, BColor &rSingleColor)
double getRadialGradientAlpha(const B2DPoint &rUV, const ODFGradientInfo &rGradInfo)
Calculate radial gradient blend value.
ODFGradientInfo createSquareODFGradientInfo(const B2DRange &rTargetArea, const B2DVector &rOffset, sal_uInt32 nSteps, double fBorder, double fAngle)
Create matrix for ODF's square gradient definition.
ODFGradientInfo createEllipticalODFGradientInfo(const B2DRange &rTargetArea, const B2DVector &rOffset, sal_uInt32 nSteps, double fBorder, double fAngle)
Create matrix for ODF's elliptical gradient definition.
ODFGradientInfo createRectangularODFGradientInfo(const B2DRange &rTargetArea, const B2DVector &rOffset, sal_uInt32 nSteps, double fBorder, double fAngle)
Create matrix for ODF's rectangular gradient definition.
sal_uInt32 calculateNumberOfSteps(sal_uInt32 nRequestedSteps, const BColor &rStart, const BColor &rEnd)
sal_uInt8 getRed(IntSRGBA nCol)
sal_uInt8 getBlue(IntSRGBA nCol)
sal_uInt8 getGreen(IntSRGBA nCol)
bool operator==(const XclFontData &rLeft, const XclFontData &rRight)