LibreOffice Module basegfx (master) 1
Namespaces | Functions
gradienttools.cxx File Reference
#include <basegfx/utils/gradienttools.hxx>
#include <basegfx/point/b2dpoint.hxx>
#include <basegfx/range/b2drange.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <com/sun/star/awt/Gradient2.hpp>
#include <osl/endian.h>
#include <algorithm>
#include <cmath>
Include dependency graph for gradienttools.cxx:

Go to the source code of this file.

Namespaces

namespace  basegfx
 
namespace  basegfx::utils
 

Functions

static ODFGradientInfo basegfx::init1DGradientInfo (const B2DRange &rTargetRange, sal_uInt32 nSteps, double fBorder, double fAngle, bool bAxial)
 Most of the setup for linear & axial gradient is the same, except for the border treatment. More...
 
static ODFGradientInfo basegfx::initEllipticalGradientInfo (const B2DRange &rTargetRange, const B2DVector &rOffset, sal_uInt32 nSteps, double fBorder, double fAngle, bool bCircular)
 Most of the setup for radial & ellipsoidal gradient is the same, except for the border treatment. More...
 
static ODFGradientInfo basegfx::initRectGradientInfo (const B2DRange &rTargetRange, const B2DVector &rOffset, sal_uInt32 nSteps, double fBorder, double fAngle, bool bSquare)
 Setup for rect & square gradient is exactly the same. More...
 
void basegfx::utils::prepareColorStops (const basegfx::BGradient &rGradient, BColorStops &rColorStops, BColor &rSingleColor)
 
void basegfx::utils::synchronizeColorStops (BColorStops &rColorStops, BColorStops &rAlphaStops, const BColor &rSingleColor, const BColor &rSingleAlpha)
 
sal_uInt32 basegfx::utils::calculateNumberOfSteps (sal_uInt32 nRequestedSteps, const BColor &rStart, const BColor &rEnd)
 
ODFGradientInfo basegfx::utils::createLinearODFGradientInfo (const B2DRange &rTargetArea, sal_uInt32 nRequestedSteps, double fBorder, double fAngle)
 Create matrix for ODF's linear gradient definition. More...
 
ODFGradientInfo basegfx::utils::createAxialODFGradientInfo (const B2DRange &rTargetArea, sal_uInt32 nRequestedSteps, double fBorder, double fAngle)
 Create matrix for ODF's axial gradient definition. More...
 
ODFGradientInfo basegfx::utils::createRadialODFGradientInfo (const B2DRange &rTargetArea, const B2DVector &rOffset, sal_uInt32 nRequestedSteps, double fBorder)
 Create matrix for ODF's radial gradient definition. More...
 
ODFGradientInfo basegfx::utils::createEllipticalODFGradientInfo (const B2DRange &rTargetArea, const B2DVector &rOffset, sal_uInt32 nRequestedSteps, double fBorder, double fAngle)
 Create matrix for ODF's elliptical gradient definition. More...
 
ODFGradientInfo basegfx::utils::createSquareODFGradientInfo (const B2DRange &rTargetArea, const B2DVector &rOffset, sal_uInt32 nRequestedSteps, double fBorder, double fAngle)
 Create matrix for ODF's square gradient definition. More...
 
ODFGradientInfo basegfx::utils::createRectangularODFGradientInfo (const B2DRange &rTargetArea, const B2DVector &rOffset, sal_uInt32 nRequestedSteps, double fBorder, double fAngle)
 Create matrix for ODF's rectangular gradient definition. More...
 
double basegfx::utils::getLinearGradientAlpha (const B2DPoint &rUV, const ODFGradientInfo &rGradInfo)
 Calculate linear gradient blend value. More...
 
double basegfx::utils::getAxialGradientAlpha (const B2DPoint &rUV, const ODFGradientInfo &rGradInfo)
 Calculate axial gradient blend value. More...
 
double basegfx::utils::getRadialGradientAlpha (const B2DPoint &rUV, const ODFGradientInfo &rGradInfo)
 Calculate radial gradient blend value. More...
 
double basegfx::utils::getEllipticalGradientAlpha (const B2DPoint &rUV, const ODFGradientInfo &rGradInfo)
 Calculate elliptical gradient blend value. More...
 
double basegfx::utils::getSquareGradientAlpha (const B2DPoint &rUV, const ODFGradientInfo &rGradInfo)
 Calculate square gradient blend value. More...
 
double basegfx::utils::getRectangularGradientAlpha (const B2DPoint &rUV, const ODFGradientInfo &rGradInfo)
 Calculate rectangular gradient blend value. More...