C# 클래스 ARCed.Core.QColorMatrix

Extension of the GDI+ struct ColorMatrix.
파일 보기 프로젝트 열기: borisblizzard/arcreator 1 사용 예제들

공개 메소드들

메소드 설명
Color2Vector ( Color color ) : float[]

Converts a Color object to a vector and returns it.

FromColorMatrix ( System.Drawing.Imaging.ColorMatrix colorMatrix ) : void

Translates the matrix from a ColorMatrix.

FromJaggedMatrix ( float matrixData ) : void

Returns the given matrix data as a jagged matrix

Multiply ( QColorMatrix matrix ) : void

Multiplies the given matrix

Multiply ( QColorMatrix matrix, MatrixOrder order ) : void

Multiply the given matrix using the specified matrix order.

QColorMatrix ( ) : System

Default constructor

QColorMatrix ( System.Drawing.Imaging.ColorMatrix colorMatrix ) : System

Constructor specifying matrix data

QColorMatrix ( QColorMatrix matrixData ) : System

Constructor specifying matrix data

QColorMatrix ( float matrixData ) : System

Constructor specifying matrix data

Reset ( ) : void

Set to identity matrix

RotateBlue ( float phi ) : void

Rotate the matrix around the blue color axes. The color of the rotation axis is unchanged, the other two colors are rotated in color space.

RotateBlue ( float phi, MatrixOrder order ) : void

Rotate the matrix around the blue color axes. The color of the rotation axis is unchanged, the other two colors are rotated in color space.

RotateGreen ( float phi ) : void

Rotate the matrix around the green color axes. The color of the rotation axis is unchanged, the other two colors are rotated in color space.

RotateGreen ( float phi, MatrixOrder order ) : void

Rotate the matrix around the green color axes. The color of the rotation axis is unchanged, the other two colors are rotated in color space.

RotateHue ( float phi ) : void

Rotate the hue around the gray axis, keeping luminance fixed. Grays are fixed, all other colors change.

RotateRed ( float phi ) : void

Rotate the matrix around the red color axes. The color of the rotation axis is unchanged, the other two colors are rotated in color space.

RotateRed ( float phi, MatrixOrder order ) : void

Rotate the matrix around the red color axes. The color of the rotation axis is unchanged, the other two colors are rotated in color space.

Scale ( float scaleRed, float scaleGreen, float scaleBlue, float scaleOpacity ) : void

Update this matrix with the product of itself and a scaling vector.

Scale ( float scaleRed, float scaleGreen, float scaleBlue, float scaleOpacity, MatrixOrder order ) : void

Update this matrix with the product of itself and a scaling vector.

ScaleColors ( float scale ) : void

Scale just the three colors with the same amount, leave opacity unchanged

ScaleColors ( float scale, MatrixOrder order ) : void

Scale just the three colors with the same amount, leave opacity unchanged

ScaleOpacity ( float scaleOpacity ) : void

Scales the matrix opacity

ScaleOpacity ( float scaleOpacity, MatrixOrder order ) : void

Scales the matrix opacity

SetBrightness ( float offset ) : void

Sets the matrix brightness

SetContrast ( float scale ) : void

Sets the matrix contrast

SetSaturation ( float saturation ) : void

Sets the matrix saturation

SetSaturation ( float saturation, MatrixOrder order ) : void

Set the saturation of the matrix. Saturation of 0.0f yields black and white, 1.0f is neutral.

SetSaturation2 ( float saturation ) : void

Sets the matrix saturation using MatrixOrder.MatrixOrderAppend order.

ShearBlue ( float red, float green ) : void

Shear the matrix in the blue color plane. The color is influenced by the other two planes.

ShearBlue ( float red, float green, MatrixOrder order ) : void

Shear the matrix in the blue color plane. The color is influenced by the other two planes.

ShearGreen ( float red, float blue ) : void

Shear the matrix in the green color plane. The color is influenced by the other two planes.

ShearGreen ( float red, float blue, MatrixOrder order ) : void

Shear the matrix in the green color plane. The color is influenced by the other two planes.

ShearRed ( float green, float blue ) : void

Shear the matrix in the red color plane. The color is influenced by the other two planes.

ShearRed ( float green, float blue, MatrixOrder order ) : void

Shear the matrix in the red color plane. The color is influenced by the other two planes.

ToColorMatrix ( ) : System.Drawing.Imaging.ColorMatrix

Converts the matrix to a ColorMatrix and returns it.

ToJaggedMatrix ( ) : float[][]

Converts the matrix to a jagged array of data

TransformColors ( Color colors ) : Color[]

Multiply each color by the matrix.

TransformVector ( float v ) : float[]

Multiply the vector v by the matrix in place. v points to an array of at least four values, representing R, G, B and A.

TransformVector ( float vector, bool normalize ) : float[]

Transforms a vector

Translate ( float offsetRed, float offsetGreen, float offsetBlue, float offsetOpacity ) : void

Update this matrix with the product of itself and a translation vector.

Translate ( float offsetRed, float offsetGreen, float offsetBlue, float offsetOpacity, MatrixOrder order ) : void

Update this matrix with the product of itself and a translation vector.

TranslateColors ( float offset ) : void

Translate matrix colors

TranslateColors ( float offset, MatrixOrder order ) : void

Translate matrix colors

TranslateOpacity ( float offsetOpacity ) : void

Translate matrix opacity

TranslateOpacity ( float offsetOpacity, MatrixOrder order ) : void

Translate matrix opacity

Vector2Color ( float vector ) : Color

Converts a vector array to a Color object.

비공개 메소드들

메소드 설명
Copy ( QColorMatrix qm ) : void
Copy ( float m ) : void
InitHue ( ) : void
RotateColor ( float phi, int x, int y, MatrixOrder order ) : void

X and Y are the indices of the value to receive the sin(phi) value

ShearColor ( int x, int y1, float d1, int y2, float d2, MatrixOrder order ) : void

메소드 상세

Color2Vector() 공개 정적인 메소드

Converts a Color object to a vector and returns it.
public static Color2Vector ( Color color ) : float[]
color Color Color to convert
리턴 float[]

FromColorMatrix() 공개 메소드

Translates the matrix from a ColorMatrix.
public FromColorMatrix ( System.Drawing.Imaging.ColorMatrix colorMatrix ) : void
colorMatrix System.Drawing.Imaging.ColorMatrix ColorMatrix to translate from
리턴 void

FromJaggedMatrix() 공개 메소드

Returns the given matrix data as a jagged matrix
public FromJaggedMatrix ( float matrixData ) : void
matrixData float Matrix data
리턴 void

Multiply() 공개 메소드

Multiplies the given matrix
public Multiply ( QColorMatrix matrix ) : void
matrix QColorMatrix Matrix to multiply
리턴 void

Multiply() 공개 메소드

Multiply the given matrix using the specified matrix order.
public Multiply ( QColorMatrix matrix, MatrixOrder order ) : void
matrix QColorMatrix Matrix to multiply
order MatrixOrder Order to multiply with
리턴 void

QColorMatrix() 공개 메소드

Default constructor
public QColorMatrix ( ) : System
리턴 System

QColorMatrix() 공개 메소드

Constructor specifying matrix data
public QColorMatrix ( System.Drawing.Imaging.ColorMatrix colorMatrix ) : System
colorMatrix System.Drawing.Imaging.ColorMatrix Matrix data to initialize with
리턴 System

QColorMatrix() 공개 메소드

Constructor specifying matrix data
public QColorMatrix ( QColorMatrix matrixData ) : System
matrixData QColorMatrix Matrix data to initialize with
리턴 System

QColorMatrix() 공개 메소드

Constructor specifying matrix data
public QColorMatrix ( float matrixData ) : System
matrixData float Matrix data to initialize with
리턴 System

Reset() 공개 메소드

Set to identity matrix
public Reset ( ) : void
리턴 void

RotateBlue() 공개 메소드

Rotate the matrix around the blue color axes. The color of the rotation axis is unchanged, the other two colors are rotated in color space.
public RotateBlue ( float phi ) : void
phi float Angle in degrees to rotate (-180.0f... 180.0f).
리턴 void

RotateBlue() 공개 메소드

Rotate the matrix around the blue color axes. The color of the rotation axis is unchanged, the other two colors are rotated in color space.
public RotateBlue ( float phi, MatrixOrder order ) : void
phi float Angle in degrees to rotate (-180.0f... 180.0f).
order MatrixOrder Matrix order
리턴 void

RotateGreen() 공개 메소드

Rotate the matrix around the green color axes. The color of the rotation axis is unchanged, the other two colors are rotated in color space.
public RotateGreen ( float phi ) : void
phi float Angle in degrees to rotate (-180.0f... 180.0f).
리턴 void

RotateGreen() 공개 메소드

Rotate the matrix around the green color axes. The color of the rotation axis is unchanged, the other two colors are rotated in color space.
public RotateGreen ( float phi, MatrixOrder order ) : void
phi float Angle in degrees to rotate (-180.0f... 180.0f).
order MatrixOrder Matrix order
리턴 void

RotateHue() 공개 메소드

Rotate the hue around the gray axis, keeping luminance fixed. Grays are fixed, all other colors change.
public RotateHue ( float phi ) : void
phi float Degrees to rotate
리턴 void

RotateRed() 공개 메소드

Rotate the matrix around the red color axes. The color of the rotation axis is unchanged, the other two colors are rotated in color space.
public RotateRed ( float phi ) : void
phi float Angle in degrees to rotate (-180.0f... 180.0f).
리턴 void

RotateRed() 공개 메소드

Rotate the matrix around the red color axes. The color of the rotation axis is unchanged, the other two colors are rotated in color space.
public RotateRed ( float phi, MatrixOrder order ) : void
phi float Angle in degrees to rotate (-180.0f... 180.0f).
order MatrixOrder Matrix order
리턴 void

Scale() 공개 메소드

Update this matrix with the product of itself and a scaling vector.
public Scale ( float scaleRed, float scaleGreen, float scaleBlue, float scaleOpacity ) : void
scaleRed float Red scaling value
scaleGreen float Green scaling value
scaleBlue float Blue scaling value
scaleOpacity float Alpha scaling value
리턴 void

Scale() 공개 메소드

Update this matrix with the product of itself and a scaling vector.
public Scale ( float scaleRed, float scaleGreen, float scaleBlue, float scaleOpacity, MatrixOrder order ) : void
scaleRed float Red scaling value
scaleGreen float Green scaling value
scaleBlue float Blue scaling value
scaleOpacity float Alpha scaling value
order MatrixOrder Matrix order
리턴 void

ScaleColors() 공개 메소드

Scale just the three colors with the same amount, leave opacity unchanged
public ScaleColors ( float scale ) : void
scale float Scale value
리턴 void

ScaleColors() 공개 메소드

Scale just the three colors with the same amount, leave opacity unchanged
public ScaleColors ( float scale, MatrixOrder order ) : void
scale float Scale value
order MatrixOrder Matrix order
리턴 void

ScaleOpacity() 공개 메소드

Scales the matrix opacity
public ScaleOpacity ( float scaleOpacity ) : void
scaleOpacity float Alpha scaling value
리턴 void

ScaleOpacity() 공개 메소드

Scales the matrix opacity
public ScaleOpacity ( float scaleOpacity, MatrixOrder order ) : void
scaleOpacity float Alpha scaling value
order MatrixOrder Matrix order
리턴 void

SetBrightness() 공개 메소드

Sets the matrix brightness
public SetBrightness ( float offset ) : void
offset float Brightness offset value
리턴 void

SetContrast() 공개 메소드

Sets the matrix contrast
public SetContrast ( float scale ) : void
scale float Constrast scale value
리턴 void

SetSaturation() 공개 메소드

Sets the matrix saturation
public SetSaturation ( float saturation ) : void
saturation float Saturation value
리턴 void

SetSaturation() 공개 메소드

Set the saturation of the matrix. Saturation of 0.0f yields black and white, 1.0f is neutral.
public SetSaturation ( float saturation, MatrixOrder order ) : void
saturation float Saturation value
order MatrixOrder Matrix order
리턴 void

SetSaturation2() 공개 메소드

Sets the matrix saturation using MatrixOrder.MatrixOrderAppend order.
public SetSaturation2 ( float saturation ) : void
saturation float Saturation value.
리턴 void

ShearBlue() 공개 메소드

Shear the matrix in the blue color plane. The color is influenced by the other two planes.
public ShearBlue ( float red, float green ) : void
red float Red color plane
green float Green color plane
리턴 void

ShearBlue() 공개 메소드

Shear the matrix in the blue color plane. The color is influenced by the other two planes.
public ShearBlue ( float red, float green, MatrixOrder order ) : void
red float Red color plane
green float Green color plane
order MatrixOrder Matrix order
리턴 void

ShearGreen() 공개 메소드

Shear the matrix in the green color plane. The color is influenced by the other two planes.
public ShearGreen ( float red, float blue ) : void
red float Red color plane
blue float Blue color plane
리턴 void

ShearGreen() 공개 메소드

Shear the matrix in the green color plane. The color is influenced by the other two planes.
public ShearGreen ( float red, float blue, MatrixOrder order ) : void
red float Red color plane
blue float Blue color plane
order MatrixOrder Matrix order
리턴 void

ShearRed() 공개 메소드

Shear the matrix in the red color plane. The color is influenced by the other two planes.
public ShearRed ( float green, float blue ) : void
green float Green color plane
blue float Blue color plane
리턴 void

ShearRed() 공개 메소드

Shear the matrix in the red color plane. The color is influenced by the other two planes.
public ShearRed ( float green, float blue, MatrixOrder order ) : void
green float Green color plane
blue float Blue color plane
order MatrixOrder Matrix order
리턴 void

ToColorMatrix() 공개 메소드

Converts the matrix to a ColorMatrix and returns it.
public ToColorMatrix ( ) : System.Drawing.Imaging.ColorMatrix
리턴 System.Drawing.Imaging.ColorMatrix

ToJaggedMatrix() 공개 메소드

Converts the matrix to a jagged array of data
public ToJaggedMatrix ( ) : float[][]
리턴 float[][]

TransformColors() 공개 메소드

Multiply each color by the matrix.
public TransformColors ( Color colors ) : Color[]
colors Color
리턴 Color[]

TransformVector() 공개 메소드

Multiply the vector v by the matrix in place. v points to an array of at least four values, representing R, G, B and A.
public TransformVector ( float v ) : float[]
v float
리턴 float[]

TransformVector() 공개 메소드

Transforms a vector
public TransformVector ( float vector, bool normalize ) : float[]
vector float Vector to transform
normalize bool Flag to normalize data before returning
리턴 float[]

Translate() 공개 메소드

Update this matrix with the product of itself and a translation vector.
public Translate ( float offsetRed, float offsetGreen, float offsetBlue, float offsetOpacity ) : void
offsetRed float Red offset value
offsetGreen float Green offset value
offsetBlue float Blue offset value
offsetOpacity float Alpha offset value
리턴 void

Translate() 공개 메소드

Update this matrix with the product of itself and a translation vector.
public Translate ( float offsetRed, float offsetGreen, float offsetBlue, float offsetOpacity, MatrixOrder order ) : void
offsetRed float Red offset value
offsetGreen float Green offset value
offsetBlue float Blue offset value
offsetOpacity float Alpha offset value
order MatrixOrder Matrix order
리턴 void

TranslateColors() 공개 메소드

Translate matrix colors
public TranslateColors ( float offset ) : void
offset float Offset value
리턴 void

TranslateColors() 공개 메소드

Translate matrix colors
public TranslateColors ( float offset, MatrixOrder order ) : void
offset float Offset value
order MatrixOrder Matrix order
리턴 void

TranslateOpacity() 공개 메소드

Translate matrix opacity
public TranslateOpacity ( float offsetOpacity ) : void
offsetOpacity float Alpha offset value
리턴 void

TranslateOpacity() 공개 메소드

Translate matrix opacity
public TranslateOpacity ( float offsetOpacity, MatrixOrder order ) : void
offsetOpacity float Alpha offset value
order MatrixOrder Matrix order
리턴 void

Vector2Color() 공개 정적인 메소드

Converts a vector array to a Color object.
public static Vector2Color ( float vector ) : Color
vector float Floar array vector
리턴 Color