12#include <config_options.h>
16#include <com/sun/star/awt/Gradient2.hpp>
17#include <com/sun/star/awt/GradientStyle.hpp>
19#include <boost/property_tree/ptree_fwd.hpp>
71 : mfStopOffset(fStopOffset)
72 , maStopColor(rStopColor)
113 void setColorStopSequence(
const css::awt::ColorStopSequence& rColorStops);
125 : vector(std::move(other))
136 BColorStops(
const css::awt::ColorStopSequence& rColorStops);
147 vector::operator=(r);
152 vector::operator=(std::move(r));
179 BColor getInterpolatedBColor(
double fPosition, sal_uInt32 nRequestedSteps,
180 BColorStopRange& rLastColorStopRange)
const;
188 void replaceStartColor(
const BColor& rStart);
196 void replaceEndColor(
const BColor& rEnd);
211 void blendToIntensity(
double fStartIntensity,
double fEndIntensity,
const BColor& rBlendColor);
239 void sortAndCorrect();
244 bool checkPenultimate()
const;
250 css::awt::ColorStopSequence getAsColorStopSequence()
const;
259 bool isSingleColor(
BColor& rSingleColor)
const;
264 void reverseColorStops();
268 void createSpaceAtStart(
double fOffset);
273 void removeSpaceAtStart(
double fOffset);
277 double detectPossibleOffsetAtStart()
const;
280 bool isSymmetrical()
const;
287 void doApplySteps(sal_uInt16 nStepCount);
306 static std::string GradientStyleToString(css::awt::GradientStyle eStyle);
307 void setGradient2(
const css::awt::Gradient2& rGradient2);
312 css::awt::GradientStyle eStyle = css::awt::GradientStyle_LINEAR,
313 Degree10 nAngle = 0_deg10, sal_uInt16 nXOfs = 50, sal_uInt16 nYOfs = 50,
314 sal_uInt16 nBorder = 0, sal_uInt16 nStartIntens = 100, sal_uInt16 nEndIntens = 100,
315 sal_uInt16 nSteps = 0);
316 BGradient(
const css::awt::Gradient2& rGradient2);
327 void SetXOffset(sal_uInt16 nNewOffset) { nOfsX = nNewOffset; }
328 void SetYOffset(sal_uInt16 nNewOffset) { nOfsY = nNewOffset; }
331 void SetSteps(sal_uInt16 nSteps) { nStepCount = nSteps; }
343 boost::property_tree::ptree dumpAsJSON()
const;
344 static BGradient fromJSON(std::u16string_view rJSON);
347 css::awt::Gradient2 getAsGradient2()
const;
355 void tryToApplyBorder();
356 void tryToApplyStartEndIntensity();
360 void tryToConvertToAxial();
361 void tryToApplyAxial();
362 void tryToApplySteps();
#define BASEGFX_DLLPUBLIC
FILE * init(int, char **)
bool operator<(const BColorStop &rCandidate) const
BColorStop(double fStopOffset=0.0, const BColor &rStopColor=BColor())
bool operator==(const BColorStop &rCandidate) const
const BColor & getStopColor() const
double getStopOffset() const
bool operator!=(const BColorStop &rCandidate) const
BColorStops(std::initializer_list< BColorStop > init)
BColorStops(const BColorStops &other)
BColorStops(BColorStops &&other) noexcept
BColorStops & operator=(const BColorStops &r)
BColorStops(const_iterator first, const_iterator last)
BColorStops & operator=(BColorStops &&r) noexcept
Base Color class with three double values.
sal_uInt16 GetBorder() const
void SetGradientStyle(css::awt::GradientStyle eNewStyle)
sal_uInt16 GetStartIntens() const
sal_uInt16 GetSteps() const
void SetEndIntens(sal_uInt16 nNewIntens)
void SetYOffset(sal_uInt16 nNewOffset)
void SetXOffset(sal_uInt16 nNewOffset)
basegfx::BColorStops aColorStops
sal_uInt16 GetXOffset() const
void SetSteps(sal_uInt16 nSteps)
void SetBorder(sal_uInt16 nNewBorder)
const basegfx::BColorStops & GetColorStops() const
sal_uInt16 GetEndIntens() const
Degree10 GetAngle() const
css::awt::GradientStyle eStyle
css::awt::GradientStyle GetGradientStyle() const
void SetStartIntens(sal_uInt16 nNewIntens)
void SetAngle(Degree10 nNewAngle)
sal_uInt16 GetYOffset() const
tools::Long const nBorder
constexpr OUStringLiteral first
constexpr OUStringLiteral last
basegfx::BColor maColorStart
basegfx::BColor maColorEnd
bool operator==(const XclFontData &rLeft, const XclFontData &rRight)