Om  1.0.0
A universal framework for multimedia simulation
Public Types | Public Member Functions | List of all members
om::graphics::base::BlendFactor Class Reference

A class that specifies the scale factor applied to a source or destination color when blending. More...

#include <omGraphicsBlendFactor.h>

Public Types

enum  Enum {
  UNDEFINED = 0, ZERO, ONE, SOURCE_ALPHA,
  INVERSE_SOURCE_ALPHA, SOURCE_COLOR, INVERSE_SOURCE_COLOR, DESTINATION_ALPHA,
  INVERSE_DESTINATION_ALPHA, DESTINATION_COLOR, INVERSE_DESTINATION_COLOR, CONSTANT_ALPHA,
  INVERSE_CONSTANT_ALPHA, CONSTANT_COLOR, INVERSE_CONSTANT_COLOR
}
 An enum type which represents the type of blend factor. More...
 

Public Member Functions

 BlendFactor (Enum newFactor)
 Create a new blend factor with the specified blend factor enum value. More...
 
 operator Enum () const
 Convert this blend factor type to an enum value. More...
 
String toString () const
 Return a string representation of the blend factor. More...
 
 operator String () const
 Convert this blend factor into a string representation. More...
 

Detailed Description

A class that specifies the scale factor applied to a source or destination color when blending.

A blend factor determines the value of a source or destination operand for any given BlendFunction. The factor is component-wise multiplied with the color of a given source or destination fragment and used as an operand for the blend function.

Member Enumeration Documentation

An enum type which represents the type of blend factor.

Enumerator
UNDEFINED 

An undefined blend factor.

ZERO 

A blend factor where the color operand is multiplied by 0.

ONE 

A blend factor where the color operand is multiplied by 1.

SOURCE_ALPHA 

A blend factor where the color operand is multiplied by the source color's alpha.

INVERSE_SOURCE_ALPHA 

A blend factor where the color operand is multiplied by the inverse source color alpha.

The inverse alpha is equal to one minus the source alpha.

SOURCE_COLOR 

A blend factor where the color operand is component-wise multiplied by the source color.

INVERSE_SOURCE_COLOR 

A blend factor where the color operand is component-wise multiplied by the inverse source color.

The inverse source color is equal to one minus the source color for each color component.

DESTINATION_ALPHA 

A blend factor where the color operand is multiplied by the destination color's alpha.

INVERSE_DESTINATION_ALPHA 

A blend factor where the color operand is multiplied by the inverse destination color alpha.

The inverse alpha is equal to one minus the destination alpha.

DESTINATION_COLOR 

A blend factor where the color operand is component-wise multiplied by the destination color.

INVERSE_DESTINATION_COLOR 

A blend factor where the color operand is component-wise multiplied by the inverse destination color.

The inverse destination color is equal to one minus the destination color for each color component.

CONSTANT_ALPHA 

A blend factor where the color operand is multiplied by the constant color's alpha.

INVERSE_CONSTANT_ALPHA 

A blend factor where the color operand is multiplied by the inverse constant color alpha.

The inverse alpha is equal to one minus the constant alpha.

CONSTANT_COLOR 

A blend factor where the color operand is component-wise multiplied by the constant color.

INVERSE_CONSTANT_COLOR 

A blend factor where the color operand is component-wise multiplied by the inverse constant color.

The inverse constant color is equal to one minus the constant color for each color component.

Constructor & Destructor Documentation

om::graphics::base::BlendFactor::BlendFactor ( Enum  newFactor)
inline

Create a new blend factor with the specified blend factor enum value.

Member Function Documentation

om::graphics::base::BlendFactor::operator Enum ( ) const
inline

Convert this blend factor type to an enum value.

String om::graphics::base::BlendFactor::toString ( ) const

Return a string representation of the blend factor.

om::graphics::base::BlendFactor::operator String ( ) const
inline

Convert this blend factor into a string representation.


The documentation for this class was generated from the following file: