IDrawContext.DrawTexture Method
Definition
Namespace: Brine2D.Rendering
| Overloads | |
|---|---|
| DrawTexture\(ITexture, float, float\) | Draw texture at position \(float x, y, top\-left\). |
| DrawTexture\(ITexture, float, float, float, float\) | Draw texture with explicit size \(top\-left\). |
| DrawTexture\(ITexture, Vector2\) | Draw texture at position \(Vector2, top\-left\). |
| DrawTexture\(ITexture, Vector2, Nullable<Rectangle>, Nullable<Vector2>, float, Nullable<Vector2>, Nullable<Color>, SpriteFlip\) | Draw a texture with full control \(primary API\). |
IDrawContext.DrawTexture\(ITexture, float, float\) Method
Draw texture at position \(float x, y, top\-left\).
Parameters
texture ITexture
IDrawContext.DrawTexture\(ITexture, float, float, float, float\) Method
Draw texture with explicit size \(top\-left\).
C#
void DrawTexture(Brine2D.Rendering.ITexture texture, float x, float y, float width, float height);
Parameters
texture ITexture
width System.Single
height System.Single
IDrawContext.DrawTexture\(ITexture, Vector2\) Method
Draw texture at position \(Vector2, top\-left\).
Parameters
texture ITexture
position System.Numerics.Vector2
IDrawContext.DrawTexture\(ITexture, Vector2, Nullable\<Rectangle\>, Nullable\<Vector2\>, float, Nullable\<Vector2\>, Nullable\<Color\>, SpriteFlip\) Method
Draw a texture with full control \(primary API\).
C#
void DrawTexture(Brine2D.Rendering.ITexture texture, System.Numerics.Vector2 position, System.Nullable<Brine2D.Core.Rectangle> sourceRect=null, System.Nullable<System.Numerics.Vector2> origin=null, float rotation=0f, System.Nullable<System.Numerics.Vector2> scale=null, System.Nullable<Brine2D.Core.Color> color=null, Brine2D.Rendering.SpriteFlip flip=Brine2D.Rendering.SpriteFlip.None);
Parameters
texture ITexture
position System.Numerics.Vector2
sourceRect System.Nullable<Rectangle>
origin System.Nullable<System.Numerics.Vector2>
rotation System.Single
scale System.Nullable<System.Numerics.Vector2>
color System.Nullable<Color>
flip SpriteFlip