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

Provides an interface to a DOM image brush object. More...

#include <idombrush.h>

Inheritance diagram for IDOMImageBrush:

Classes

class  Data
 Initialization data. More...
 

Public Member Functions

virtual eTilingMode getTileMode () const =0
 Retrieves the tiling mode value of the image brush.
 
virtual void setTileMode (eTilingMode tm)=0
 Sets the tiling mode of the image brush.
 
virtual eViewUnits getViewBoxUnits () const =0
 Retrieves the viewbox units used by the image brush. Currently, only absolute units are supported.
 
virtual void setViewBoxUnits (eViewUnits vu)=0
 Sets the viewbox units value of the image brush. Currently, only absolute units are supported.
 
virtual eViewUnits getViewPortUnits () const =0
 Retrieves the viewport units value of the image brush. Currently, only absolute units are supported.
 
virtual void setViewPortUnits (eViewUnits vu)=0
 Sets the viewport units used for the image brush. Currently, only absolute units are supported.
 
virtual const FRect & getViewBox () const =0
 Retrieves the viewbox rectangle.
 
virtual void setViewBox (const FRect &vb)=0
 Sets the viewbox rectangle.
 
virtual const FRect & getViewPort () const =0
 Retrieves the viewport rectangle.
 
virtual void setViewPort (const FRect &vp)=0
 Sets the viewport rectangle.
 
virtual IDOMICCProfilePtr getICCProfile () const =0
 Retrieves the external ICC profile of the brush if present.
 
virtual void setICCProfile (const IDOMICCProfilePtr &icc)=0
 Retrieves the external ICC profile of the brush if present.
 
virtual IDOMImagePtr getImageSource () const =0
 Retrieves a smart pointer to the image resource.
 
virtual void setImageSource (const IDOMImagePtr &ptrImageSource)=0
 Sets the image resource for the brush.
 
virtual CDOMAlternateImageVect getAlternateImages () const =0
 Retrieves any alternate images associated with this brush.
 
virtual void setAlternateImages (const CDOMAlternateImageVect &alternates)=0
 Set the alternate images associated with this brush.
 
virtual JawsMako::IOptionalContentDetailsPtr getOptionalContentDetails () const =0
 Returns any optional content information that applies to this brush.
 
virtual void setOptionalContentDetails (const JawsMako::IOptionalContentDetailsPtr &details)=0
 Set the optional content details that apply to this brush, or NULL to remove.
 
virtual JawsMako::IPDFDictionaryPtr getPdfPropertiesDictionary () const =0
 Get the dictionary containing PDF properties attached to the image object. This dictionary will be as per the XObject dictionary in the original PDF, but with entries handled by existing DOM features stripped. In particular, the following entries described in the PDF specification will not be present in the dictionary:
 
virtual void setPdfPropertiesDictionary (const JawsMako::IPDFDictionaryPtr &propertiesDictionary)=0
 Set the dictionary containing PDF properties attached to the image object. Please see getPdfPropertiesDictionary() above for information on the form of this dictionary.
 
virtual IDOMTilingPatternBrushPtr getEquivalentTilingBrush (IEDLClassFactory *pFactory)=0
 Gets an equivalent IDOMTilingPattern brush. If the receiver has a tile mode of eNoTile, this call will fail.
 
virtual IDOMVisualBrushPtr getEquivalentVisualBrush (IEDLClassFactory *pFactory)=0
 For tiled images, returns an equivalent visual brush containing the image without tiling. Will throw an exception if the image is not tiled. Not available for masked brushes as tiling is not supported for those brushes.
 
- 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.
 
- Public Member Functions inherited from IDOMHashable
virtual ~IDOMHashable ()
 Virtual destructor.
 
virtual bool hash (uint64 &hash)=0
 Retrieve a hash for this object.
 
virtual uint64 hashE ()
 As hash(), but throws an exception if the operation fails.
 

Static Public Member Functions

static EDL_API IDOMImageBrushPtr create (IEDLClassFactory *pFactory, const IDOMImagePtr &image, const FRect &viewBox, const FRect &viewPort, const FMatrix &renderTransform=FMatrix(), float opacity=1.0f, eTilingMode tileMode=eNoTile, const CDOMAlternateImageVect &alternateImages=CDOMAlternateImageVect(), const JawsMako::IOptionalContentDetailsPtr &optionalContentDetails=JawsMako::IOptionalContentDetailsPtr(), const JawsMako::IPDFDictionaryPtr &propertiesDictionary=JawsMako::IPDFDictionaryPtr())
 Simplified creator for an image brush. 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

Provides an interface to a DOM image brush object.

An image brush is used to fill a region with an image. The image is defined in a coordinate space specified by the resolution of the image.

Member Function Documentation

◆ classID()

static const CClassID & IDOMImageBrush::classID ( )
inlinestatic

Retrieves class id of IDOM.

Returns
CClassID Class id of the element

◆ create()

static EDL_API IDOMImageBrushPtr IDOMImageBrush::create ( IEDLClassFactory * pFactory,
const IDOMImagePtr & image,
const FRect & viewBox,
const FRect & viewPort,
const FMatrix & renderTransform = FMatrix(),
float opacity = 1.0f,
eTilingMode tileMode = eNoTile,
const CDOMAlternateImageVect & alternateImages = CDOMAlternateImageVect(),
const JawsMako::IOptionalContentDetailsPtr & optionalContentDetails = JawsMako::IOptionalContentDetailsPtr(),
const JawsMako::IPDFDictionaryPtr & propertiesDictionary = JawsMako::IPDFDictionaryPtr() )
static

Simplified creator for an image brush. Throws an IEDLError on failure.

Parameters
pFactoryThe factory to use.
imageThe image to use.
viewBoxThe desired view box. If empty, the viewPort will be set to the full area of the image.
viewPortThe desired view port.
renderTransformThe desired render transform.
opacityThe desired brush opacity.
tileModeThe desired tile mode.
alternateImagesThe PDF Alternate image brushes, if present.
optionalContentDetailsThe optional content details. Ignored for tiling images
propertiesDictionaryDictionary containing any additional PDF properties
Returns
IDOMImageBrushPtr The new brush.

◆ getAlternateImages()

virtual CDOMAlternateImageVect IDOMImageBrush::getAlternateImages ( ) const
pure virtual

Retrieves any alternate images associated with this brush.

Returns
CDOMAlternateImageVect The alternate images, or an empty vector if there are no alternates.

◆ getEquivalentTilingBrush()

virtual IDOMTilingPatternBrushPtr IDOMImageBrush::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 resulting tiling brush. This brush will be cached, so do not edit; make a clone if the returned brush needs to be changed.

◆ getEquivalentVisualBrush()

virtual IDOMVisualBrushPtr IDOMImageBrush::getEquivalentVisualBrush ( IEDLClassFactory * pFactory)
pure virtual

For tiled images, returns an equivalent visual brush containing the image without tiling. Will throw an exception if the image is not tiled. Not available for masked brushes as tiling is not supported for those brushes.

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

◆ getICCProfile()

virtual IDOMICCProfilePtr IDOMImageBrush::getICCProfile ( ) const
pure virtual

Retrieves the external ICC profile of the brush if present.

Returns
IDOMICCProfilePtr The profile of the image, or NULL if no profile provided.

◆ getImageSource()

virtual IDOMImagePtr IDOMImageBrush::getImageSource ( ) const
pure virtual

Retrieves a smart pointer to the image resource.

Returns
IDOMImagePtr the image resource

◆ getOptionalContentDetails()

virtual JawsMako::IOptionalContentDetailsPtr IDOMImageBrush::getOptionalContentDetails ( ) const
pure virtual

Returns any optional content information that applies to this brush.

Returns
IOptionalContentDetailsPtr The optional content details, or NULL if optional content details do not apply

◆ getPdfPropertiesDictionary()

virtual JawsMako::IPDFDictionaryPtr IDOMImageBrush::getPdfPropertiesDictionary ( ) const
pure virtual

Get the dictionary containing PDF properties attached to the image object. This dictionary will be as per the XObject dictionary in the original PDF, but with entries handled by existing DOM features stripped. In particular, the following entries described in the PDF specification will not be present in the dictionary:

  • Type
  • Subtype
  • Width
  • Height
  • ColorSpace
  • BitsPerComponent
  • Intent
  • ImageMask
  • Mask
  • Decode
  • Interpolate
  • Alternates
  • SMask
  • SMaskInData
  • Name
  • OC
    Returns
    IPDFDictionaryPtr The properties dictionary, or NULL if not present. If non-null, the dictionary may be edited freely.

◆ getTileMode()

virtual eTilingMode IDOMImageBrush::getTileMode ( ) const
pure virtual

Retrieves the tiling mode value of the image brush.

See also
eTilingMode
Returns
eTilingMode The image tiling mode.

◆ getViewBox()

virtual const FRect & IDOMImageBrush::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 rectangle

◆ getViewBoxUnits()

virtual eViewUnits IDOMImageBrush::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 & IDOMImageBrush::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 IDOMImageBrush::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.

◆ setAlternateImages()

virtual void IDOMImageBrush::setAlternateImages ( const CDOMAlternateImageVect & alternates)
pure virtual

Set the alternate images associated with this brush.

Parameters
alternatesThe alternate images.

◆ setICCProfile()

virtual void IDOMImageBrush::setICCProfile ( const IDOMICCProfilePtr & icc)
pure virtual

Retrieves the external ICC profile of the brush if present.

Parameters
iccThe profile of the image, or NULL to clear

◆ setImageSource()

virtual void IDOMImageBrush::setImageSource ( const IDOMImagePtr & ptrImageSource)
pure virtual

Sets the image resource for the brush.

Parameters
ptrImageSourceSmart pointer to the new image resource.

◆ setOptionalContentDetails()

virtual void IDOMImageBrush::setOptionalContentDetails ( const JawsMako::IOptionalContentDetailsPtr & details)
pure virtual

Set the optional content details that apply to this brush, or NULL to remove.

Parameters

b details The optional content details, or NULL to remove

◆ setPdfPropertiesDictionary()

virtual void IDOMImageBrush::setPdfPropertiesDictionary ( const JawsMako::IPDFDictionaryPtr & propertiesDictionary)
pure virtual

Set the dictionary containing PDF properties attached to the image object. Please see getPdfPropertiesDictionary() above for information on the form of this dictionary.

Parameters
propertiesDictionaryThe properties dictionary to set, or NULL to clear.

◆ setTileMode()

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

Sets the tiling mode of the image brush.

Parameters
tmThe tiling mode value

◆ setViewBox()

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

Sets the 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 IDOMImageBrush::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 IDOMImageBrush::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 IDOMImageBrush::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

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