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

#include <ilviews/base/port.h>

Public Member Functions

 IlvColorStop (IlvColor *color, IlFloat offset, IlvIntensity alpha=IlvFullIntensity)
 Constructor. More...
 
IlvIntensity getAlpha () const
 Gets the alpha value. More...
 
IlvColor * getColor () const
 Gets the color. More...
 
IlFloat getOffset () const
 Gets the offset. More...
 
void setAlpha (IlvIntensity alpha)
 Sets the alpha value. More...
 
void setColor (IlvColor *color)
 Sets the color. More...
 
void setOffset (IlFloat offset)
 Sets the offset. More...
 

Detailed Description

Library: xviews or winviews or mviews (mutually exclusive)

Class implementing gradient color stops. A color stop is defined by a color, an alpha value and an offset between 0 and 1. The offset indicates where the color stop should take place along the gradient, 0 being the beginning of the gradient, and 1 the end.

See also
IlvGradientPattern

Constructor & Destructor Documentation

◆ IlvColorStop()

IlvColorStop::IlvColorStop ( IlvColor *  color,
IlFloat  offset,
IlvIntensity  alpha = IlvFullIntensity 
)

Constructor.

This constructor initializes a new IlvColorStop instance.

Parameters
colorThe color.
offsetAn offset value in the range [0.0 .. 1.0].
alphaAn alpha value.

Member Function Documentation

◆ getAlpha()

IlvIntensity IlvColorStop::getAlpha ( ) const

Gets the alpha value.

Returns
The alpha value of the color stop.

◆ getColor()

IlvColor* IlvColorStop::getColor ( ) const

Gets the color.

Returns
The color set on this color stop.

◆ getOffset()

IlFloat IlvColorStop::getOffset ( ) const

Gets the offset.

Returns
The offset of this color stop.

◆ setAlpha()

void IlvColorStop::setAlpha ( IlvIntensity  alpha)

Sets the alpha value.

The alpha value indicates the amount of transparency of this color stop.

Parameters
alphaThe alpha value to set on the color stop.

◆ setColor()

void IlvColorStop::setColor ( IlvColor *  color)

Sets the color.

Parameters
colorThe color to set on the color stop.

◆ setOffset()

void IlvColorStop::setOffset ( IlFloat  offset)

Sets the offset.

The offset value should be between 0 and 1 and indicates where the color stop should take place along the gradient, 0 being the beginning of the gradient, and 1 the end.

Parameters
offsetThe offset to set on the color stop.