Class RenderContextBase
Defines the base class for IRenderContext2D implementors, allowing rendering of pens, brushes, sprites and textures on the IRenderSurface
Implements
Inherited Members
Namespace:
Assembly: .dll
Syntax
public abstract class RenderContextBase extends DisposableBase implements IRenderContext2D
Constructors
RenderContextBase()
Declaration
public RenderContextBase()
Methods
drawSprite(ITexture2D sprite, float x, float y)
Draws a sprite at specified x, y coordinate
Declaration
public final void drawSprite(ITexture2D sprite, float x, float y)
Parameters
| Type | Name | Description |
|---|---|---|
| ITexture2D | sprite | |
| float | x | |
| float | y |
drawSprites(ITexture2D sprite, float[] points, int startIndex, int count)
Draws a series of sprites. Each point for sprite is taken from 2 consecutive values in the points array. Thus to draw 1 sprite, the array must contain at least 2 values.
Declaration
public final void drawSprites(ITexture2D sprite, float[] points, int startIndex, int count)
Parameters
| Type | Name | Description |
|---|---|---|
| ITexture2D | sprite | |
| float[] | points | |
| int | startIndex | |
| int | count |
drawTexture(ITexture2D texture, float x1, float y1, float x2, float y2)
Fills a single rectangle on the IRenderSurface using the specified ITexture2D
Declaration
public final void drawTexture(ITexture2D texture, float x1, float y1, float x2, float y2)
Parameters
| Type | Name | Description |
|---|---|---|
| ITexture2D | texture | |
| float | x1 | |
| float | y1 | |
| float | x2 | |
| float | y2 |
drawTexture(ITexture2D texture, float[] points, int startIndex, int count)
Draws a series of textures. Each point for sprite is taken from 4 consecutive values in the points array. Thus to draw 1 texture, the array must contain at least 4 values.
Declaration
public final void drawTexture(ITexture2D texture, float[] points, int startIndex, int count)
Parameters
| Type | Name | Description |
|---|---|---|
| ITexture2D | texture | |
| float[] | points | |
| int | startIndex | |
| int | count |