Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Hue rotate filter. More...
#include <ilviews/bitmaps/filters/colmatrix.h>
Public Member Functions | |
IlvHueRotateFilter (IlFloat angle=0.0) | |
Constructor. | |
IlFloat | getAngle () const |
Returns the hue rotation angle. | |
void | setAngle (IlFloat angle) |
Sets the rotation angle for the hue. |
Hue rotate filter.
Library: ilvbmpflt
This bitmap filter lets you rotate the hue value of the color components of an image. The hue rotate operation is equivalent to the following matrix operation:
R' = a00 a01 a02 0 0 R G' = a10 a11 a12 0 0 G B' = a20 a21 a22 0 0 B A' = 0 0 0 1 0 A 1 = 0 0 0 0 1 1
where the terms a00, a01, etc., are calculated as follows:
| a00 a01 a02 | [+0.213 +0.715 +0.072] | a10 a11 a12 | = [+0.213 +0.715 +0.072] + | a20 a21 a22 | [+0.213 +0.715 +0.072]
[+0.787 -0.715 -0.072] cos(angle) * [-0.212 +0.285 -0.072] + [-0.213 -0.715 +0.928]
[-0.213 -0.715+0.928] sin(angle) * [+0.143 +0.140-0.283] [-0.787 +0.715+0.072]
Thus, the upper left term of the hue matrix turns out to be: .213 + cos(hueRotate value)*.787 - sin(hueRotate value)*.213
The angle is given in degrees.
IlvRGBBitmapData
, IlvBitmapFilter
, IlvColorMatrixFilter
, IlvLuminanceToAlphaFilter
, IlvSaturationFilter
IlvHueRotateFilter::IlvHueRotateFilter | ( | IlFloat | angle = 0.0 |
) |
Constructor.
Initializes a new instance of an IlvHueRotateFilter
. The default angle is 0
.
angle | The angle to rotate the hue. |
IlFloat IlvHueRotateFilter::getAngle | ( | ) | const |
Returns the hue rotation angle.
void IlvHueRotateFilter::setAngle | ( | IlFloat | angle | ) |
Sets the rotation angle for the hue.
angle | The angle to use. |
© 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.