rwlogo

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

List of all members | Public Member Functions | Friends
IlvGradientPattern Class Reference

Resource class. More...

#include <ilviews/base/port.h>

Inheritance diagram for IlvGradientPattern:
IlvPattern IlvResource

Public Member Functions

 IlvGradientPattern (IlvDisplay *display, IlvColor *start, IlvColor *end, IlvDim width, IlvDim height, IlvGradientGeometry *geometry, IlvGradientSpread spread, const char *alias=0)
 Constructor. More...
 
 IlvGradientPattern (IlvDisplay *display, IlvColorStop **colorStops, IlUInt nColorStops, IlvDim width, IlvDim height, IlvGradientGeometry *geometry, IlvGradientSpread spread, const char *alias=0)
 Constructor. More...
 
void addColorStop (IlvColorStop *colorStop)
 Adds a color stop. More...
 
const char * getAlias () const
 Gets the alias of the gradient pattern. More...
 
IlvColorStopgetColorStop (IlUInt index) const
 Gets the color stop at the specified index. More...
 
IlUInt getColorStopsCount () const
 Gets the number of color stops of this gradient. More...
 
IlvGradientGeometrygetGeometry () const
 Gets the geometry of the gradient pattern. More...
 
IlvGradientSpread getSpread () const
 Gets the type of spread of the gradient pattern. More...
 
IlBoolean removeColorStop (IlvColorStop *colorStop)
 Removes a color stop. More...
 
void setAlias (const char *alias)
 Sets the alias of the gradient pattern. More...
 
IlBoolean setColorStopOffset (IlvColorStop *colorStop, IlFloat offset)
 Sets a color stop offset. More...
 
void setGeometry (IlvGradientGeometry *geometry)
 Sets the geometry of the gradient pattern. More...
 
void setHeight (IlvDim height)
 Sets the height of the gradient pattern. More...
 
void setSpread (IlvGradientSpread spread)
 Sets the type of spread of the gradient pattern. More...
 
void setWidth (IlvDim width)
 Sets the width of the gradient pattern. More...
 
- Public Member Functions inherited from IlvPattern
 IlvPattern (IlvDisplay *display, IlvDim width, IlvDim height, unsigned char *data)
 Constructor. More...
 
 IlvPattern (IlvBitmap *bitmap)
 Constructor. More...
 
virtual IlUShort depth () const
 Retrieves the depth (number of bits that define a pixel value) of this pattern. More...
 
unsigned char * getBitmapData (IlUInt &size) const
 Retrieves the pixels of this pattern. More...
 
IlvDim height () const
 Retrieves the height of this pattern. More...
 
void putBitmapData (unsigned char *data, IlUInt size)
 Modifies the pixels of this pattern. More...
 
IlvDim width () const
 Retrieves the width of this pattern. More...
 
- Public Member Functions inherited from IlvResource
IlvDisplaygetDisplay () const
 Gets the IlvDisplay instance. More...
 
const char * getName () const
 Gets the resource name. More...
 
void lock ()
 Locks the resource. More...
 
virtual void setName (const char *name)
 Sets the name of the resource. More...
 
virtual void unLock ()
 Unlocks the resource. More...
 

Friends

class IlvDisplay
 
class IlvGradientGeometry
 

Detailed Description

Resource class.

Library: display

Base class for gradient patterns. The IlvGradientPattern class supports linear and radial gradients. The IlvGradientPattern class is a subclass of IlvPattern. The IlvPalette class allows you to get and set the gradient pattern attribute using the following methods:

A dedicated fill style value exists for gradient patterns: IlvFillGradientPattern. If you want to use your palette to draw gradients, set an instance of IlvGradientPattern on the palette, and set the palette fill style to IlvFillGradientPattern. Gradients can only be drawn if your application is properly set to use GDI+ or Cairo for rendering. The IlvGradientPattern class has the following attributes:

For more details, read the user manual section related to gradients.

See Also
IlvGradientGeometry, IlvLinearGradientGeometry, IlvRadialGradientGeometry, IlvColorStop.

Constructor & Destructor Documentation

IlvGradientPattern::IlvGradientPattern ( IlvDisplay display,
IlvColor start,
IlvColor end,
IlvDim  width,
IlvDim  height,
IlvGradientGeometry geometry,
IlvGradientSpread  spread,
const char *  alias = 0 
)

Constructor.

This constructor initializes a new IlvGradientPattern with two colors.

Parameters
displayThe display instance.
startThe start color.
endThe end color.
widthThe width of the gradient pattern.
heightThe height of the gradient pattern.
geometryThe geometry of the gradient (radial or linear).
spreadThe type of spread.
aliasThe alias of the gradient pattern.
See Also
IlvLinearGradientGeometry, IlvRadialGradientGeometry.
IlvGradientPattern::IlvGradientPattern ( IlvDisplay display,
IlvColorStop **  colorStops,
IlUInt  nColorStops,
IlvDim  width,
IlvDim  height,
IlvGradientGeometry geometry,
IlvGradientSpread  spread,
const char *  alias = 0 
)

Constructor.

This constructor initializes a new IlvGradientPattern with several color stops. At least two color stops must be defined.

Parameters
displayThe display instance.
colorStopsAn array of color stops
nColorStopsThe number of color stops.
widthThe width of the gradient pattern.
heightThe height of the gradient pattern.
geometryThe geometry of the gradient (radial or linear).
spreadThe type of spread.
aliasThe alias of the gradient pattern.

Member Function Documentation

void IlvGradientPattern::addColorStop ( IlvColorStop colorStop)

Adds a color stop.

Parameters
colorStopThe color stop to add.
See Also
IlvColorStop.
const char* IlvGradientPattern::getAlias ( ) const

Gets the alias of the gradient pattern.

Returns
The alias of the gradient pattern.
IlvColorStop* IlvGradientPattern::getColorStop ( IlUInt  index) const

Gets the color stop at the specified index.

Parameters
indexThe index of the color stop to retrieve.
Returns
The color stop at the specified index.
IlUInt IlvGradientPattern::getColorStopsCount ( ) const

Gets the number of color stops of this gradient.

Returns
The number of color stops of this gradient.
IlvGradientGeometry* IlvGradientPattern::getGeometry ( ) const

Gets the geometry of the gradient pattern.

Returns
The geometry of the gradient pattern.
See Also
IlvLinearGradientGeometry, IlvRadialGradientGeometry.
IlvGradientSpread IlvGradientPattern::getSpread ( ) const

Gets the type of spread of the gradient pattern.

Returns
The type of spread of the gradient pattern.
IlBoolean IlvGradientPattern::removeColorStop ( IlvColorStop colorStop)

Removes a color stop.

Parameters
colorStopThe color stop to remove.
Returns
A Boolean value indicating whether the specified color stop has been found and removed.
void IlvGradientPattern::setAlias ( const char *  alias)

Sets the alias of the gradient pattern.

Parameters
aliasThe new alias of the gradient pattern.
IlBoolean IlvGradientPattern::setColorStopOffset ( IlvColorStop colorStop,
IlFloat  offset 
)

Sets a color stop offset.

Parameters
colorStopThe color stop to set the offset on.
offsetThe offset to set on the color stop.
Returns
A Boolean value indicating whether the specified color stop has been found and the new offset properly set.
void IlvGradientPattern::setGeometry ( IlvGradientGeometry geometry)

Sets the geometry of the gradient pattern.

Parameters
geometryThe new geometry of the gradient pattern.
See Also
IlvLinearGradientGeometry, IlvRadialGradientGeometry.
void IlvGradientPattern::setHeight ( IlvDim  height)

Sets the height of the gradient pattern.

Parameters
heightThe new height of the gradient pattern.
See Also
IlvPattern::height()
void IlvGradientPattern::setSpread ( IlvGradientSpread  spread)

Sets the type of spread of the gradient pattern.

Parameters
spreadThe new type of spread of the gradient pattern.
void IlvGradientPattern::setWidth ( IlvDim  width)

Sets the width of the gradient pattern.

Parameters
widthThe new width of the gradient pattern.
See Also
IlvPattern::width()

© Copyright 2014, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.