Mako 7.3.0 API
IDOMVisualBrush Class Referenceabstract

A visual brush is used to fill a region with a vector drawing. More...

#include <idombrush.h>

Inheritance diagram for IDOMVisualBrush:

Classes

class  Data
 Initialization data. More...
 

Public Member Functions

virtual eTilingMode getTileMode () const =0
 Retrieves the tiling mode value of the visual brush. More...
 
virtual void setTileMode (eTilingMode tm)=0
 Sets tiling mode value of the visual brush. More...
 
virtual eViewUnits getViewBoxUnits () const =0
 Retrieves the viewbox units used by the image brush. Currently, only absolute units are supported. More...
 
virtual void setViewBoxUnits (eViewUnits vu)=0
 Sets the viewbox units value of the image brush. Currently, only absolute units are supported. More...
 
virtual eViewUnits getViewPortUnits () const =0
 Retrieves the viewport units value of the image brush. Currently, only absolute units are supported. More...
 
virtual void setViewPortUnits (eViewUnits vu)=0
 Sets the viewport units used for the image brush. Currently, only absolute units are supported. More...
 
virtual const FRect & getViewBox () const =0
 Retrieves the viewbox rectangle. More...
 
virtual void setViewBox (const FRect &vb)=0
 Sets viewbox rectangle. More...
 
virtual const FRect & getViewPort () const =0
 Retrieves the viewport rectangle. More...
 
virtual void setViewPort (const FRect &vp)=0
 Sets the viewport rectangle. More...
 
virtual IDOMNodePtr getVisual () const =0
 Retrieves smart pointer to the visual node (path, glyphs, group or canvas node) used to specify the source for the visual brush. More...
 
virtual void setVisual (const IDOMNodePtr &ptrVisual)=0
 Sets the visual node (path, glyphs or canvas node) used to specify the source for the visual brush. More...
 
virtual IDOMTilingPatternBrushPtr getEquivalentTilingBrush (IEDLClassFactory *pFactory)=0
 Gets an equivalent IDOMTilingPattern brush. If the receiver has a tile mode of eNoTile, this call will fail. More...
 
virtual IDOMVisualBrushPtr getEquivalentSimpleVisualBrush (IEDLClassFactory *pFactory)=0
 Gets an equivalent visual brush where any flip tile mode is simplified to simple tiling. Useful for situations where flipping cannot be handled, but simple visual brushes can. 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 IDOMVisualBrushPtr create (IEDLClassFactory *pFactory, const IDOMNodePtr &visual, const FRect &viewBox, const FRect &viewPort, const FMatrix &renderTransform=FMatrix(), float opacity=1.0f, eTilingMode tileMode=eNoTile)
 Simplified creator for a visual brush. Throws an IEDLError on failure. More...
 
static const CClassIDclassID ()
 Retrieves the class id of IDOMVisualBrush. 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

A visual brush is used to fill a region with a vector drawing.

The drawing may be specified as either a visual brush property or as a resource reference. The drawing content may include exactly one Canvas, Path, or Glyphs node and that node's child and descendant nodes.

Visual brushes share a number of tile-related properties with image brushes.

See also
IDOMImageBrush

Member Function Documentation

◆ classID()

static const CClassID& IDOMVisualBrush::classID ( )
inlinestatic

Retrieves the class id of IDOMVisualBrush.

Returns
CClassID The class id of IDOMVisualBrush.

◆ create()

static EDL_API IDOMVisualBrushPtr IDOMVisualBrush::create ( IEDLClassFactory pFactory,
const IDOMNodePtr &  visual,
const FRect &  viewBox,
const FRect &  viewPort,
const FMatrix renderTransform = FMatrix(),
float  opacity = 1.0f,
eTilingMode  tileMode = eNoTile 
)
static

Simplified creator for a visual brush. Throws an IEDLError on failure.

Parameters
pFactoryThe factory to use.
visualThe node to use as the visual.
viewBoxThe desired view box.
viewPortThe desired view port.
renderTransformThe desired render transform.
opacityThe desired brush opacity.
tileModeThe desired tile mode.
Returns
IDOMVisualBrushPtr The new visual brush.

◆ getEquivalentSimpleVisualBrush()

virtual IDOMVisualBrushPtr IDOMVisualBrush::getEquivalentSimpleVisualBrush ( IEDLClassFactory pFactory)
pure virtual

Gets an equivalent visual brush where any flip tile mode is simplified to simple tiling. Useful for situations where flipping cannot be handled, but simple visual brushes can.

Parameters
pFactoryA pointer to an EDL class factory.
Returns
IDOMVisualBrushPtr The equivalent visual brush, or this brush if no changes are required. This brush will be cached, so do not edit; make a clone if the returned brush needs to be changed.

◆ getEquivalentTilingBrush()

virtual IDOMTilingPatternBrushPtr IDOMVisualBrush::getEquivalentTilingBrush ( IEDLClassFactory pFactory)
pure virtual

Gets an equivalent IDOMTilingPattern brush. If the receiver has a tile mode of eNoTile, this call will fail.

Parameters
pFactoryA pointer to an EDL class factory
Returns
IDOMTilingPatternBrushPtr The equivalent tiling brush, or NULL if a tiling brush cannot be created for this brush. This brush will be cached, so do not edit; make a clone if the returned brush needs to be changed.

◆ getTileMode()

virtual eTilingMode IDOMVisualBrush::getTileMode ( ) const
pure virtual

Retrieves the tiling mode value of the visual brush.

Returns
eTilingMode The tiling mode
See also
eTilingMode

◆ getViewBox()

virtual const FRect& IDOMVisualBrush::getViewBox ( ) const
pure virtual

Retrieves the viewbox rectangle.

The viewbox specifies the portion of a source image or visual to be rendered to the page as a tile, whose size and location are determined by the image brush's viewport. The tile is then used to fill the geometry specified by the parent element according to the image brush's tile mode. The ViewBox can specify a region larger than the image itself, including negative values. The view box specifies the position and dimension of the brush's source content. It is specified by four comma-separated real numbers (x, y, width, height) where width and height are non-negative.

Returns
FRect The viewbox

◆ getViewBoxUnits()

virtual eViewUnits IDOMVisualBrush::getViewBoxUnits ( ) const
pure virtual

Retrieves the viewbox units used by the image brush. Currently, only absolute units are supported.

See also
getViewBox()
setViewBox()
Returns
eViewUnits The viewbox units.

◆ getViewPort()

virtual const FRect& IDOMVisualBrush::getViewPort ( ) const
pure virtual

Retrieves the viewport rectangle.

The viewport specifies the dimensions and location of the initial tile that will be filled with the specified image or visual fragment. It is defined in the current effective coordinate space. It is specified by four comma separated real numbers (x, y, width, height) where width and height are non-negative.

Returns
FRect The viewport rectangle

◆ getViewPortUnits()

virtual eViewUnits IDOMVisualBrush::getViewPortUnits ( ) const
pure virtual

Retrieves the viewport units value of the image brush. Currently, only absolute units are supported.

See also
getViewPort()
setViewPort()
Returns
eViewUnits The viewport units.

◆ getVisual()

virtual IDOMNodePtr IDOMVisualBrush::getVisual ( ) const
pure virtual

Retrieves smart pointer to the visual node (path, glyphs, group or canvas node) used to specify the source for the visual brush.

Returns
IDOMNodePtr The visual

◆ setTileMode()

virtual void IDOMVisualBrush::setTileMode ( eTilingMode  tm)
pure virtual

Sets tiling mode value of the visual brush.

Parameters
tmThe tiling mode value
See also
eTilingMode

◆ setViewBox()

virtual void IDOMVisualBrush::setViewBox ( const FRect &  vb)
pure virtual

Sets viewbox rectangle.

The viewbox specifies the portion of a source image or visual to be rendered to the page as a tile. The tile is then used to fill the geometry specified by the parent element according to the TileMode() function. The viewbox can specify a region larger than the image itself, including negative values. The viewbox specifies the position and dimension of the brush's source content. It is specified by four comma-separated real numbers (x, y, width, height) where width and height are non-negative.

Parameters
vbThe viewbox rectangle

◆ setViewBoxUnits()

virtual void IDOMVisualBrush::setViewBoxUnits ( eViewUnits  vu)
pure virtual

Sets the viewbox units value of the image brush. Currently, only absolute units are supported.

See also
getViewBox()
setViewBox()
Parameters
vuThe viewbox units value

◆ setViewPort()

virtual void IDOMVisualBrush::setViewPort ( const FRect &  vp)
pure virtual

Sets the viewport rectangle.

The viewport specifies the dimensions and location of the initial tile that will be filled with the specified image or visual fragment. It is defined in the current effective coordinate space. It is specified by four comma separated real numbers (x, y, width, height) where width and height are non-negative.

Parameters
vpThe viewport rectangle

◆ setViewPortUnits()

virtual void IDOMVisualBrush::setViewPortUnits ( eViewUnits  vu)
pure virtual

Sets the viewport units used for the image brush. Currently, only absolute units are supported.

See also
getViewPort()
setViewPort()
Parameters
vuThe new viewport units value

◆ setVisual()

virtual void IDOMVisualBrush::setVisual ( const IDOMNodePtr &  ptrVisual)
pure virtual

Sets the visual node (path, glyphs or canvas node) used to specify the source for the visual brush.

Parameters
ptrVisualPointer to the visual node (path, glyphs or canvas node) used to specify the source for the visual brush.

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