rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvBlendFilter Class Reference

Blend filter. More...

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

Inheritance diagram for IlvBlendFilter:
IlvBitmapFilter

List of all members.

Public Types

enum  BlendMode {
  Normal, Multiply, Screen, Darken,
  Lighten
}

Public Member Functions

 IlvBlendFilter (BlendMode mode=Normal)
 Constructor.
 ~IlvBlendFilter ()
 Destructor.
IlvBitmapDataapply (IlUInt count=0, const IlvBitmapData **datas=0)
 Applies the blending to the given images.
BlendMode getMode () const
 Returns the blending mode.
void setMode (BlendMode mode)
 Sets the mode used for blending the images.

Detailed Description

Blend filter.

Library: ilvbmpflt

This bitmap filter lets you blend two images together using predefined modes.

See also:
IlvRGBBitmapData, IlvBitmapFilter BlendMode

Member Enumeration Documentation

This enumeration defines the possible values for the blend mode. For all blend modes, the resulting opacity is computed as follows: qr = 1 - (1 - qa) * (1 - qb)

For the blending formulas below, the following apply:

cr = Result color (RGB) - premultiplied
qa Opacity value at a given pixel for image A
qb Opacity value at a given pixel for image B
ca = Color (RGB) at a given pixel for image A - premultiplied
cb = Color (RGB) at a given pixel for image B - premultiplied

See also:
IlvBlendFilter::setMode, IlvBlendFilter::getMode
Enumerator:
Normal 

The formula is: cr = (1 - qa) * cb + ca

Multiply 

The formula is: cr = (1 - qa) * cb + (1 - qb) * ca + ca * cb

Screen 

The formula is: cr = cb + ca - ca * cb

Darken 

The formula is: cr = Min((1 - qa) * cb + ca, (1 - qb) * ca + cb)

Lighten 

The formula is: Max((1 - qa) * cb + ca, (1 - qb) * ca + cb)


Constructor & Destructor Documentation

IlvBlendFilter::IlvBlendFilter ( BlendMode  mode = Normal  ) 

Constructor.

Initializes a new instance of the class IlvBlendFilter.

IlvBlendFilter::~IlvBlendFilter (  ) 

Destructor.

The destructor releases all the memory used by the instance.


Member Function Documentation

BlendMode IlvBlendFilter::getMode (  )  const

Returns the blending mode.

Returns:
The blending mode
See also:
BlendMode
void IlvBlendFilter::setMode ( BlendMode  mode  ) 

Sets the mode used for blending the images.

Parameters:
mode The new blending mode.
See also:
BlendMode
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

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