C# Class Engine.Objects.SpriteBatch

Mostra file Open project: Radnen/sphere-sfml

Public Methods

Method Description
Add ( Texture tex, FloatRect source, FloatRect dest, System.Color color ) : void

Adds a clipped or stretched version of the texture to the batcher, with the specified color.

Add ( Texture tex, IntRect source, FloatRect dest, System.Color color ) : void

Adds a clipped or stretched version of the texture to the batcher, with the specified color.

Add ( Texture tex, Vertex transform ) : void

Add a pre-transformed texture to the batcher.

Add ( Texture tex, float x, float y ) : void

Adds the texture to the batcher, drawn at the (x, y) location.

Add ( Texture tex, float x, float y, System.Color color ) : void

Adds the texture to the batcher, drawn at the (x, y) location with the specified color.

Add ( Texture tex, float x, float y, System.Color color, double r ) : void

Adds a rotated image to the batcher.

AddVerts ( Vertex verts, int count, PrimitiveType type = PrimitiveType.Quads ) : void

Adds verts to the batcher, must be a quad (for now).

Flush ( ) : void

Renders it all to screen, clearing out it's current buffer.

SetBlendMode ( BlendMode mode ) : void

Sets the batcher to use the specified blend mode.

SpriteBatch ( RenderTarget target ) : System

Private Methods

Method Description
Flush ( PrimitiveType type ) : void
Flush ( Texture replace ) : void
RotateX ( float x, float y, float cos, float sin ) : float
RotateY ( float x, float y, float cos, float sin ) : float

Method Details

Add() public method

Adds a clipped or stretched version of the texture to the batcher, with the specified color.
public Add ( Texture tex, FloatRect source, FloatRect dest, System.Color color ) : void
tex SFML.Graphics.Texture
source FloatRect
dest FloatRect
color System.Color
return void

Add() public method

Adds a clipped or stretched version of the texture to the batcher, with the specified color.
public Add ( Texture tex, IntRect source, FloatRect dest, System.Color color ) : void
tex SFML.Graphics.Texture
source IntRect
dest FloatRect
color System.Color
return void

Add() public method

Add a pre-transformed texture to the batcher.
public Add ( Texture tex, Vertex transform ) : void
tex SFML.Graphics.Texture
transform SFML.Graphics.Vertex
return void

Add() public method

Adds the texture to the batcher, drawn at the (x, y) location.
public Add ( Texture tex, float x, float y ) : void
tex SFML.Graphics.Texture
x float
y float
return void

Add() public method

Adds the texture to the batcher, drawn at the (x, y) location with the specified color.
public Add ( Texture tex, float x, float y, System.Color color ) : void
tex SFML.Graphics.Texture
x float
y float
color System.Color
return void

Add() public method

Adds a rotated image to the batcher.
public Add ( Texture tex, float x, float y, System.Color color, double r ) : void
tex SFML.Graphics.Texture
x float
y float
color System.Color
r double
return void

AddVerts() public method

Adds verts to the batcher, must be a quad (for now).
public AddVerts ( Vertex verts, int count, PrimitiveType type = PrimitiveType.Quads ) : void
verts SFML.Graphics.Vertex
count int
type PrimitiveType
return void

Flush() public method

Renders it all to screen, clearing out it's current buffer.
public Flush ( ) : void
return void

SetBlendMode() public method

Sets the batcher to use the specified blend mode.
public SetBlendMode ( BlendMode mode ) : void
mode BlendMode
return void

SpriteBatch() public method

public SpriteBatch ( RenderTarget target ) : System
target RenderTarget
return System