rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvComposeFilter Class Reference

Compose filter. More...

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

Inheritance diagram for IlvComposeFilter:
IlvBitmapFilter

List of all members.

Public Types

enum  Operator {
  Over, In, Out, Atop,
  Xor, Arithmetic
}
 

This enumeration defines the possible values for the composition mode.

More...

Public Member Functions

 IlvComposeFilter (Operator op=Over, IlFloat k1=0.0, IlFloat k2=0.0, IlFloat k3=0.0, IlFloat k4=0.0)
 Constructor.
 ~IlvComposeFilter ()
 Destructor.
IlvBitmapDataapply (IlUInt count=0, const IlvBitmapData **inputs=0)
 Applies the compositing to the given images.
void getArithmeticValues (IlFloat &k1, IlFloat &k2, IlFloat &k3, IlFloat &k4) const
 Returns the Arithmetic operator parameters.
IlFloat getK1 () const
 Returns the k1 parameter of the Arithmetic operator.
IlFloat getK2 () const
 Returns the k2 parameter of the Arithmetic operator.
IlFloat getK3 () const
 Returns the k3 parameter of the Arithmetic operator.
IlFloat getK4 () const
 Returns the k4 parameter of the Arithmetic operator.
Operator getOperator () const
 Returns the compositing operator.
void setArithmeticValues (IlFloat k1, IlFloat k2, IlFloat k3, IlFloat k4)
 Sets the Arithmetic operator parameters.
void setK1 (IlFloat k1)
 Sets the k1 parameter of the Arithmetic operator.
void setK2 (IlFloat k2)
 Sets the k2 parameter of the Arithmetic operator.
void setK3 (IlFloat k3)
 Sets the k3 parameter of the Arithmetic operator.
void setK4 (IlFloat k4)
 Sets the k4 parameter of the Arithmetic operator.
void setOperator (Operator op)
 Sets the compositing operator.

Detailed Description

Compose filter.

Library: ilvbmpflt

This bitmap filter lets you compose two images using the Porter-Duff operators over, in out, atop, xor, and an arithmetic operator. The resulting color is given by the formula:

Cresult = Fa * Ca + Fb * Cb

Ca is the color from the first image, Cb is the color from the second image. Aa is the alpha value from the first image, Ab is the alpha value from the second image.

For the arithmetic operator each pixel is computed as follows:

Cresult = k1 * Ca * Cb + k2 * Ca + k3 * Ca * Cb + k4

where k1, k2, k3, and k4 are user-specified.

See also:
IlvRGBBitmapData, IlvBitmapFilter

Member Enumeration Documentation

This enumeration defines the possible values for the composition mode.

Enumerator:
Over 

The Porter-Duff operator used is Over. Fa = 1, Fb = 1 - Aa

In 

The Porter-Duff operator used is In. Fa = Ab, Fb = 0

Out 

The Porter-Duff operator used is Out. Fa = 1 - Ab, Fb = 0

Atop 

The Porter-Duff operator used is Atop. Fa = Ab, Fb = 1 - Aa

Xor 

The Porter-Duff operator used is Xor. Fa = 1 - Ab, Fb = a - Aa

Arithmetic 

The operator used is Arithmetic. This mode needs additional parameters (see IlvComposeFilter::setArithmeticValues).


Constructor & Destructor Documentation

IlvComposeFilter::IlvComposeFilter ( Operator  op = Over,
IlFloat  k1 = 0.0,
IlFloat  k2 = 0.0,
IlFloat  k3 = 0.0,
IlFloat  k4 = 0.0 
)

Constructor.

Initializes a new instance of the class IlvComposeFilter. The default mode is Over.

IlvComposeFilter::~IlvComposeFilter (  ) 

Destructor.

The destructor releases all the memory used by the instance.


Member Function Documentation

void IlvComposeFilter::getArithmeticValues ( IlFloat k1,
IlFloat k2,
IlFloat k3,
IlFloat k4 
) const

Returns the Arithmetic operator parameters.

Parameters:
k1 Will contain the k1 parameter.
k2 Will contain the k2 parameter.
k3 Will contain the k3 parameter.
k4 Will contain the k4 parameter.
IlFloat IlvComposeFilter::getK1 (  )  const

Returns the k1 parameter of the Arithmetic operator.

Returns:
The k1 parameter of the Arithmetic operator.
IlFloat IlvComposeFilter::getK2 (  )  const

Returns the k2 parameter of the Arithmetic operator.

Returns:
The k2 parameter of the Arithmetic operator.
IlFloat IlvComposeFilter::getK3 (  )  const

Returns the k3 parameter of the Arithmetic operator.

Returns:
The k3 parameter of the Arithmetic operator.
IlFloat IlvComposeFilter::getK4 (  )  const

Returns the k4 parameter of the Arithmetic operator.

Returns:
The k4 parameter of the Arithmetic operator.
Operator IlvComposeFilter::getOperator (  )  const

Returns the compositing operator.

Returns:
The compositing operator.
void IlvComposeFilter::setArithmeticValues ( IlFloat  k1,
IlFloat  k2,
IlFloat  k3,
IlFloat  k4 
)

Sets the Arithmetic operator parameters.

Parameters:
k1 The new k1 parameter.
k2 The new k2 parameter.
k3 The new k3 parameter.
k4 The new k4 parameter.
void IlvComposeFilter::setK1 ( IlFloat  k1  ) 

Sets the k1 parameter of the Arithmetic operator.

Parameters:
k1 The new k1 parameter of the Arithmetic operator.
void IlvComposeFilter::setK2 ( IlFloat  k2  ) 

Sets the k2 parameter of the Arithmetic operator.

Parameters:
k2 The new k2 parameter of the Arithmetic operator.
void IlvComposeFilter::setK3 ( IlFloat  k3  ) 

Sets the k3 parameter of the Arithmetic operator.

Parameters:
k3 The new k3 parameter of the Arithmetic operator.
void IlvComposeFilter::setK4 ( IlFloat  k4  ) 

Sets the k4 parameter of the Arithmetic operator.

Parameters:
k4 The new k4 parameter of the Arithmetic operator.
void IlvComposeFilter::setOperator ( Operator  op  ) 

Sets the compositing operator.

Parameters:
op The new compositing operator.

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