JNGL
Easy to use cross-platform 2D game library
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
sprite.hpp File Reference

Contains jngl::Sprite class and related functions. More...

#include "Color.hpp"
#include "Drawable.hpp"
#include "ShaderProgram.hpp"
#include "Vec2.hpp"
#include <future>
#include <vector>
Include dependency graph for sprite.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Sprite
 Higher-level representation of an image. More...
 
class  Sprite::Loader
 Use this class to load a Sprite asynchronously. More...
 

Namespaces

namespace  jngl
 JNGL's main namespace.
 

Functions

void draw (const std::string &filename, double x, double y)
 
template<class Vect >
void draw (const std::string &filename, Vect pos)
 
Finally load (const std::string &filename)
 Starts a thread to load filename and returns a Finally which will join it. More...
 
void unload (const std::string &filename)
 
void unloadAll ()
 
void drawClipped (const std::string &filename, double xposition, double yposition, float xstart, float xend, float ystart, float yend)
 
void setSpriteColor (unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha)
 
void setSpriteColor (unsigned char red, unsigned char green, unsigned char blue)
 
void setSpriteColor (Color)
 
void setSpriteAlpha (unsigned char alpha)
 
void pushSpriteAlpha (unsigned char alpha=255)
 
void popSpriteAlpha ()
 
int getWidth (const std::string &filename)
 
int getHeight (const std::string &filename)
 
Finally disableBlending ()
 

Detailed Description

Contains jngl::Sprite class and related functions.

Definition in file sprite.hpp.