![]() Rogue Wave Views 5.5.1 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Resource class. More...
#include <ilviews/base/port.h>
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. | |
| IlvColorStop * | getColorStop (IlUInt index) const |
| Gets the color stop at the specified index. | |
| IlUInt | getColorStopsCount () const |
| Gets the number of color stops of this gradient. | |
| IlvGradientGeometry * | getGeometry () 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 |
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:
IlvLinearGradientGeometry and IlvRadialGradientGeometry which both derive from the IlvGradientGeometry class. IlvColor instance, an alpha value which defines the transparency to apply on this color, and an offset value between 0 and 1 which defines the position where the color should be used along the gradient. You must set at least 2 color stops on the gradient. See class IlvColorStop for details. For more details, read the user manual section related to gradients.
| 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.
| 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. |
| 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.
| 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. |
| void IlvGradientPattern::addColorStop | ( | IlvColorStop * | colorStop | ) |
| const char* IlvGradientPattern::getAlias | ( | ) | const |
Gets the alias of the gradient pattern.
| IlvColorStop* IlvGradientPattern::getColorStop | ( | IlUInt | index | ) | const |
Gets the color stop at the specified index.
| index | The index of the color stop to retrieve. |
| IlUInt IlvGradientPattern::getColorStopsCount | ( | ) | const |
Gets the number of color stops of this gradient.
| IlvGradientGeometry* IlvGradientPattern::getGeometry | ( | ) | const |
Gets the geometry of the gradient pattern.
| IlvGradientSpread IlvGradientPattern::getSpread | ( | ) | const |
Gets the type of spread of the gradient pattern.
| IlBoolean IlvGradientPattern::removeColorStop | ( | IlvColorStop * | colorStop | ) |
Removes a color stop.
| colorStop | The color stop to remove. |
| void IlvGradientPattern::setAlias | ( | const char * | alias | ) |
Sets the alias of the gradient pattern.
| alias | The new alias of the gradient pattern. |
| IlBoolean IlvGradientPattern::setColorStopOffset | ( | IlvColorStop * | colorStop, | |
| IlFloat | offset | |||
| ) |
Sets a color stop offset.
| colorStop | The color stop to set the offset on. | |
| offset | The offset to set on the color stop. |
| void IlvGradientPattern::setGeometry | ( | IlvGradientGeometry * | geometry | ) |
Sets the geometry of the gradient pattern.
| geometry | The new geometry of the gradient pattern. |
| void IlvGradientPattern::setHeight | ( | IlvDim | height | ) |
Sets the height of the gradient pattern.
| height | The new height of the gradient pattern. |
IlvPattern::height() | void IlvGradientPattern::setSpread | ( | IlvGradientSpread | spread | ) |
Sets the type of spread of the gradient pattern.
| spread | The new type of spread of the gradient pattern. |
| void IlvGradientPattern::setWidth | ( | IlvDim | width | ) |
Sets the width of the gradient pattern.
| width | The new width of the gradient pattern. |
IlvPattern::width() © 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.