Class RenderContext2D
- Namespace
- HelixToolkit.SharpDX
- Assembly
- HelixToolkit.SharpDX.dll
public sealed class RenderContext2D : DisposeObject, IDisposable
- Inheritance
-
RenderContext2D
- Implements
- Inherited Members
Constructors
RenderContext2D(DeviceContext, IRenderHost)
Initializes a new instance of the RenderContext2D class.
public RenderContext2D(DeviceContext deviceContext, IRenderHost host)
Parameters
deviceContextDeviceContextThe device context.
hostIRenderHostThe host.
Properties
ActualHeight
Gets the actual height.
public double ActualHeight { get; }
Property Value
- double
The actual height.
ActualWidth
Gets the actual width.
public double ActualWidth { get; }
Property Value
- double
The actual width.
DeviceContext
Gets or sets the device context.
public DeviceContext DeviceContext { get; }
Property Value
- DeviceContext
The device context.
DeviceResources
Gets the device resources.
public IDevice2DResources? DeviceResources { get; }
Property Value
- IDevice2DResources
The device resources.
DpiScale
Gets the dpi scale.
public float DpiScale { get; }
Property Value
- float
The dpi scale.
HasTarget
Gets or sets a value indicating whether this instance has target.
public bool HasTarget { get; }
Property Value
- bool
trueif this instance has target; otherwise,false.
RelativeTransform
Gets or sets the last bitmap transform.
public Matrix3x2 RelativeTransform { get; }
Property Value
- Matrix3x2
The last bitmap transform.RelativeTransform
Methods
PopRelativeTransform()
Pops the last bitmap transform.
public void PopRelativeTransform()
PopRenderTarget()
Pops the render target.
public void PopRenderTarget()
PushRelativeTransform(Matrix3x2)
Pushes the last bitmap transform.
public void PushRelativeTransform(Matrix3x2 transform)
Parameters
transformMatrix3x2The transform.
PushRenderTarget(BitmapProxy, bool)
Pushes the render target.
public void PushRenderTarget(BitmapProxy target, bool clear)
Parameters
targetBitmapProxyThe target.
clearboolif set to
true[clear].