acolor.h File Reference
 
 
 
acolor.h File Reference
#include "GeomExport.h"
#include "maxheap.h"
#include "maxtypes.h"
#include "point3.h"
#include "point4.h"
#include "color.h"
#include <wingdi.h>

Classes

class   AColor

Typedefs

typedef AColor  RGBA

Functions

int  MaxComponent (const AColor &)
int  MinComponent (const AColor &)
AColor  operator* (float f, const AColor &a)
AColor  operator* (const AColor &a, float f)
AColor  CompOver (const AColor &fg, const AColor &bg)

Typedef Documentation


Function Documentation

int MaxComponent ( const AColor )
Remarks:
Returns the index of the component with the maximum absolute value.
Parameters:
const AColor&

The color to check.
Returns:
The index of the component with the maximum absolute value. r=0, g=1, b=2, a=3.
int MinComponent ( const AColor )
Remarks:
Returns the index of the component with the minimum absolute value.
Parameters:
const AColor&

The color to check.
Returns:
The index of the component with the minimum absolute value. r=0, g=1, b=2, a=3.
AColor operator* ( float  f,
const AColor a 
) [inline]
Remarks:
Multiplies each component of an AColor by a float.
Returns:
An AColor with each component multiplied by a float.
                                                  {
        return(AColor(a.r*f, a.g*f, a.b*f, a.a*f));
        }
AColor operator* ( const AColor a,
float  f 
) [inline]
Remarks:
Multiplies each component of an AColor by a float.
Returns:
An AColor with each component multiplied by a float.
                                                  {
        return(AColor(a.r*f, a.g*f, a.b*f, a.a*f));
        }
AColor CompOver ( const AColor fg,
const AColor bg 
) [inline]
Remarks:
Composite fg over bg, assuming associated alpha, i.e. pre-multiplied alpha for both fg and bg

This is: fg + (1.0f-fg.a)*bg
Parameters:
const AColor &fg

Specifies the foreground color to composite.

const AColor& bg

Specifies the background color to composite over.
Returns:
The resulting AColor.
                                                           {
        return  fg + (1.0f-fg.a)*bg;
        }