rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvGradientPattern Class Reference

Resource class. More...

#include <ilviews/base/port.h>

Inheritance diagram for IlvGradientPattern:
IlvPattern IlvResource

List of all members.

Public Member Functions

 IlvGradientPattern (IlvDisplay *display, IlvColorStop **colorStops, IlUInt nColorStops, IlvDim width, IlvDim height, IlvGradientGeometry *geometry, IlvGradientSpread spread, const char *alias=0)
 Constructor.
 IlvGradientPattern (IlvDisplay *display, IlvColor *start, IlvColor *end, IlvDim width, IlvDim height, IlvGradientGeometry *geometry, IlvGradientSpread spread, const char *alias=0)
 Constructor.
void addColorStop (IlvColorStop *colorStop)
 Adds a color stop.
const char * getAlias () const
 Gets the alias of the gradient pattern.
IlvColorStopgetColorStop (IlUInt index) const
 Gets the color stop at the specified index.
IlUInt getColorStopsCount () const
 Gets the number of color stops of this gradient.
IlvGradientGeometrygetGeometry () const
 Gets the geometry of the gradient pattern.
IlvGradientSpread getSpread () const
 Gets the type of spread of the gradient pattern.
IlBoolean removeColorStop (IlvColorStop *colorStop)
 Removes a color stop.
void setAlias (const char *alias)
 Sets the alias of the gradient pattern.
IlBoolean setColorStopOffset (IlvColorStop *colorStop, IlFloat offset)
 Sets a color stop offset.
void setGeometry (IlvGradientGeometry *geometry)
 Sets the geometry of the gradient pattern.
void setHeight (IlvDim height)
 Sets the height of the gradient pattern.
void setSpread (IlvGradientSpread spread)
 Sets the type of spread of the gradient pattern.
void setWidth (IlvDim width)
 Sets the width of the gradient pattern.

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:
display The display instance.
start The start color.
end The end color.
width The width of the gradient pattern.
height The height of the gradient pattern.
geometry The geometry of the gradient (radial or linear).
spread The type of spread.
alias The 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:
display The display instance.
colorStops An array of color stops
nColorStops The number of color stops.
width The width of the gradient pattern.
height The height of the gradient pattern.
geometry The geometry of the gradient (radial or linear).
spread The type of spread.
alias The alias of the gradient pattern.

Member Function Documentation

void IlvGradientPattern::addColorStop ( IlvColorStop colorStop  ) 

Adds a color stop.

Parameters:
colorStop The 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:
index The 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:
colorStop The 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:
alias The new alias of the gradient pattern.
IlBoolean IlvGradientPattern::setColorStopOffset ( IlvColorStop colorStop,
IlFloat  offset 
)

Sets a color stop offset.

Parameters:
colorStop The color stop to set the offset on.
offset The 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:
geometry The new geometry of the gradient pattern.
See also:
IlvLinearGradientGeometry, IlvRadialGradientGeometry.
void IlvGradientPattern::setHeight ( IlvDim  height  ) 

Sets the height of the gradient pattern.

Parameters:
height The 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:
spread The new type of spread of the gradient pattern.
void IlvGradientPattern::setWidth ( IlvDim  width  ) 

Sets the width of the gradient pattern.

Parameters:
width The new width of the gradient pattern.
See also:
IlvPattern::width()
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© Copyright 2012, 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.