|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.graphics.ColorMatrix
public class ColorMatrix
5x4 matrix for transforming the color+alpha components of a Bitmap. The matrix is stored in a single array, and its treated as follows: [ a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t ] When applied to a color [r, g, b, a], the resulting color is computed as (after clamping) R' = a*R + b*G + c*B + d*A + e; G' = f*R + g*G + h*B + i*A + j; B' = k*R + l*G + m*B + n*A + o; A' = p*R + q*G + r*B + s*A + t;
| Constructor Summary | |
|---|---|
ColorMatrix()
Create a new colormatrix initialized to identity (as if reset() had been called). |
|
ColorMatrix(ColorMatrix src)
Create a new colormatrix initialized with the specified colormatrix. |
|
ColorMatrix(float[] src)
Create a new colormatrix initialized with the specified array of values. |
|
| Method Summary | |
|---|---|
float[] |
getArray()
Return the array of floats representing this colormatrix. |
void |
postConcat(ColorMatrix postmatrix)
Concat this colormatrix with the specified postmatrix. |
void |
preConcat(ColorMatrix prematrix)
Concat this colormatrix with the specified prematrix. |
void |
reset()
Set this colormatrix to identity: [ 1 0 0 0 0 - red vector 0 1 0 0 0 - green vector 0 0 1 0 0 - blue vector 0 0 0 1 0 ] - alpha vector |
void |
set(ColorMatrix src)
Assign the src colormatrix into this matrix, copying all of its values. |
void |
set(float[] src)
Assign the array of floats into this matrix, copying all of its values. |
void |
setConcat(ColorMatrix matA,
ColorMatrix matB)
Set this colormatrix to the concatenation of the two specified colormatrices, such that the resulting colormatrix has the same effect as applying matB and then applying matA. |
void |
setRGB2YUV()
Set the matrix to convert RGB to YUV |
void |
setRotate(int axis,
float degrees)
|
void |
setSaturation(float sat)
Set the matrix to affect the saturation of colors. |
void |
setScale(float rScale,
float gScale,
float bScale,
float aScale)
Set this colormatrix to scale by the specified values. |
void |
setYUV2RGB()
Set the matrix to convert from YUV to RGB |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ColorMatrix()
public ColorMatrix(float[] src)
public ColorMatrix(ColorMatrix src)
| Method Detail |
|---|
public final float[] getArray()
public void reset()
public void set(ColorMatrix src)
public void set(float[] src)
public void setScale(float rScale,
float gScale,
float bScale,
float aScale)
public void setRotate(int axis,
float degrees)
public void setConcat(ColorMatrix matA,
ColorMatrix matB)
public void preConcat(ColorMatrix prematrix)
public void postConcat(ColorMatrix postmatrix)
public void setSaturation(float sat)
public void setRGB2YUV()
public void setYUV2RGB()
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||