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

Image drawing functions, Draw on an image NOTE: Image software-rendering functions (CPU) More...

#include <ImageDrawHelper.hpp>

Collaboration diagram for raylib::image::ImageDrawHelper:
Collaboration graph

Static Public Member Functions

static void clearBackground (image::RlImage &dst, const RlColor &color)
 Clear image background with given color. More...
 
static void drawPixel (image::RlImage &dst, int posX, int posY, const RlColor &color)
 Draw pixel within an image. More...
 
static void drawPixel (image::RlImage &dst, const Vector2f &position, const RlColor &color)
 Draw pixel within an image. More...
 
static void drawLine (image::RlImage &dst, int startPosX, int startPosY, int endPosX, int endPosY, const RlColor &color)
 Draw line within an image. More...
 
static void drawLine (image::RlImage &dst, const Vector2f &start, const Vector2f &end, const RlColor &color)
 Draw line within an image. More...
 
static void drawCircle (image::RlImage &dst, int centerX, int centerY, int radius, const RlColor &color)
 Draw circle within an image. More...
 
static void drawCircle (image::RlImage &dst, const Vector2f &center, int radius, const RlColor &color)
 Draw circle within an image. More...
 
static void drawRectangle (image::RlImage &dst, int posX, int posY, int width, int height, const RlColor &color)
 Draw rectangle within an image. More...
 
static void drawRectangle (image::RlImage &dst, const Vector2f &position, const Vector2f &size, const RlColor &color)
 Draw rectangle within an image. More...
 
static void drawRectangleRec (image::RlImage &dst, const Rectangle &rec, const RlColor &color)
 Draw rectangle within an image. More...
 
static void drawRectangleLines (image::RlImage &dst, const Rectangle &rec, int thick, const RlColor &color)
 Draw rectangle lines within an image. More...
 
static void drawImage (image::RlImage &dst, const image::RlImage &src, const Rectangle &srcRec, const Rectangle &dstRec, const RlColor &tint)
 Draw a source image within a destination image (tint applied to source) More...
 
static void drawImageText (image::RlImage &dst, const std::string &text, int posX, int posY, int fontSize, const RlColor &color)
 Draw text (using default font) within an image (destination) More...
 
static void drawImageText (image::RlImage &dst, const raylib::text::RlFont &font, const std::string &text, const Vector2f &position, float fontSize, float spacing, const RlColor &tint)
 Draw text (custom sprite font) within an image (destination) More...
 

Detailed Description

Image drawing functions, Draw on an image NOTE: Image software-rendering functions (CPU)

Member Function Documentation

◆ clearBackground()

void raylib::image::ImageDrawHelper::clearBackground ( image::RlImage dst,
const RlColor color 
)
static

Clear image background with given color.

Parameters
dstthe image to clear
colorthe color to use
Here is the call graph for this function:

◆ drawCircle() [1/2]

void raylib::image::ImageDrawHelper::drawCircle ( image::RlImage dst,
const Vector2f center,
int  radius,
const RlColor color 
)
static

Draw circle within an image.

Parameters
dstthe image to Draw on
centerthe position to center at
radiusthe radius of the circle
colorthe color to use
Here is the call graph for this function:

◆ drawCircle() [2/2]

void raylib::image::ImageDrawHelper::drawCircle ( image::RlImage dst,
int  centerX,
int  centerY,
int  radius,
const RlColor color 
)
static

Draw circle within an image.

Parameters
dstthe image to Draw on
centerXthe x position to center at
centerYthe y position to center at
radiusthe radius of the circle
colorthe color to use
Here is the call graph for this function:

◆ drawImage()

void raylib::image::ImageDrawHelper::drawImage ( image::RlImage dst,
const image::RlImage src,
const Rectangle &  srcRec,
const Rectangle &  dstRec,
const RlColor tint 
)
static

Draw a source image within a destination image (tint applied to source)

Parameters
dstthe image to Draw on
srcthe image to Draw
srcRecthe rectangle of the source image to Draw
dstRecthe rectangle of the destination image to Draw on
tintthe color to use
Here is the call graph for this function:

◆ drawImageText() [1/2]

void raylib::image::ImageDrawHelper::drawImageText ( image::RlImage dst,
const raylib::text::RlFont font,
const std::string &  text,
const Vector2f position,
float  fontSize,
float  spacing,
const RlColor tint 
)
static

Draw text (custom sprite font) within an image (destination)

Parameters
dstthe image to Draw on
fontthe font to use
textthe text to Draw
positionthe position to Draw at
fontSizethe font size to use
spacingthe spacing between letters
tintthe color to use
Here is the call graph for this function:

◆ drawImageText() [2/2]

void raylib::image::ImageDrawHelper::drawImageText ( image::RlImage dst,
const std::string &  text,
int  posX,
int  posY,
int  fontSize,
const RlColor color 
)
static

Draw text (using default font) within an image (destination)

Parameters
dstthe image to Draw on
textthe text to Draw
posXthe x position to Draw at
posYthe y position to Draw at
fontSizethe font size to use
colorthe color to use
Here is the call graph for this function:

◆ drawLine() [1/2]

void raylib::image::ImageDrawHelper::drawLine ( image::RlImage dst,
const Vector2f start,
const Vector2f end,
const RlColor color 
)
static

Draw line within an image.

Parameters
dstthe image to Draw on
startthe position to start at
endthe position to end at
colorthe color to use
Here is the call graph for this function:

◆ drawLine() [2/2]

void raylib::image::ImageDrawHelper::drawLine ( image::RlImage dst,
int  startPosX,
int  startPosY,
int  endPosX,
int  endPosY,
const RlColor color 
)
static

Draw line within an image.

Parameters
dstthe image to Draw on
startPosXthe x position to start at
startPosYthe y position to start at
endPosXthe x position to end at
endPosYthe y position to end at
colorthe color to use
Here is the call graph for this function:

◆ drawPixel() [1/2]

void raylib::image::ImageDrawHelper::drawPixel ( image::RlImage dst,
const Vector2f position,
const RlColor color 
)
static

Draw pixel within an image.

Parameters
dstthe image to Draw on
positionthe position to Draw at
colorthe color to use
Here is the call graph for this function:

◆ drawPixel() [2/2]

void raylib::image::ImageDrawHelper::drawPixel ( image::RlImage dst,
int  posX,
int  posY,
const RlColor color 
)
static

Draw pixel within an image.

Parameters
dstthe image to Draw on
posXthe x position to Draw at
posYthe y position to Draw at
colorthe color to use
Here is the call graph for this function:

◆ drawRectangle() [1/2]

void raylib::image::ImageDrawHelper::drawRectangle ( image::RlImage dst,
const Vector2f position,
const Vector2f size,
const RlColor color 
)
static

Draw rectangle within an image.

Parameters
dstthe image to Draw on
positionthe position to Draw at
sizethe size of the rectangle
colorthe color to use
Here is the call graph for this function:

◆ drawRectangle() [2/2]

void raylib::image::ImageDrawHelper::drawRectangle ( image::RlImage dst,
int  posX,
int  posY,
int  width,
int  height,
const RlColor color 
)
static

Draw rectangle within an image.

Parameters
dstthe image to Draw on
posXthe x position to Draw at
posYthe y position to Draw at
widththe width of the rectangle
heightthe height of the rectangle
colorthe color to use
Here is the call graph for this function:

◆ drawRectangleLines()

void raylib::image::ImageDrawHelper::drawRectangleLines ( image::RlImage dst,
const Rectangle &  rec,
int  thick,
const RlColor color 
)
static

Draw rectangle lines within an image.

Parameters
dstthe image to Draw on
recthe rectangle to Draw
thickthe thickness of the lines
colorthe color to use
Here is the call graph for this function:

◆ drawRectangleRec()

void raylib::image::ImageDrawHelper::drawRectangleRec ( image::RlImage dst,
const Rectangle &  rec,
const RlColor color 
)
static

Draw rectangle within an image.

Parameters
dstthe image to Draw on
recthe rectangle to Draw
colorthe color to use
Here is the call graph for this function:

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