Class ImageAttributes
Specifies colour-adjustment information applied to pixels during image rendering. Supports colour matrices, gamma correction, colour-key transparency and colour remapping.
Implements
Inherited Members
Namespace: DRIT.Drawing.Drawing2D
Assembly: DRIT.Drawing.dll
Syntax
public sealed class ImageAttributes : IDisposable
Constructors
ImageAttributes()
Initializes an empty ImageAttributes instance.
Declaration
public ImageAttributes()
Methods
ClearColorKey()
Clears the colour key for the default colour adjustment category.
Declaration
public void ClearColorKey()
ClearColorKey(ColorAdjustType)
Clears the colour key for the specified colour adjustment category.
Declaration
public void ClearColorKey(ColorAdjustType type)
Parameters
| Type | Name | Description |
|---|---|---|
| ColorAdjustType | type | The colour adjustment type that specifies the adjustment category. |
ClearColorMatrix()
Clears the colour matrix for the default colour adjustment category.
Declaration
public void ClearColorMatrix()
ClearColorMatrix(ColorAdjustType)
Clears the colour matrix for the specified colour adjustment category.
Declaration
public void ClearColorMatrix(ColorAdjustType type)
Parameters
| Type | Name | Description |
|---|---|---|
| ColorAdjustType | type | The colour adjustment type that specifies the adjustment category. |
ClearGamma()
Clears the gamma value for the default colour adjustment category.
Declaration
public void ClearGamma()
ClearGamma(ColorAdjustType)
Clears the gamma value for the specified colour adjustment category.
Declaration
public void ClearGamma(ColorAdjustType type)
Parameters
| Type | Name | Description |
|---|---|---|
| ColorAdjustType | type | The colour adjustment type that specifies the adjustment category. |
ClearNoOp(ColorAdjustType)
Clears the no-op flag for the specified colour adjustment category.
Declaration
public void ClearNoOp(ColorAdjustType type)
Parameters
| Type | Name | Description |
|---|---|---|
| ColorAdjustType | type | The colour adjustment type that specifies the adjustment category. |
ClearRemapTable()
Clears the colour remap table for the default colour adjustment category.
Declaration
public void ClearRemapTable()
ClearRemapTable(ColorAdjustType)
Clears the colour remap table for the specified colour adjustment category.
Declaration
public void ClearRemapTable(ColorAdjustType type)
Parameters
| Type | Name | Description |
|---|---|---|
| ColorAdjustType | type | The colour adjustment type that specifies the adjustment category. |
Clone()
Creates an exact copy of this ImageAttributes object.
Declaration
public ImageAttributes Clone()
Returns
| Type | Description |
|---|---|
| ImageAttributes | A new ImageAttributes object that is a copy of this instance. |
Dispose()
Releases all resources used by this ImageAttributes.
Declaration
public void Dispose()
SetColorKey(Color, Color)
Sets the colour key for the default colour adjustment category.
Declaration
public void SetColorKey(Color colorLow, Color colorHigh)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | colorLow | The low colour key value. |
| Color | colorHigh | The high colour key value. |
SetColorKey(Color, Color, ColorAdjustType)
Sets the colour key for the specified colour adjustment category.
Declaration
public void SetColorKey(Color colorLow, Color colorHigh, ColorAdjustType type)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | colorLow | The low colour key value. |
| Color | colorHigh | The high colour key value. |
| ColorAdjustType | type | The colour adjustment type that specifies the adjustment category. |
SetColorMatrix(ColorMatrix)
Sets the colour matrix for the default colour adjustment category.
Declaration
public void SetColorMatrix(ColorMatrix colorMatrix)
Parameters
| Type | Name | Description |
|---|---|---|
| ColorMatrix | colorMatrix | The colour matrix to apply. |
SetColorMatrix(ColorMatrix, ColorMatrixFlag)
Sets the colour matrix for the specified colour adjustment category.
Declaration
public void SetColorMatrix(ColorMatrix colorMatrix, ColorMatrixFlag flags)
Parameters
| Type | Name | Description |
|---|---|---|
| ColorMatrix | colorMatrix | The colour matrix to apply. |
| ColorMatrixFlag | flags | The colour matrix flags that specify how the colour matrix is applied. |
SetColorMatrix(ColorMatrix, ColorMatrixFlag, ColorAdjustType)
Sets the colour matrix for the specified colour adjustment category.
Declaration
public void SetColorMatrix(ColorMatrix colorMatrix, ColorMatrixFlag flags, ColorAdjustType type)
Parameters
| Type | Name | Description |
|---|---|---|
| ColorMatrix | colorMatrix | The colour matrix to apply. |
| ColorMatrixFlag | flags | The colour matrix flags that specify how the colour matrix is applied. |
| ColorAdjustType | type | The colour adjustment type that specifies the adjustment category. |
SetGamma(float)
Sets the gamma value for the default colour adjustment category.
Declaration
public void SetGamma(float gamma)
Parameters
| Type | Name | Description |
|---|---|---|
| float | gamma | The gamma value. |
SetGamma(float, ColorAdjustType)
Sets the gamma value for the specified colour adjustment category.
Declaration
public void SetGamma(float gamma, ColorAdjustType type)
Parameters
| Type | Name | Description |
|---|---|---|
| float | gamma | The gamma value. |
| ColorAdjustType | type | The colour adjustment type that specifies the adjustment category. |
SetNoOp()
Sets the no-op flag for the default colour adjustment category.
Declaration
public void SetNoOp()
SetNoOp(ColorAdjustType)
Sets the no-op flag for the specified colour adjustment category.
Declaration
public void SetNoOp(ColorAdjustType type)
Parameters
| Type | Name | Description |
|---|---|---|
| ColorAdjustType | type | The colour adjustment type that specifies the adjustment category. |
SetRemapTable(ColorMap[])
Sets the colour remap table for the default colour adjustment category.
Declaration
public void SetRemapTable(ColorMap[] map)
Parameters
| Type | Name | Description |
|---|---|---|
| ColorMap[] | map | The array of colour map entries that define the remap table. |
SetRemapTable(ColorMap[], ColorAdjustType)
Sets the colour remap table for the specified colour adjustment category.
Declaration
public void SetRemapTable(ColorMap[] map, ColorAdjustType type)
Parameters
| Type | Name | Description |
|---|---|---|
| ColorMap[] | map | The array of colour map entries that define the remap table. |
| ColorAdjustType | type | The colour adjustment type that specifies the adjustment category. |