Mako 7.3.0 API
IDOMLinearGradientBrush Class Referenceabstract

IDOMLinearGradientBrush interface. A linear gradient brush is used to specify a gradient along a vector. More...

#include <idombrush.h>

Inheritance diagram for IDOMLinearGradientBrush:

Classes

class  Data
 Initialization data. More...
 

Public Member Functions

virtual const FPointgetStartPoint () const =0
 Retrieves the start point of the linear gradient. More...
 
virtual void setStartPoint (const FPoint &pt)=0
 Sets the start point of the linear gradient. More...
 
virtual const FPointgetEndPoint () const =0
 Retrieves the end point of the linear gradient. More...
 
virtual void setEndPoint (const FPoint &pt)=0
 Sets the end point of the linear gradient. More...
 
virtual IDOMShadingPatternType2BrushPtr createShading (IEDLClassFactory *pFactory, bool ignoreSpreadMethod, bool useFirstStopColorSpace)=0
 Create a Type2 Shading Pattern brush from this linear brush. Repeat and reflect spread methods cannot be handled using this method (instead use createPdfBrush() which will emulate using a tiling pattern brush. However if ignoreSpreadMethod is set, a shading pattern resembling a pad reflect mode will be generated. Further, alpha information in the gradient stops are ignored. More...
 
virtual IDOMBrushPtr createPdfBrush (IEDLClassFactory *pFactory, bool useFirstStopColorSpace=false)=0
 Create a PDF-compatible brush for this gradient. If the pad mode is reflect, the result will be a shading brush, otherwise a tiling pattern will be created to repeat and reflect the shade as required. As per createShading, the opacity in the gradient stops is ignored. More...
 
- Public Member Functions inherited from IDOMGradientBrush
virtual eColorInterpolationMode getColorInterpolationMode () const =0
 Retrieves the color interpolation mode value of the radial gradient brush. More...
 
virtual void setColorInterpolationMode (eColorInterpolationMode cim)=0
 Sets the color interpolation mode value of the radial gradient brush. More...
 
virtual eSpreadMethod getSpreadMethod () const =0
 Retrieves the spread method value of the RadialGradientBrush element. More...
 
virtual void setSpreadMethod (eSpreadMethod sm)=0
 Sets spread method value of the RadialGradientBrush element. More...
 
virtual void setGradientStops (const CDOMGradientStopVect &stops)=0
 Set the vector of stops in this gradient. Must not be empty. More...
 
virtual const CDOMGradientStopVect & getGradientStops () const =0
 Retrieves the vector of stops in this gradient. An exception will be thrown if the gradient has no stops. More...
 
virtual void addGradientStop (const IDOMGradientStopPtr &ptrGradientStop)=0
 Append a gradient stop. More...
 
virtual void normalizeStops (IEDLClassFactory *pFactory, const IDOMColorSpacePtr &ptrColorSpace=IDOMColorSpacePtr(), eRenderingIntent intent=eRelativeColorimetric, eBlackPointCompensation bpc=eBPCDefault)=0
 Normalize the gradient stops to a single color space, sort them and ensure there are stops at 0.0 and 1.0. More...
 
- Public Member Functions inherited from IDOMTransformableBrush
virtual const FMatrixgetRenderTransform () const =0
 Retrieves the render transform matrix. More...
 
virtual void setRenderTransform (const FMatrix &matrix)=0
 Sets the render transform matrix. More...
 
- Public Member Functions inherited from IDOMBrush
virtual eBrushType getBrushType () const =0
 Retrieves the type of the brush. More...
 
virtual float getOpacity () const =0
 Retrieves the opacity value of the brush element. More...
 
virtual void setOpacity (float opc)=0
 Sets the opacity value of a brush element. More...
 
virtual IDOMBrushPtr getAdjustedForUseInTransformedNode (IEDLClassFactory *pFactory, const FMatrix &nodeTransform)
 Get a version of this brush adjusted for use inside a node with the given transform. More...
 
- Public Member Functions inherited from IEDLObject
virtual const CClassIDgetClassID () const =0
 Returns class ID of IEDLObject. More...
 
virtual bool init (CClassParams *pData)
 The init() method is called to perform any post-construction initialization of an IEDLObject that has been created by the EDL class factory, before it is actually returned by the factory. More...
 
virtual bool clone (IEDLObjectPtr &ptrObject, IEDLClassFactory *pFactory)
 Create a copy of EDLObject. More...
 
- Public Member Functions inherited from IRCObject
virtual void addRef () const =0
 Increases the reference count of the actual object pointed to. This would take place during an assignment or copying.
 
virtual bool decRef () const =0
 Decreases the reference count of the actual object pointed to. When the reference count falls to Zero, it deletes the actual object pointed to. More...
 
virtual int32 getRefCount () const =0
 Retrieve the current reference count of the actual object pointed to. More...
 

Static Public Member Functions

static EDL_API IDOMLinearGradientBrushPtr create (IEDLClassFactory *pFactory, const FPoint &startPoint, const FPoint &endPoint, const CDOMGradientStopVect &stops, float opacity=1.0f, const FMatrix &renderTransform=FMatrix(), eSpreadMethod spreadMethod=eNoSpread, eColorInterpolationMode colorInterpolationMode=eSRgbLinearInterpolation)
 Simplified linear gradient brush creation. Throws an IEDLError on failure. More...
 
static const CClassIDclassID ()
 Retrieves class id of IDOMLinearGradientBrush. More...
 

Additional Inherited Members

- Public Types inherited from IDOMBrush
enum  eBrushType {
  eSolidColor , eLinearGradient , eRadialGradient , eImage ,
  eMasked , eVisual , eSoftMask , eTilingPattern ,
  eType1ShadingPattern , eType2ShadingPattern , eType3ShadingPattern , eType4567ShadingPattern ,
  eNull
}
 Brush type enumeration. More...
 
- Protected Member Functions inherited from IRCObject
virtual ~IRCObject ()
 Virtual destructor.
 

Detailed Description

IDOMLinearGradientBrush interface. A linear gradient brush is used to specify a gradient along a vector.

Member Function Documentation

◆ classID()

static const CClassID& IDOMLinearGradientBrush::classID ( )
inlinestatic

Retrieves class id of IDOMLinearGradientBrush.

Returns
CClassID The class ID of IDOMLinearGradientBrush.

◆ create()

static EDL_API IDOMLinearGradientBrushPtr IDOMLinearGradientBrush::create ( IEDLClassFactory pFactory,
const FPoint startPoint,
const FPoint endPoint,
const CDOMGradientStopVect &  stops,
float  opacity = 1.0f,
const FMatrix renderTransform = FMatrix(),
eSpreadMethod  spreadMethod = eNoSpread,
eColorInterpolationMode  colorInterpolationMode = eSRgbLinearInterpolation 
)
static

Simplified linear gradient brush creation. Throws an IEDLError on failure.

Parameters
pFactoryThe EDL Class factory to use.
startPointThe start point of the gradient
endPointThe end point of the gradient
stopsThe gradient stops
opacityThe alpha to use.
renderTransformThe render transform to use
spreadMethodThe desired spread method
colorInterpolationModeThe desired color interpolation mode
Returns
IDOMLinearGradientBrushPtr The new brush.

◆ createPdfBrush()

virtual IDOMBrushPtr IDOMLinearGradientBrush::createPdfBrush ( IEDLClassFactory pFactory,
bool  useFirstStopColorSpace = false 
)
pure virtual

Create a PDF-compatible brush for this gradient. If the pad mode is reflect, the result will be a shading brush, otherwise a tiling pattern will be created to repeat and reflect the shade as required. As per createShading, the opacity in the gradient stops is ignored.

Parameters
pFactoryThe EDL class factory
useFirstStopColorSpaceIf true the color space in the first stop will be used for the shading. Otherwise either sRGB or scRGB will be used depending on the interpolation mode.
Returns
IDOMPatternBrush The resulting brush.

◆ createShading()

virtual IDOMShadingPatternType2BrushPtr IDOMLinearGradientBrush::createShading ( IEDLClassFactory pFactory,
bool  ignoreSpreadMethod,
bool  useFirstStopColorSpace 
)
pure virtual

Create a Type2 Shading Pattern brush from this linear brush. Repeat and reflect spread methods cannot be handled using this method (instead use createPdfBrush() which will emulate using a tiling pattern brush. However if ignoreSpreadMethod is set, a shading pattern resembling a pad reflect mode will be generated. Further, alpha information in the gradient stops are ignored.

Parameters
pFactoryThe EDL class factory
useFirstStopColorSpaceIf true the color space in the first stop will be used for the shading. Otherwise either sRGB or scRGB will be used depending on the interpolation mode.
ignoreSpreadMethodIf true the spread method will be ignored and assumed to be ePad. If this is set false and the gradient has eRepeat or eReflect spread mode set then a NULL brush will result.
Returns
IDOMShadingPatternType2BrushPtr The resulting brush, or NULL if it was not possible to create such a brush due to spread method.

◆ getEndPoint()

virtual const FPoint& IDOMLinearGradientBrush::getEndPoint ( ) const
pure virtual

Retrieves the end point of the linear gradient.

Returns
FPoint The end point of the linear gradient.

◆ getStartPoint()

virtual const FPoint& IDOMLinearGradientBrush::getStartPoint ( ) const
pure virtual

Retrieves the start point of the linear gradient.

Returns
FPoint Start point of the linear gradient

◆ setEndPoint()

virtual void IDOMLinearGradientBrush::setEndPoint ( const FPoint pt)
pure virtual

Sets the end point of the linear gradient.

Parameters
ptThe new end point

◆ setStartPoint()

virtual void IDOMLinearGradientBrush::setStartPoint ( const FPoint pt)
pure virtual

Sets the start point of the linear gradient.

Parameters
ptThe new start point.

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