Mako 7.5.0 API
Loading...
Searching...
No Matches
IDOMRadialGradientBrush Class Referenceabstract

IDOMRadialGradientBrush interface. A radial gradient brush defines an ellipse to be filled with the gradient. The ellipse is defined by its center, x radius, and y radius. Independently, a gradient origin is specified for the brush. The gradient origin defines the center of the gradient; a gradient stop with an offset at 0.0 defines the color at the gradient origin. The outer bound of the ellipse defines the end "point" of the gradient; that is, a gradient stop with an offset at 1.0 defines the color at the circumference of the ellipse, and all other gradient stops define their offsets relative to the radial distance between the gradient origin and the circumference. More...

#include <idombrush.h>

Inheritance diagram for IDOMRadialGradientBrush:

Classes

class  Data
 Initialization data. More...
 

Public Member Functions

virtual const FPointgetCenter () const =0
 Retrieves the center point of the gradient brush ellipse.
 
virtual void setCenter (const FPoint &pt)=0
 Sets the center point of the gradient brush ellipse.
 
virtual const FPointgetGradientOrigin () const =0
 Retrieves the origin point of the radial gradient, corresponding to the gradient stop with an offset of 0.0.
 
virtual void setGradientOrigin (const FPoint &pt)=0
 Sets the origin point of the radial gradient, corresponding to the gradient stop with an offset of 0.0.
 
virtual double getRadiusX () const =0
 Retrieves the x-radius of the gradient brush ellipse.
 
virtual void setRadiusX (double r)=0
 Sets the x-radius of the gradient brush ellipse.
 
virtual double getRadiusY () const =0
 Retrieves the y-radius of the gradient brush ellipse.
 
virtual void setRadiusY (double r)=0
 Sets the y-radius of the gradient brush ellipse.
 
virtual IDOMShadingPatternType3BrushPtr createShading (IEDLClassFactory *pFactory, const FRect &fillArea, bool useFirstStopColorSpace=false)=0
 Create a Type3 Shading Pattern brush from this radial brush. All alpha information in the gradient stops will be dropped. The resulting brush will be generated to fill the given rectangle.
 
virtual IDOMRadialGradientBrushPtr getSimplifiedGradient (IEDLClassFactory *pFactory, const FRect &fillArea)=0
 Create a simplified radial gradient brush, where any repeat or reflect pad mode is converted to simple padding by repeating gradient stops as required. The resulting brush will be generated to fill the given rectangle.
 
- Public Member Functions inherited from IDOMGradientBrush
virtual eColorInterpolationMode getColorInterpolationMode () const =0
 Retrieves the color interpolation mode value of the radial gradient brush.
 
virtual void setColorInterpolationMode (eColorInterpolationMode cim)=0
 Sets the color interpolation mode value of the radial gradient brush.
 
virtual eSpreadMethod getSpreadMethod () const =0
 Retrieves the spread method value of the RadialGradientBrush element.
 
virtual void setSpreadMethod (eSpreadMethod sm)=0
 Sets spread method value of the RadialGradientBrush element.
 
virtual void setGradientStops (const CDOMGradientStopVect &stops)=0
 Set the vector of stops in this gradient. Must not be empty.
 
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.
 
virtual void addGradientStop (const IDOMGradientStopPtr &ptrGradientStop)=0
 Append a gradient stop.
 
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.
 
- Public Member Functions inherited from IDOMTransformableBrush
virtual const FMatrixgetRenderTransform () const =0
 Retrieves the render transform matrix.
 
virtual void setRenderTransform (const FMatrix &matrix)=0
 Sets the render transform matrix.
 
- Public Member Functions inherited from IDOMBrush
virtual eBrushType getBrushType () const =0
 Retrieves the type of the brush.
 
virtual float getOpacity () const =0
 Retrieves the opacity value of the brush element.
 
virtual void setOpacity (float opc)=0
 Sets the opacity value of a brush element.
 
virtual IDOMBrushPtr getAdjustedForUseInTransformedNode (IEDLClassFactory *pFactory, const FMatrix &nodeTransform)
 Get a version of this brush adjusted for use inside a node with the given transform.
 
- Public Member Functions inherited from IEDLObject
virtual const CClassIDgetClassID () const =0
 Returns class ID of IEDLObject.
 
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.
 
virtual bool clone (IEDLObjectPtr &ptrObject, IEDLClassFactory *pFactory)
 Create a copy of EDLObject.
 
- 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.
 
virtual int32 getRefCount () const =0
 Retrieve the current reference count of the actual object pointed to.
 

Static Public Member Functions

static EDL_API IDOMRadialGradientBrushPtr create (IEDLClassFactory *pFactory, const FPoint &center, const FPoint &gradientOrigin, double radiusX, double radiusY, const CDOMGradientStopVect &stops, float opacity=1.0f, const FMatrix &renderTransform=FMatrix(), eSpreadMethod spreadMethod=eNoSpread, eColorInterpolationMode colorInterpolationMode=eSRgbLinearInterpolation)
 Simplified radial gradient brush creation. Throws an IEDLError on failure.
 
static const CClassIDclassID ()
 Retrieves class id of IDOM.
 

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

IDOMRadialGradientBrush interface. A radial gradient brush defines an ellipse to be filled with the gradient. The ellipse is defined by its center, x radius, and y radius. Independently, a gradient origin is specified for the brush. The gradient origin defines the center of the gradient; a gradient stop with an offset at 0.0 defines the color at the gradient origin. The outer bound of the ellipse defines the end "point" of the gradient; that is, a gradient stop with an offset at 1.0 defines the color at the circumference of the ellipse, and all other gradient stops define their offsets relative to the radial distance between the gradient origin and the circumference.

Member Function Documentation

◆ classID()

static const CClassID & IDOMRadialGradientBrush::classID ( )
inlinestatic

Retrieves class id of IDOM.

Returns
CClassID Class id of the element

◆ create()

static EDL_API IDOMRadialGradientBrushPtr IDOMRadialGradientBrush::create ( IEDLClassFactory * pFactory,
const FPoint & center,
const FPoint & gradientOrigin,
double radiusX,
double radiusY,
const CDOMGradientStopVect & stops,
float opacity = 1.0f,
const FMatrix & renderTransform = FMatrix(),
eSpreadMethod spreadMethod = eNoSpread,
eColorInterpolationMode colorInterpolationMode = eSRgbLinearInterpolation )
static

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

Parameters
pFactoryThe EDL Class factory to use.
centerThe center point of the gradient brush ellipse
gradientOriginThe origin point of the gradient
radiusXThe x radius of the gradient brush ellipse
radiusYThe y radius of the gradient brush ellipse
stopsThe gradient stops
opacityThe alpha to use.
renderTransformThe render transform to use
spreadMethodThe desired spread method
colorInterpolationModeThe desired color interpolation mode
Returns
IDOMRadialGradientBrushPtr The new brush.

◆ createShading()

virtual IDOMShadingPatternType3BrushPtr IDOMRadialGradientBrush::createShading ( IEDLClassFactory * pFactory,
const FRect & fillArea,
bool useFirstStopColorSpace = false )
pure virtual

Create a Type3 Shading Pattern brush from this radial brush. All alpha information in the gradient stops will be dropped. The resulting brush will be generated to fill the given rectangle.

Parameters
pFactoryThe EDL class factory
fillAreaThe rectangular area that needs to be filled by the resulting brush.
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
IDOMShadingPatternType3BrushPtr The resulting brush.

◆ getCenter()

virtual const FPoint & IDOMRadialGradientBrush::getCenter ( ) const
pure virtual

Retrieves the center point of the gradient brush ellipse.

Returns
FPoint The center point of the gradient brush ellipse.

◆ getGradientOrigin()

virtual const FPoint & IDOMRadialGradientBrush::getGradientOrigin ( ) const
pure virtual

Retrieves the origin point of the radial gradient, corresponding to the gradient stop with an offset of 0.0.

Returns
FPoint The origin point of the radial gradient.

◆ getRadiusX()

virtual double IDOMRadialGradientBrush::getRadiusX ( ) const
pure virtual

Retrieves the x-radius of the gradient brush ellipse.

Returns
double The x-radius of the gradient brush ellipse.

◆ getRadiusY()

virtual double IDOMRadialGradientBrush::getRadiusY ( ) const
pure virtual

Retrieves the y-radius of the gradient brush ellipse.

Returns
double The y-radius of the gradient brush ellipse.

◆ getSimplifiedGradient()

virtual IDOMRadialGradientBrushPtr IDOMRadialGradientBrush::getSimplifiedGradient ( IEDLClassFactory * pFactory,
const FRect & fillArea )
pure virtual

Create a simplified radial gradient brush, where any repeat or reflect pad mode is converted to simple padding by repeating gradient stops as required. The resulting brush will be generated to fill the given rectangle.

Parameters
pFactoryThe EDL class factory
fillAreaThe rectangular area that needs to be filled by the resulting brush.
Returns
IDOMRadialGradientBrushPtr The simplified brush, or this brush if no action was required. This brush will be cached, so do not edit; make a clone if the returned brush needs to be changed.

◆ setCenter()

virtual void IDOMRadialGradientBrush::setCenter ( const FPoint & pt)
pure virtual

Sets the center point of the gradient brush ellipse.

Parameters
ptReference parameter to receive the center point of the gradient brush ellipse.

◆ setGradientOrigin()

virtual void IDOMRadialGradientBrush::setGradientOrigin ( const FPoint & pt)
pure virtual

Sets the origin point of the radial gradient, corresponding to the gradient stop with an offset of 0.0.

Parameters
ptThe origin point of the radial gradient.

◆ setRadiusX()

virtual void IDOMRadialGradientBrush::setRadiusX ( double r)
pure virtual

Sets the x-radius of the gradient brush ellipse.

Parameters
rThe x-radius of the ellipse

◆ setRadiusY()

virtual void IDOMRadialGradientBrush::setRadiusY ( double r)
pure virtual

Sets the y-radius of the gradient brush ellipse.

Parameters
rThe y-radius of the gradient brush ellipse.

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