supertux
Public Member Functions | Static Public Member Functions | List of all members
Surface Class Referencefinal

A rectangular image. More...

#include <surface.hpp>

Public Member Functions

SurfacePtr region (const Rect &rect) const
 
SurfacePtr clone (Flip flip=NO_FLIP) const
 
TexturePtr get_texture () const
 
TexturePtr get_displacement_texture () const
 
Rect get_region () const
 
int get_width () const
 
int get_height () const
 
Flip get_flip () const
 
const std::string & get_filename () const
 

Static Public Member Functions

static SurfacePtr from_texture (const TexturePtr &texture)
 
static SurfacePtr from_file (const std::string &filename, const std::optional< Rect > &rect=std::nullopt)
 
static SurfacePtr from_reader (const ReaderMapping &mapping, const std::optional< Rect > &rect=std::nullopt, const std::string &filename="")
 

Detailed Description

A rectangular image.

The class basically holds a reference to a texture with additional UV coordinates that specify a rectangular area on this texture


The documentation for this class was generated from the following files: