Class BitmapProxy
- Namespace
- HelixToolkit.SharpDX.Utilities
- Assembly
- HelixToolkit.SharpDX.dll
public class BitmapProxy : DisposeObject, IDisposable, IGUID
- Inheritance
-
BitmapProxy
- Implements
- Inherited Members
Constructors
BitmapProxy(string, DeviceContext, Surface, BitmapProperties1)
Initializes a new instance of the BitmapProxy class.
public BitmapProxy(string name, DeviceContext context, Surface surface, BitmapProperties1 properties)
Parameters
namestringThe name.
contextDeviceContextThe context.
surfaceSurfaceThe surface.
propertiesBitmapProperties1The properties.
BitmapProxy(string, DeviceContext, Size2, BitmapProperties1)
Initializes a new instance of the BitmapProxy class.
public BitmapProxy(string name, DeviceContext context, Size2 size, BitmapProperties1 properties)
Parameters
namestringThe name.
contextDeviceContextThe context.
sizeSize2The size.
propertiesBitmapProperties1The properties.
Properties
Bitmap
Gets the bitmap.
public Bitmap1 Bitmap { get; }
Property Value
- Bitmap1
The bitmap.
Context
Gets the context.
public DeviceContext Context { get; }
Property Value
- DeviceContext
The context.
GUID
Gets the unique identifier.
public Guid GUID { get; }
Property Value
- Guid
The unique identifier.
Name
Gets the name.
public string Name { get; }
Property Value
- string
The name.
Properties
Gets the properties.
public BitmapProperties1 Properties { get; }
Property Value
- BitmapProperties1
The properties.
Size
Gets the bitmap size.
public Size2 Size { get; }
Property Value
- Size2
The size.
Methods
Create(string, DeviceContext, Surface)
Creates by surface
public static BitmapProxy Create(string name, DeviceContext context, Surface surface)
Parameters
namestringThe name.
contextDeviceContextThe context.
surfaceSurfaceThe surface.
Returns
Create(string, DeviceContext, Size2, Format)
Creates by size and format
public static BitmapProxy Create(string name, DeviceContext context, Size2 size, Format format)
Parameters
namestringThe name.
contextDeviceContextThe context.
sizeSize2The size.
formatFormatThe format.
Returns
CreateDescription(float, float, Format, AlphaMode, BitmapOptions, ColorContext?)
Creates the description.
public static BitmapProperties1 CreateDescription(float dpiX, float dpiY, Format format, AlphaMode alphaMode = AlphaMode.Premultiplied, BitmapOptions options = BitmapOptions.Target | BitmapOptions.CannotDraw, ColorContext? colorContext = null)
Parameters
dpiXfloatThe dpi x.
dpiYfloatThe dpi y.
formatFormatThe format.
alphaModeAlphaModeThe alpha mode.
optionsBitmapOptionsThe options.
colorContextColorContextThe color context.
Returns
- BitmapProperties1
NewDescription(float, float, PixelFormat, BitmapOptions, ColorContext?)
News the description.
protected static BitmapProperties1 NewDescription(float dpiX, float dpiY, PixelFormat format, BitmapOptions bitmapOptions, ColorContext? colorContext)
Parameters
dpiXfloatThe dpi x.
dpiYfloatThe dpi y.
formatPixelFormatThe format.
bitmapOptionsBitmapOptionsThe bitmap options.
colorContextColorContextThe color context.
Returns
- BitmapProperties1
OnDispose(bool)
Disposes of object resources.
protected override void OnDispose(bool disposeManagedResources)
Parameters
disposeManagedResourcesboolIf true, managed resources should be disposed of in addition to unmanaged resources.
Operators
implicit operator Bitmap1(BitmapProxy)
Performs an implicit conversion from BitmapProxy to SharpDX.Direct2D1.Bitmap1.
public static implicit operator Bitmap1(BitmapProxy proxy)
Parameters
proxyBitmapProxyThe proxy.
Returns
- Bitmap1
The result of the conversion.