Class DFBitmap
Stores raw bitmap data in indexed format.
Namespace: DaggerfallConnect
Assembly: Assembly-CSharp.dll
Syntax
public class DFBitmap
Constructors
| Improve this Doc View SourceDFBitmap()
Default constructor. Creates an empty DFBitmap with null data.
Declaration
public DFBitmap()
DFBitmap(Int32, Int32)
Constructor. Creates a new DFBitmap with sized and zeroed data array.
Declaration
public DFBitmap(int width, int height)
Parameters
Type | Name | Description |
---|---|---|
Int32 | width | Image width. |
Int32 | height | Image height. |
Fields
| Improve this Doc View SourceData
Image byte array in specified format.
Declaration
public byte[] Data
Field Value
Type | Description |
---|---|
Byte[] |
Height
Height of the image in pixels.
Declaration
public int Height
Field Value
Type | Description |
---|---|
Int32 |
Palette
Daggerfall palette.
Declaration
public DFPalette Palette
Field Value
Type | Description |
---|---|
DFPalette |
Width
Width of the image in pixels.
Declaration
public int Width
Field Value
Type | Description |
---|---|
Int32 |
Methods
| Improve this Doc View SourceCloneDFBitmap(DFBitmap, Boolean)
Creates a clone of a DFBitmap.
Declaration
public static DFBitmap CloneDFBitmap(DFBitmap bitmap, bool cloneData = true)
Parameters
Type | Name | Description |
---|---|---|
DFBitmap | bitmap | DFBitmap source. |
Boolean | cloneData | True to clone data. |
Returns
Type | Description |
---|---|
DFBitmap | Cloned DFBitmap. |
GetColor32(Int32)
Gets a Color32 array for engine.
Declaration
public Color32[] GetColor32(int alphaIndex = -1)
Parameters
Type | Name | Description |
---|---|---|
Int32 | alphaIndex | Index to receive transparent alpha. |
Returns
Type | Description |
---|---|
Color32[] | Color32 array. |
GetColor32(Int32, Int32, Color, Boolean)
Gets a Color32 array for engine.
Declaration
public Color32[] GetColor32(int alphaIndex, int maskIndex, Color maskColor, bool excludeNonMasked = false)
Parameters
Type | Name | Description |
---|---|---|
Int32 | alphaIndex | Index to receive transparent alpha. |
Int32 | maskIndex | Index to receive mask colour. |
Color | maskColor | New mask color. |
Boolean | excludeNonMasked | Exclude non-masked areas of image. |
Returns
Type | Description |
---|---|
Color32[] | Color32 array. |
Initialise(Int32, Int32)
Initialise DFBitmap data to specified size. Any existing data will be discarded.
Declaration
public void Initialise(int width, int height)
Parameters
Type | Name | Description |
---|---|---|
Int32 | width | Image width. |
Int32 | height | Image height. |