Views
Foundation Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions
IlvGradientGraphicBBoxManager Class Reference

Graphic class. More...

#include <ilviews/base/graphic.h>

Public Member Functions

 IlvGradientGraphicBBoxManager (const IlvPalette *palette, IlvGraphic *graphic, const IlvTransformer *t=0)
 Initializes a new IlvGradientGraphicBBoxManager using the bounding box of an IlvGraphic. More...
 
 IlvGradientGraphicBBoxManager (const IlvPalette *palette, IlvRect bbox)
 Initializes a new IlvGradientGraphicBBoxManager. More...
 
 ~IlvGradientGraphicBBoxManager ()
 Destructor. More...
 

Detailed Description

Graphic class.

Library: views

The IlvGradientGraphicBBoxManager class defines the bounding box which the gradient may need to compute its transformer. The bounding box is only needed when the gradient transform mode is IlvGradientTransformGraphic or IlvGradientTransformGraphicNoResize.

When instantiating this class, set a bounding box on the gradient if none has previously been set before. On destruction of this instance, the bounding box is unset from the gradient.

The most common way to use this class is to instantiate it on the stack in the IlvGraphic::draw() method overrides before performing any call to drawing primitives. When exiting from the draw(), the IlvGradientGraphicBBoxManager instance destructor will be called, and the bounding box set on the gradient will be unset.

See also
IlvGradientPattern::setTransformMode(), IlvGraphic::draw(),

Constructor & Destructor Documentation

◆ IlvGradientGraphicBBoxManager() [1/2]

IlvGradientGraphicBBoxManager::IlvGradientGraphicBBoxManager ( const IlvPalette palette,
IlvGraphic graphic,
const IlvTransformer t = 0 
)

Initializes a new IlvGradientGraphicBBoxManager using the bounding box of an IlvGraphic.

The IlvGradientGraphicBBoxManager constructor sets a graphic bounding box on the gradient defined in the provided IlvPalette instance.

If no gradient is set on this palette, this method does nothing.

Parameters
paletteThe palette of the graphic object.
graphicThe graphic object of the bounding box which is to be retreived.
tAn optional transformer used internally to compute the graphic object bounding box.
See also
IlvGraphic::boundingBox().

◆ IlvGradientGraphicBBoxManager() [2/2]

IlvGradientGraphicBBoxManager::IlvGradientGraphicBBoxManager ( const IlvPalette palette,
IlvRect  bbox 
)

Initializes a new IlvGradientGraphicBBoxManager.

The IlvGradientGraphicBBoxManager constructor sets a bounding box on the gradient defined in the provided IlvPalette instance.

If no gradient is set on this palette, this method does nothing.

Parameters
paletteThe palette of the graphic object.
bboxThe bounding box to set on the gradient.

◆ ~IlvGradientGraphicBBoxManager()

IlvGradientGraphicBBoxManager::~IlvGradientGraphicBBoxManager ( )

Destructor.

The IlvGradientGraphicBBoxManager destructor unsets the bounding box from the gradient defined in the IlvPalette instance provided in the constructor.

If no gradient is set on this palette, this method does nothing.