Mako 7.3.0 API
IDOMBrush Class Referenceabstract

Interface to the brush element. More...

#include <idombrush.h>

Inheritance diagram for IDOMBrush:

Public Types

enum  eBrushType {
  eSolidColor , eLinearGradient , eRadialGradient , eImage ,
  eMasked , eVisual , eSoftMask , eTilingPattern ,
  eType1ShadingPattern , eType2ShadingPattern , eType3ShadingPattern , eType4567ShadingPattern ,
  eNull
}
 Brush type enumeration. More...
 

Public Member Functions

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...
 

Additional Inherited Members

- Protected Member Functions inherited from IRCObject
virtual ~IRCObject ()
 Virtual destructor.
 

Detailed Description

Interface to the brush element.

Brushes are used to paint the interior of the geometric shapes defined by a Path and the characters rendered by a Glyphs node. They are also used to define the alpha-transparency mask in the IDOMCanvas::OpacityMask, IDOMPathNode::OpacityMask, and IDOMGlyphs::OpacityMask properties.

All brushes are defined relative to a coordinate space. Most brushes (including image brushes, visual brushes, linear gradient brushes, and radial gradient brushes) may specify a coordinate space transform, in which the transform property is concatenated with the current effective coordinate space to yield an effective coordinate space local to the brush. For image brushes and visual brushes, the viewport is transformed using the local effective render transform. For linear gradient brushes, the start point and end point are transformed. For radial gradient brushes, the center, x-radius, y-radius, and gradient origin are transformed.

If there is an alpha component of the color, it is combined in a muliplicative way with the opacity value.

Note
Overprint information is stored in a property attached to each node that has overprint set - the "Device Params". You can retrieve it with:
uint32 devParams = 0;
PValue val;
if (node->getProperty("DeviceParams", val))
{
devParams = (uint32) val.getInt32();
}
Stores a "property" value that is tagged with an enumeration value that indicates the underlying type...
Definition: edlproperty.h:31

It's a set of flags. The most relevant values are:

#define OVERPRINT_MODE 1
#define OVERPRINT_FILL 2
#define OVERPRINT_STROKE 4

Member Function Documentation

◆ getAdjustedForUseInTransformedNode()

virtual IDOMBrushPtr IDOMBrush::getAdjustedForUseInTransformedNode ( IEDLClassFactory pFactory,
const FMatrix nodeTransform 
)
virtual

Get a version of this brush adjusted for use inside a node with the given transform.

That is, it adjusts the transform by post-multiplying the render transform with the inverse of the given transform.

If the brush is not transformable, or if the transform is degenerate (where the matrix of the brush is irrelevant), then the original brush will be returned.

This will also adjust the sub-brush, if this is a masked brush.

Parameters
pFactoryThe factory to use.
nodeTransformThe transform of the node in question.
Returns
IDOMBrushPtr The resulting brush.

◆ getBrushType()

virtual eBrushType IDOMBrush::getBrushType ( ) const
pure virtual

Retrieves the type of the brush.

Returns
eBrushType the brush type

◆ getOpacity()

virtual float IDOMBrush::getOpacity ( ) const
pure virtual

Retrieves the opacity value of the brush element.

The opacity value defines the uniform transparency of the canvas. This is a number between 0 (fully transparent) and 1 (fully opaque). Default value 1.0

Returns
float The function returns the brush's opacity value

◆ setOpacity()

virtual void IDOMBrush::setOpacity ( float  opc)
pure virtual

Sets the opacity value of a brush element.

Parameters
opcThe opacity value

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