Raylib C++  1.0.0
Encapsulates the raylib library
Static Public Member Functions | List of all members
raylib::helper::draw::DrawTextureHelper Class Reference

Helper class for drawing textures. More...

#include <DrawTextureHelper.hpp>

Collaboration diagram for raylib::helper::draw::DrawTextureHelper:
Collaboration graph

Static Public Member Functions

static void drawTexture (const texture::RlTexture &texture, int posX, int posY, const RlColor &tint)
 Draw a texture. More...
 
static void drawTexture (const texture::RlTexture &texture, const Vector2f &position, const RlColor &tint)
 Draw a texture with position defined as Vector2f. More...
 
static void drawTexture (const texture::RlTexture &texture, const Vector2f &position, float rotation, float scale, const RlColor &tint)
 Draw a texture with extended parameters. More...
 
static void drawTextureRec (const texture::RlTexture &texture, const Rectangle &source, const Vector2f &position, const RlColor &tint)
 Draw a part of a texture defined by a rectangle. More...
 
static void drawTextureQuad (const texture::RlTexture &texture, const Vector2f &tiling, const Vector2f &offset, const Rectangle &quad, const RlColor &tint)
 Draw a texture quad with tiling and offset parameters. More...
 
static void drawTextureTiled (const texture::RlTexture &texture, const Rectangle &source, const Rectangle &dest, const Vector2f &origin, float rotation, float scale, const RlColor &tint)
 Draw part of a texture (defined by a rectangle) with rotation and scale tiled into dest. More...
 
static void drawTexture (const texture::RlTexture &texture, const Rectangle &source, const Rectangle &dest, const Vector2f &origin, float rotation, const RlColor &tint)
 Draw a part of a texture defined by a rectangle with 'pro' parameters. More...
 
static void drawTextureNPatch (const texture::RlTexture &texture, const NPatchInfo &nPatchInfo, const Rectangle &dest, const Vector2f &origin, float rotation, const RlColor &tint)
 Draws a texture (or part of it) that stretches or shrinks nicely. More...
 
static void drawTexturePoly (const texture::RlTexture &texture, const Vector2f &center, const std::vector< Vector2f > &points, std::vector< Vector2f > &texcoords, const RlColor &tint)
 Draw a textured polygon. More...
 

Detailed Description

Helper class for drawing textures.

Member Function Documentation

◆ drawTexture() [1/4]

void raylib::helper::draw::DrawTextureHelper::drawTexture ( const texture::RlTexture texture,
const Rectangle &  source,
const Rectangle &  dest,
const Vector2f origin,
float  rotation,
const RlColor tint 
)
static

Draw a part of a texture defined by a rectangle with 'pro' parameters.

Parameters
texturethe texture to Draw
sourcethe rectangle of the texture to Draw
destthe rectangle of the texture to Draw into
originthe origin of the texture
rotationthe rotation of the texture
tintthe color tint of the texture
Here is the call graph for this function:

◆ drawTexture() [2/4]

void raylib::helper::draw::DrawTextureHelper::drawTexture ( const texture::RlTexture texture,
const Vector2f position,
const RlColor tint 
)
static

Draw a texture with position defined as Vector2f.

Parameters
texturethe texture to Draw
positionthe position of the texture
tintthe color tint of the texture
Here is the call graph for this function:

◆ drawTexture() [3/4]

void raylib::helper::draw::DrawTextureHelper::drawTexture ( const texture::RlTexture texture,
const Vector2f position,
float  rotation,
float  scale,
const RlColor tint 
)
static

Draw a texture with extended parameters.

Parameters
texturethe texture to Draw
positionthe position of the texture
rotationthe rotation of the texture
scalethe scale of the texture
tintthe color tint of the texture
Here is the call graph for this function:

◆ drawTexture() [4/4]

void raylib::helper::draw::DrawTextureHelper::drawTexture ( const texture::RlTexture texture,
int  posX,
int  posY,
const RlColor tint 
)
static

Draw a texture.

Parameters
texturethe texture to Draw
posXthe x position of the texture
posYthe y position of the texture
tintthe color tint of the texture
Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawTextureNPatch()

void raylib::helper::draw::DrawTextureHelper::drawTextureNPatch ( const texture::RlTexture texture,
const NPatchInfo &  nPatchInfo,
const Rectangle &  dest,
const Vector2f origin,
float  rotation,
const RlColor tint 
)
static

Draws a texture (or part of it) that stretches or shrinks nicely.

Parameters
texturethe texture to Draw
nPatchInfothe rectangle of the texture to Draw
destthe rectangle of the texture to Draw into
originthe origin of the texture
rotationthe rotation of the texture
tintthe color tint of the texture
Here is the call graph for this function:

◆ drawTexturePoly()

void raylib::helper::draw::DrawTextureHelper::drawTexturePoly ( const texture::RlTexture texture,
const Vector2f center,
const std::vector< Vector2f > &  points,
std::vector< Vector2f > &  texcoords,
const RlColor tint 
)
static

Draw a textured polygon.

Parameters
texturethe texture to Draw
centerthe center of the texture
pointsthe points of the texture
texcoordsthe texture coordinates of the texture
tintthe color tint of the texture
Attention
The points and texcoords must have the same size
Exceptions
raylib::ex::InvalidArgumentExceptionif the points and texcoords have different size
Here is the call graph for this function:

◆ drawTextureQuad()

void raylib::helper::draw::DrawTextureHelper::drawTextureQuad ( const texture::RlTexture texture,
const Vector2f tiling,
const Vector2f offset,
const Rectangle &  quad,
const RlColor tint 
)
static

Draw a texture quad with tiling and offset parameters.

Parameters
texturethe texture to Draw
tilingthe tiling of the texture
offsetthe offset of the texture
quadthe quad of the texture
tintthe color tint of the texture
Here is the call graph for this function:

◆ drawTextureRec()

void raylib::helper::draw::DrawTextureHelper::drawTextureRec ( const texture::RlTexture texture,
const Rectangle &  source,
const Vector2f position,
const RlColor tint 
)
static

Draw a part of a texture defined by a rectangle.

Parameters
texturethe texture to Draw
sourcethe rectangle of the texture to Draw
positionthe position of the texture
tintthe color tint of the texture
Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawTextureTiled()

void raylib::helper::draw::DrawTextureHelper::drawTextureTiled ( const texture::RlTexture texture,
const Rectangle &  source,
const Rectangle &  dest,
const Vector2f origin,
float  rotation,
float  scale,
const RlColor tint 
)
static

Draw part of a texture (defined by a rectangle) with rotation and scale tiled into dest.

Parameters
texturethe texture to Draw
sourcethe rectangle of the texture to Draw
destthe rectangle of the texture to Draw into
originthe origin of the texture
rotationthe rotation of the texture
scalethe scale of the texture
tintthe color tint of the texture
Here is the call graph for this function:

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