LibreOffice Module basegfx (master) 1
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
basegfx::BGradient Class Referencefinal

#include <bgradient.hxx>

Collaboration diagram for basegfx::BGradient:
[legend]

Public Member Functions

 BGradient ()
 
 BGradient (const basegfx::BColorStops &rColorStops, css::awt::GradientStyle eStyle=css::awt::GradientStyle_LINEAR, Degree10 nAngle=0_deg10, sal_uInt16 nXOfs=50, sal_uInt16 nYOfs=50, sal_uInt16 nBorder=0, sal_uInt16 nStartIntens=100, sal_uInt16 nEndIntens=100, sal_uInt16 nSteps=0)
 
 BGradient (const css::awt::Gradient2 &rGradient2)
 
 BGradient (const css::uno::Any &rVal)
 
bool operator== (const BGradient &rGradient) const
 
void SetGradientStyle (css::awt::GradientStyle eNewStyle)
 
void SetColorStops (const basegfx::BColorStops &rSteps)
 
void SetAngle (Degree10 nNewAngle)
 
void SetBorder (sal_uInt16 nNewBorder)
 
void SetXOffset (sal_uInt16 nNewOffset)
 
void SetYOffset (sal_uInt16 nNewOffset)
 
void SetStartIntens (sal_uInt16 nNewIntens)
 
void SetEndIntens (sal_uInt16 nNewIntens)
 
void SetSteps (sal_uInt16 nSteps)
 
css::awt::GradientStyle GetGradientStyle () const
 
const basegfx::BColorStopsGetColorStops () const
 
Degree10 GetAngle () const
 
sal_uInt16 GetBorder () const
 
sal_uInt16 GetXOffset () const
 
sal_uInt16 GetYOffset () const
 
sal_uInt16 GetStartIntens () const
 
sal_uInt16 GetEndIntens () const
 
sal_uInt16 GetSteps () const
 
boost::property_tree::ptree dumpAsJSON () const
 
css::awt::Gradient2 getAsGradient2 () const
 Tooling method to fill awt::Gradient2 from data contained in the given basegfx::BGradient. More...
 
void tryToRecreateBorder (basegfx::BColorStops *pAssociatedTransparencyStops=nullptr)
 
void tryToApplyBorder ()
 
void tryToApplyStartEndIntensity ()
 
void tryToConvertToAxial ()
 
void tryToApplyAxial ()
 
void tryToApplySteps ()
 

Static Public Member Functions

static BGradient fromJSON (std::u16string_view rJSON)
 

Private Member Functions

void setGradient2 (const css::awt::Gradient2 &rGradient2)
 

Static Private Member Functions

static std::string GradientStyleToString (css::awt::GradientStyle eStyle)
 

Private Attributes

css::awt::GradientStyle eStyle
 
basegfx::BColorStops aColorStops
 
Degree10 nAngle
 
sal_uInt16 nBorder
 
sal_uInt16 nOfsX
 
sal_uInt16 nOfsY
 
sal_uInt16 nIntensStart
 
sal_uInt16 nIntensEnd
 
sal_uInt16 nStepCount
 

Detailed Description

Definition at line 290 of file bgradient.hxx.

Constructor & Destructor Documentation

◆ BGradient() [1/4]

basegfx::BGradient::BGradient ( )

Definition at line 828 of file bgradient.cxx.

References aColorStops, and nBorder.

◆ BGradient() [2/4]

basegfx::BGradient::BGradient ( const basegfx::BColorStops rColorStops,
css::awt::GradientStyle  eStyle = css::awt::GradientStyle_LINEAR,
Degree10  nAngle = 0_deg10,
sal_uInt16  nXOfs = 50,
sal_uInt16  nYOfs = 50,
sal_uInt16  nBorder = 0,
sal_uInt16  nStartIntens = 100,
sal_uInt16  nEndIntens = 100,
sal_uInt16  nSteps = 0 
)

Definition at line 843 of file bgradient.cxx.

References aColorStops, nBorder, and SetColorStops().

◆ BGradient() [3/4]

basegfx::BGradient::BGradient ( const css::awt::Gradient2 &  rGradient2)

Definition at line 888 of file bgradient.cxx.

References setGradient2().

◆ BGradient() [4/4]

basegfx::BGradient::BGradient ( const css::uno::Any &  rVal)

Member Function Documentation

◆ dumpAsJSON()

boost::property_tree::ptree basegfx::BGradient::dumpAsJSON ( ) const

◆ fromJSON()

BGradient basegfx::BGradient::fromJSON ( std::u16string_view  rJSON)
static

Definition at line 822 of file bgradient.cxx.

References aMap.

◆ GetAngle()

Degree10 basegfx::BGradient::GetAngle ( ) const
inline

Definition at line 335 of file bgradient.hxx.

Referenced by getAsGradient2().

◆ getAsGradient2()

css::awt::Gradient2 basegfx::BGradient::getAsGradient2 ( ) const

Tooling method to fill awt::Gradient2 from data contained in the given basegfx::BGradient.

Definition at line 972 of file bgradient.cxx.

References aColorStops, GetAngle(), basegfx::BColorStops::getAsColorStopSequence(), GetBorder(), GetEndIntens(), GetGradientStyle(), GetStartIntens(), GetSteps(), GetXOffset(), and GetYOffset().

◆ GetBorder()

sal_uInt16 basegfx::BGradient::GetBorder ( ) const
inline

◆ GetColorStops()

const basegfx::BColorStops & basegfx::BGradient::GetColorStops ( ) const
inline

◆ GetEndIntens()

sal_uInt16 basegfx::BGradient::GetEndIntens ( ) const
inline

◆ GetGradientStyle()

css::awt::GradientStyle basegfx::BGradient::GetGradientStyle ( ) const
inline

◆ GetStartIntens()

sal_uInt16 basegfx::BGradient::GetStartIntens ( ) const
inline

◆ GetSteps()

sal_uInt16 basegfx::BGradient::GetSteps ( ) const
inline

Definition at line 341 of file bgradient.hxx.

Referenced by getAsGradient2(), and tryToApplySteps().

◆ GetXOffset()

sal_uInt16 basegfx::BGradient::GetXOffset ( ) const
inline

Definition at line 337 of file bgradient.hxx.

Referenced by getAsGradient2().

◆ GetYOffset()

sal_uInt16 basegfx::BGradient::GetYOffset ( ) const
inline

Definition at line 338 of file bgradient.hxx.

Referenced by getAsGradient2().

◆ GradientStyleToString()

std::string basegfx::BGradient::GradientStyleToString ( css::awt::GradientStyle  eStyle)
staticprivate

Definition at line 793 of file bgradient.cxx.

References eStyle.

Referenced by dumpAsJSON().

◆ operator==()

bool basegfx::BGradient::operator== ( const BGradient rGradient) const

Definition at line 925 of file bgradient.cxx.

References aColorStops, eStyle, nAngle, nBorder, nIntensEnd, nIntensStart, nOfsX, nOfsY, and nStepCount.

◆ SetAngle()

void basegfx::BGradient::SetAngle ( Degree10  nNewAngle)
inline

Definition at line 325 of file bgradient.hxx.

Referenced by BGradient(), and setGradient2().

◆ SetBorder()

void basegfx::BGradient::SetBorder ( sal_uInt16  nNewBorder)
inline

Definition at line 326 of file bgradient.hxx.

References nBorder.

Referenced by BGradient(), setGradient2(), tryToApplyBorder(), and tryToRecreateBorder().

◆ SetColorStops()

void basegfx::BGradient::SetColorStops ( const basegfx::BColorStops rSteps)

Definition at line 934 of file bgradient.cxx.

References aColorStops, and basegfx::BColorStops::sortAndCorrect().

Referenced by BGradient(), and tryToConvertToAxial().

◆ SetEndIntens()

void basegfx::BGradient::SetEndIntens ( sal_uInt16  nNewIntens)
inline

Definition at line 330 of file bgradient.hxx.

Referenced by BGradient(), setGradient2(), and tryToApplyStartEndIntensity().

◆ setGradient2()

void basegfx::BGradient::setGradient2 ( const css::awt::Gradient2 &  rGradient2)
private

◆ SetGradientStyle()

void basegfx::BGradient::SetGradientStyle ( css::awt::GradientStyle  eNewStyle)
inline

Definition at line 323 of file bgradient.hxx.

Referenced by BGradient(), setGradient2(), tryToApplyAxial(), and tryToConvertToAxial().

◆ SetStartIntens()

void basegfx::BGradient::SetStartIntens ( sal_uInt16  nNewIntens)
inline

Definition at line 329 of file bgradient.hxx.

Referenced by BGradient(), setGradient2(), and tryToApplyStartEndIntensity().

◆ SetSteps()

void basegfx::BGradient::SetSteps ( sal_uInt16  nSteps)
inline

Definition at line 331 of file bgradient.hxx.

Referenced by BGradient(), setGradient2(), and tryToApplySteps().

◆ SetXOffset()

void basegfx::BGradient::SetXOffset ( sal_uInt16  nNewOffset)
inline

Definition at line 327 of file bgradient.hxx.

Referenced by BGradient(), and setGradient2().

◆ SetYOffset()

void basegfx::BGradient::SetYOffset ( sal_uInt16  nNewOffset)
inline

Definition at line 328 of file bgradient.hxx.

Referenced by BGradient(), and setGradient2().

◆ tryToApplyAxial()

void basegfx::BGradient::tryToApplyAxial ( )

◆ tryToApplyBorder()

void basegfx::BGradient::tryToApplyBorder ( )

◆ tryToApplyStartEndIntensity()

void basegfx::BGradient::tryToApplyStartEndIntensity ( )

◆ tryToApplySteps()

void basegfx::BGradient::tryToApplySteps ( )

◆ tryToConvertToAxial()

void basegfx::BGradient::tryToConvertToAxial ( )

◆ tryToRecreateBorder()

void basegfx::BGradient::tryToRecreateBorder ( basegfx::BColorStops pAssociatedTransparencyStops = nullptr)

Member Data Documentation

◆ aColorStops

basegfx::BColorStops basegfx::BGradient::aColorStops
private

◆ eStyle

css::awt::GradientStyle basegfx::BGradient::eStyle
private

Definition at line 293 of file bgradient.hxx.

Referenced by dumpAsJSON(), GradientStyleToString(), and operator==().

◆ nAngle

Degree10 basegfx::BGradient::nAngle
private

Definition at line 298 of file bgradient.hxx.

Referenced by dumpAsJSON(), and operator==().

◆ nBorder

sal_uInt16 basegfx::BGradient::nBorder
private

Definition at line 299 of file bgradient.hxx.

Referenced by dumpAsJSON(), and operator==().

◆ nIntensEnd

sal_uInt16 basegfx::BGradient::nIntensEnd
private

Definition at line 303 of file bgradient.hxx.

Referenced by dumpAsJSON(), and operator==().

◆ nIntensStart

sal_uInt16 basegfx::BGradient::nIntensStart
private

Definition at line 302 of file bgradient.hxx.

Referenced by dumpAsJSON(), and operator==().

◆ nOfsX

sal_uInt16 basegfx::BGradient::nOfsX
private

Definition at line 300 of file bgradient.hxx.

Referenced by dumpAsJSON(), and operator==().

◆ nOfsY

sal_uInt16 basegfx::BGradient::nOfsY
private

Definition at line 301 of file bgradient.hxx.

Referenced by dumpAsJSON(), and operator==().

◆ nStepCount

sal_uInt16 basegfx::BGradient::nStepCount
private

Definition at line 304 of file bgradient.hxx.

Referenced by dumpAsJSON(), and operator==().


The documentation for this class was generated from the following files: