rwlogo

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

List of all members | Public Member Functions
IlvHueRotateFilter Class Reference

Hue rotate filter. More...

#include <ilviews/bitmaps/filters/colmatrix.h>

Inheritance diagram for IlvHueRotateFilter:
IlvColorMatrixFilter IlvBitmapFilter

Public Member Functions

 IlvHueRotateFilter (IlFloat angle=0.0)
 Constructor. More...
 
IlFloat getAngle () const
 Returns the hue rotation angle. More...
 
void setAngle (IlFloat angle)
 Sets the rotation angle for the hue. More...
 
- Public Member Functions inherited from IlvColorMatrixFilter
 IlvColorMatrixFilter (const IlFloat *values=0)
 Constructor. More...
 
 ~IlvColorMatrixFilter ()
 Destructor. More...
 
IlvBitmapDataapply (IlUInt count=0, const IlvBitmapData **inputs=0)
 Applies the color matrix to the given image.
 
const IlFloatgetValues (IlUInt &count) const
 Returns the matrix coefficients. More...
 
void setValues (const IlFloat *values)
 Sets the matrix coefficients. More...
 
void setValues (IlFloat a00, IlFloat a01, IlFloat a02, IlFloat a03, IlFloat a04, IlFloat a10, IlFloat a11, IlFloat a12, IlFloat a13, IlFloat a14, IlFloat a20, IlFloat a21, IlFloat a22, IlFloat a23, IlFloat a24, IlFloat a30, IlFloat a31, IlFloat a32, IlFloat a33, IlFloat a34)
 Sets the matrix coefficients. More...
 
- Public Member Functions inherited from IlvBitmapFilter
 IlvBitmapFilter ()
 Constructor. More...
 
virtual ~IlvBitmapFilter ()
 Destructor. More...
 
IlvBitmapDataapplyUnary (const IlvBitmapData *data)
 Convenience method for unary filters. More...
 
virtual const char * getClassName () const
 Returns the class name of the filter. More...
 
IlUInt getHeight () const
 Returns the height of the filter effect region. More...
 
const char *const * getInputs (IlUInt &count) const
 Returns the name of the input bitmap data. More...
 
const char * getName () const
 Returns the name of the filter. More...
 
IlUInt getRefCount () const
 Returns the reference count for this instance.
 
const char * getResult () const
 Returns the name of the result bitmap data. More...
 
IlUInt getWidth () const
 Returns the width of the filter effect region. More...
 
IlInt getX () const
 Returns the left coordinate of the filter effect region. More...
 
IlInt getY () const
 Returns the top coordinate of the filter effect region. More...
 
void lock ()
 Locks the current instance.
 
void setHeight (IlUInt height)
 Sets the height of the filter effect region. More...
 
void setInputs (IlUInt count, const char *const *name)
 Sets the input names of the filter. More...
 
void setName (const char *id)
 Sets the name of the filter. More...
 
void setResult (const char *name)
 Sets the result name of the filter. More...
 
void setWidth (IlUInt width)
 Sets the width of the filter effect region. More...
 
void setX (IlInt x)
 Sets the left coordinate of the filter effect region. More...
 
void setY (IlInt y)
 Sets the top coordinate of the filter effect region. More...
 
void unLock ()
 Unlocks the current instance. When the reference count is 0, the instance is deleted.
 

Additional Inherited Members

- Static Public Member Functions inherited from IlvBitmapFilter
static IlvBitmapFilterCreate (const char *classname, IlBoolean forceLoad=IlTrue)
 This static method creates an instance of a bitmap filter of given classname. If the filter class is not registered and forceLoad is IlTrue, an attempt to load a dynamic module for this filter is made. More...
 
static const char ** GetRegisteredFilters (IlUInt &num)
 This static method returns an array of registered filter class names. More...
 

Detailed Description

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.

See Also
IlvRGBBitmapData, IlvBitmapFilter, IlvColorMatrixFilter, IlvLuminanceToAlphaFilter, IlvSaturationFilter

Constructor & Destructor Documentation

IlvHueRotateFilter::IlvHueRotateFilter ( IlFloat  angle = 0.0)

Constructor.

Initializes a new instance of an IlvHueRotateFilter. The default angle is 0.

Parameters
angleThe angle to rotate the hue.

Member Function Documentation

IlFloat IlvHueRotateFilter::getAngle ( ) const

Returns the hue rotation angle.

Returns
The hue rotation angle.
void IlvHueRotateFilter::setAngle ( IlFloat  angle)

Sets the rotation angle for the hue.

Parameters
angleThe angle to use.

© 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.