Class BitmapImage
Implements image source loading and drawing
Inherited Members
Namespace: EmptyKeys.UserInterface.Media.Imaging
Assembly: EmptyKeys.UserInterface.dll
Syntax
public class BitmapImage : Freezable
Constructors
BitmapImage()
Initializes a new instance of the BitmapImage class.
Declaration
public BitmapImage()
Fields
TextureAssetProperty
The texture asset property
Declaration
public static readonly DependencyProperty TextureAssetProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
TextureProperty
The texture property
Declaration
public static readonly DependencyProperty TextureProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
Format
Gets the format.
Declaration
public TextureSurfaceFormat Format { get; }
Property Value
Type | Description |
---|---|
EmptyKeys.UserInterface.Media.TextureSurfaceFormat | The format. |
PixelHeight
Gets the height of the pixel.
Declaration
public int PixelHeight { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The height of the pixel. |
PixelWidth
Gets the width of the pixel.
Declaration
public int PixelWidth { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The width of the pixel. |
Texture
Gets or sets the texture.
Declaration
public TextureBase Texture { get; set; }
Property Value
Type | Description |
---|---|
EmptyKeys.UserInterface.Media.TextureBase | The texture. |
TextureAsset
Gets or sets the texture asset.
Declaration
public string TextureAsset { get; set; }
Property Value
Type | Description |
---|---|
System.String | The texture asset. |
Methods
Draw(Renderer, PointF, Size, ColorW, Rect, Single)
Draws image from source position
Declaration
public void Draw(Renderer spriteRenderer, PointF position, Size size, ColorW color, Rect source, float opacity)
Parameters
Type | Name | Description |
---|---|---|
EmptyKeys.UserInterface.Renderers.Renderer | spriteRenderer | The sprite renderer. |
EmptyKeys.UserInterface.PointF | position | The position. |
EmptyKeys.UserInterface.Size | size | The size. |
EmptyKeys.UserInterface.Media.ColorW | color | The color. |
EmptyKeys.UserInterface.Rect | source | The source. |
System.Single | opacity | The opacity. |
Draw(Renderer, PointF, Size, ColorW, Single)
Draws image
Declaration
public void Draw(Renderer spriteRenderer, PointF position, Size size, ColorW color, float opacity)
Parameters
Type | Name | Description |
---|---|---|
EmptyKeys.UserInterface.Renderers.Renderer | spriteRenderer | The sprite renderer. |
EmptyKeys.UserInterface.PointF | position | The render position. |
EmptyKeys.UserInterface.Size | size | The size. |
EmptyKeys.UserInterface.Media.ColorW | color | The color. |
System.Single | opacity | The opacity. |