Struct ggez::graphics::spritebatch::SpriteBatch [] [src]

pub struct SpriteBatch { /* fields omitted */ }

A SpriteBatch draws a number of copies of the same image, using a single draw call.

This is generally faster than drawing the same sprite with many invocations of draw(), though it has a bit of overhead to set up the batch. This makes it run very slowly in Debug mode because it spends a lot of time on array bounds checking and un-optimized math; you need to build with optimizations enabled to really get the speed boost.

Methods

impl SpriteBatch
[src]

[src]

Creates a new SpriteBatch, drawing with the given image.

[src]

Adds a new sprite to the sprite batch.

Returns a handle with whictypeh to modify the sprite using set()

[src]

Alters a sprite in the batch to use the given draw params

[src]

Removes all data from the sprite batch.

[src]

Unwraps the contained Image

[src]

Replaces the contained Image, returning the old one.

[src]

Deprecated

Create an object which draws the current sprite batch with a different image.

Trait Implementations

impl Debug for SpriteBatch
[src]

[src]

Formats the value using the given formatter. Read more

impl Clone for SpriteBatch
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Drawable for SpriteBatch
[src]

[src]

Actually draws the object to the screen. Read more

[src]

Sets the blend mode to be used when drawing this drawable. This overrides the general graphics::set_blend_mode(). If None is set, defers to the blend mode set by graphics::set_blend_mode(). Read more

[src]

Gets the blend mode to be used when drawing this drawable.

[src]

Draws the drawable onto the rendering target. Read more

Auto Trait Implementations

impl Send for SpriteBatch

impl Sync for SpriteBatch