Mask2D

Namespace: Murder.Core
Assembly: Murder.dll

public class Mask2D : IDisposable

Implements: IDisposable

⭐ Constructors

public Mask2D(int width, int height, T? color)

Parameters
width int
height int
color T?

public Mask2D(Vector2 size, T? color)

Parameters
size Vector2
color T?

⭐ Properties

IsDisposed

public bool IsDisposed { get; }

Returns
bool

RenderTarget

public RenderTarget2D RenderTarget { get; }

Returns
RenderTarget2D

Size

public readonly Vector2 Size;

Returns
Vector2

⭐ Methods

Begin(bool)

public Batch2D Begin(bool debug)

Parameters
debug bool

Returns
Batch2D

Dispose()

public virtual void Dispose()

Draw(Batch2D, Vector2, DrawInfo)

public void Draw(Batch2D targetBatch, Vector2 position, DrawInfo drawInfo)

Ends the batch (if it is still running) and draws the render target to the target batch. If already ended, it will just draw the render target.

Parameters
targetBatch Batch2D
position Vector2
drawInfo DrawInfo

End(Batch2D, Vector2, DrawInfo)

public void End(Batch2D targetBatch, Vector2 position, DrawInfo drawInfo)

Parameters
targetBatch Batch2D
position Vector2
drawInfo DrawInfo

End(Batch2D, Vector2, Vector2, DrawInfo)

public void End(Batch2D targetBatch, Vector2 position, Vector2 camera, DrawInfo drawInfo)

Parameters
targetBatch Batch2D
position Vector2
camera Vector2
drawInfo DrawInfo