Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Functions
drawing.h File Reference
#include "vector.h"
#include <SDL_render.h>
#include <SDL_pixels.h>
+ Include dependency graph for drawing.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

static SDL_Color ToColor (const SDL_FColor &)
 
static SDL_FColor ToFColor (const SDL_Color &)
 
void Draw_Circle (int cx, int cy, int radius)
 
void Draw_FilledCircle (int cx, int cy, int radius)
 
void Draw_Triangle (Vector p1, Vector p2, Vector p3)
 
void Draw_FilledTriangle (const Vector &p1, const Vector &p2, const Vector &p3, SDL_FColor color)
 
void Draw_Hexagon (Vector center, float radius, SDL_Color color)
 
void Draw_FilledHexagon (Vector center, float radius, SDL_FColor color)
 
void Draw_Rectangle (const SDL_FRect *rect, SDL_Color color)
 
void Draw_Text (const std::string &text, const SDL_FRect *rect, SDL_Color textcolor, SDL_Color backgroundcolor)
 

Function Documentation

◆ Draw_Circle()

void Draw_Circle ( int  cx,
int  cy,
int  radius 
)

Definition at line 69 of file drawing.cpp.

References RenderContext::Get(), RenderContext::GetActiveCamera(), GetComponentTypeID_Static(), and GameEngine::renderer.

Referenced by OlympeEffectSystem::Implementation::RenderPlasmaOrbs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Draw_FilledCircle()

void Draw_FilledCircle ( int  cx,
int  cy,
int  radius 
)

Definition at line 135 of file drawing.cpp.

References RenderContext::Get(), RenderContext::GetActiveCamera(), GetComponentTypeID_Static(), and GameEngine::renderer.

Referenced by AI_Player::RenderDebug(), RenderEntitiesForCamera(), and RenderSingleEntity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Draw_FilledHexagon()

void Draw_FilledHexagon ( Vector  center,
float  radius,
SDL_FColor  color 
)

◆ Draw_FilledTriangle()

void Draw_FilledTriangle ( const Vector p1,
const Vector p2,
const Vector p3,
SDL_FColor  color 
)

Definition at line 201 of file drawing.cpp.

References RenderContext::Get(), RenderContext::GetActiveCamera(), GetComponentTypeID_Static(), GameEngine::renderer, and Vector::ToFPoint().

+ Here is the call graph for this function:

◆ Draw_Hexagon()

void Draw_Hexagon ( Vector  center,
float  radius,
SDL_Color  color 
)

Definition at line 279 of file drawing.cpp.

References RenderContext::Get(), RenderContext::GetActiveCamera(), GetComponentTypeID_Static(), HEXAGON_COS_ANGLES, HEXAGON_SIN_ANGLES, and GameEngine::renderer.

+ Here is the call graph for this function:

◆ Draw_Rectangle()

void Draw_Rectangle ( const SDL_FRect rect,
SDL_Color  color 
)

Definition at line 309 of file drawing.cpp.

References RenderContext::Get(), RenderContext::GetActiveCamera(), GetComponentTypeID_Static(), and GameEngine::renderer.

Referenced by RenderEntitiesForCamera(), and RenderSingleEntity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Draw_Text()

void Draw_Text ( const std::string text,
const SDL_FRect rect,
SDL_Color  textcolor,
SDL_Color  backgroundcolor 
)

Definition at line 345 of file drawing.cpp.

References RenderContext::Get(), RenderContext::GetActiveCamera(), GetComponentTypeID_Static(), GameEngine::renderer, and Vector::x.

Referenced by RenderEntitiesForCamera(), and RenderSingleEntity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Draw_Triangle()

void Draw_Triangle ( Vector  p1,
Vector  p2,
Vector  p3 
)

Definition at line 178 of file drawing.cpp.

References RenderContext::Get(), RenderContext::GetActiveCamera(), GetComponentTypeID_Static(), and GameEngine::renderer.

+ Here is the call graph for this function:

◆ ToColor()

static SDL_Color ToColor ( const SDL_FColor )
inlinestatic

◆ ToFColor()

static SDL_FColor ToFColor ( const SDL_Color )
inlinestatic