Drag[en]gine Script Module DragonScript Script API  1.0
ColorMatrix Class Reference

Immutable 5x4-component row major color matrix. More...

Inheritance diagram for ColorMatrix:

Public Member Functions

Management
float getAt (int row, int col)
 Cell value. More...
 
float get11 ()
 Cell value. More...
 
float get12 ()
 Cell value. More...
 
float get13 ()
 Cell value. More...
 
float get14 ()
 Cell value. More...
 
float get15 ()
 Cell value. More...
 
float get21 ()
 Cell value. More...
 
float get22 ()
 Cell value. More...
 
float get23 ()
 Cell value. More...
 
float get24 ()
 Cell value. More...
 
float get25 ()
 Cell value. More...
 
float get31 ()
 Cell value. More...
 
float get32 ()
 Cell value. More...
 
float get33 ()
 Cell value. More...
 
float get34 ()
 Cell value. More...
 
float get35 ()
 Cell value. More...
 
float get41 ()
 Cell value. More...
 
float get42 ()
 Cell value. More...
 
float get43 ()
 Cell value. More...
 
float get44 ()
 Cell value. More...
 
float get45 ()
 Cell value. More...
 
Color getRedBase ()
 Color build from first colon. More...
 
Color getGreenBase ()
 Color build from second colon. More...
 
Color getBlueBase ()
 Color build from third colon. More...
 
Color getAlphaBase ()
 Color build from fourthed colon. More...
 
Color getWhiteBase ()
 Color build from fifth colon. More...
 
bool equals (Object other)
 ColorMatrix is equal to another object. More...
 
int hashCode ()
 Hash code for use as dictionary keys. More...
 
String toString ()
 String representation of color matrix. More...
 
Operators
ColorMatrix operator+ (ColorMatrix matrix)
 Sum of two color matrixs. More...
 
ColorMatrix operator- (ColorMatrix matrix)
 Difference between two color matrixs. More...
 
ColorMatrix operator* (float scalar)
 ColorMatrix with each component scaled by a value. More...
 
ColorMatrix operator/ (float scalar)
 ColorMatrix with each component divided by a value. More...
 
ColorMatrix operator* (ColorMatrix matrix)
 Matrix multiplication of two color matrixs. More...
 
ColorMatrix operator* (Color color)
 Transform color by color matrix. More...
 

Constructors

ColorMatrix new ()
 Create identity color matrix. More...
 
ColorMatrix new (ColorMatrix matrix)
 Create copy of color matrix. More...
 
ColorMatrix new (Color red, Color green, Color blue, Color alpha, Color white)
 Create color matrix with initial colons. More...
 
static ColorMatrix newTranslation (Color color)
 Create translation color matrix. More...
 
static ColorMatrix newTranslation (float red, float green, float blue, float alpha)
 Create translation color matrix. More...
 
static ColorMatrix newScaling (Color color)
 Create scaling color matrix. More...
 
static ColorMatrix newScaling (float red, float green, float blue, float alpha)
 Create scaling color matrix. More...
 
static ColorMatrix newST (Color scaling, Color translation)
 Create scaling then translaction color matrix. More...
 
static ColorMatrix newBrightness (float brightness)
 Create brightness color matrix with same brightness value for each color component. More...
 
static ColorMatrix newBrightness (float red, float green, float blue)
 Create brightness color matrix. More...
 
static ColorMatrix newBrightness (Color brightness)
 Create brightness color matrix. More...
 
static ColorMatrix newContrast (float contrast)
 Create contrast color matrix with same constrast value for each color component. More...
 
static ColorMatrix newContrast (float red, float green, float blue)
 Create contrast color matrix. More...
 
static ColorMatrix newContrast (Color contrast)
 Create contrast color matrix. More...
 
static ColorMatrix newSaturation (float saturation)
 Create saturation color matrix with same saturation value for each color component. More...
 
static ColorMatrix newSaturation (float red, float green, float blue)
 Create saturation color matrix. More...
 
static ColorMatrix newSaturation (Color saturation)
 Create saturation color matrix. More...
 
static ColorMatrix newColorInversion ()
 Create color inversion color matrix. More...
 

File Handling

void writeToFile (FileWriter writer)
 Write color matrix to a file writer. More...
 
static ColorMatrix readFromFile (FileReader reader)
 Read color matrix from a file reader. More...
 

Detailed Description

Immutable 5x4-component row major color matrix.

This is a native class. It can not be subclassed.

Author
Roland Pl├╝ss
Version
1.0
Date
2015

Member Function Documentation

§ equals()

bool equals ( Object  other)

ColorMatrix is equal to another object.

Implements Object.equals(Object).

Returns
true if other is of type ColorMatrix and components are equal.

§ get11()

float get11 ( )

Cell value.

§ get12()

float get12 ( )

Cell value.

§ get13()

float get13 ( )

Cell value.

§ get14()

float get14 ( )

Cell value.

§ get15()

float get15 ( )

Cell value.

§ get21()

float get21 ( )

Cell value.

§ get22()

float get22 ( )

Cell value.

§ get23()

float get23 ( )

Cell value.

§ get24()

float get24 ( )

Cell value.

§ get25()

float get25 ( )

Cell value.

§ get31()

float get31 ( )

Cell value.

§ get32()

float get32 ( )

Cell value.

§ get33()

float get33 ( )

Cell value.

§ get34()

float get34 ( )

Cell value.

§ get35()

float get35 ( )

Cell value.

§ get41()

float get41 ( )

Cell value.

§ get42()

float get42 ( )

Cell value.

§ get43()

float get43 ( )

Cell value.

§ get44()

float get44 ( )

Cell value.

§ get45()

float get45 ( )

Cell value.

§ getAlphaBase()

Color getAlphaBase ( )

Color build from fourthed colon.

§ getAt()

float getAt ( int  row,
int  col 
)

Cell value.

Exceptions
EInvalidParamrow is less than 0 or larger than 3.
EInvalidParamcol is less than 0 or larger than 4.

§ getBlueBase()

Color getBlueBase ( )

Color build from third colon.

§ getGreenBase()

Color getGreenBase ( )

Color build from second colon.

§ getRedBase()

Color getRedBase ( )

Color build from first colon.

§ getWhiteBase()

Color getWhiteBase ( )

Color build from fifth colon.

§ hashCode()

int hashCode ( )

Hash code for use as dictionary keys.

Implements Object.hashCode().

§ new() [1/3]

ColorMatrix new ( )

Create identity color matrix.

§ new() [2/3]

ColorMatrix new ( ColorMatrix  matrix)

Create copy of color matrix.

§ new() [3/3]

ColorMatrix new ( Color  red,
Color  green,
Color  blue,
Color  alpha,
Color  white 
)

Create color matrix with initial colons.

red sets the first colon, green the second, blue the third, alpha the fourthed and white the fifth colon.

§ newBrightness() [1/3]

static ColorMatrix newBrightness ( float  brightness)
static

Create brightness color matrix with same brightness value for each color component.

§ newBrightness() [2/3]

static ColorMatrix newBrightness ( float  red,
float  green,
float  blue 
)
static

Create brightness color matrix.

§ newBrightness() [3/3]

static ColorMatrix newBrightness ( Color  brightness)
static

Create brightness color matrix.

§ newColorInversion()

static ColorMatrix newColorInversion ( )
static

Create color inversion color matrix.

§ newContrast() [1/3]

static ColorMatrix newContrast ( float  contrast)
static

Create contrast color matrix with same constrast value for each color component.

§ newContrast() [2/3]

static ColorMatrix newContrast ( float  red,
float  green,
float  blue 
)
static

Create contrast color matrix.

§ newContrast() [3/3]

static ColorMatrix newContrast ( Color  contrast)
static

Create contrast color matrix.

§ newSaturation() [1/3]

static ColorMatrix newSaturation ( float  saturation)
static

Create saturation color matrix with same saturation value for each color component.

§ newSaturation() [2/3]

static ColorMatrix newSaturation ( float  red,
float  green,
float  blue 
)
static

Create saturation color matrix.

§ newSaturation() [3/3]

static ColorMatrix newSaturation ( Color  saturation)
static

Create saturation color matrix.

§ newScaling() [1/2]

static ColorMatrix newScaling ( Color  color)
static

Create scaling color matrix.

§ newScaling() [2/2]

static ColorMatrix newScaling ( float  red,
float  green,
float  blue,
float  alpha 
)
static

Create scaling color matrix.

§ newST()

static ColorMatrix newST ( Color  scaling,
Color  translation 
)
static

Create scaling then translaction color matrix.

§ newTranslation() [1/2]

static ColorMatrix newTranslation ( Color  color)
static

Create translation color matrix.

§ newTranslation() [2/2]

static ColorMatrix newTranslation ( float  red,
float  green,
float  blue,
float  alpha 
)
static

Create translation color matrix.

§ operator*() [1/3]

ColorMatrix operator* ( float  scalar)

ColorMatrix with each component scaled by a value.

§ operator*() [2/3]

ColorMatrix operator* ( ColorMatrix  matrix)

Matrix multiplication of two color matrixs.

Both matrices are threaded as 5x5 matrices with (0,0,0,0,1) as last row during multiplication. The returned matrix is the upper 5x4 of the multiplication result.

§ operator*() [3/3]

ColorMatrix operator* ( Color  color)

Transform color by color matrix.

§ operator+()

ColorMatrix operator+ ( ColorMatrix  matrix)

Sum of two color matrixs.

§ operator-()

ColorMatrix operator- ( ColorMatrix  matrix)

Difference between two color matrixs.

§ operator/()

ColorMatrix operator/ ( float  scalar)

ColorMatrix with each component divided by a value.

Exceptions
EDivisionByZeroscalar is 0.

§ readFromFile()

static ColorMatrix readFromFile ( FileReader  reader)
static

Read color matrix from a file reader.

§ toString()

String toString ( )

String representation of color matrix.

Implements Object.toString()

§ writeToFile()

void writeToFile ( FileWriter  writer)

Write color matrix to a file writer.


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