29 #include "nomlib/graphics/shapes/Point.hpp"
33 Point::Point (
void ) {}
34 Point::~Point (
void ) {}
36 Point::Point (
const Point2i& coords,
const Color& color )
38 this->coords = coords;
42 Point::Point ( int32 x, int32 y,
const Color& color )
44 this->coords = Point2i ( x, y );
52 if ( SDL_SetRenderDrawColor ( target.
renderer(), this->color.
r, this->color.
g, this->color.
b, this->color.
a ) != 0 )
54 NOM_LOG_ERR ( NOM, SDL_GetError() );
58 if ( SDL_RenderDrawPoint ( target.
renderer(), this->coords.x, this->coords.y ) != 0 )
60 NOM_LOG_ERR ( NOM,
"Could not render 3D SDL point: " + std::string (SDL_GetError()) );
uint8 & r
Reference alias for red instance variable.
uint8 & a
Reference alias for alpha instance variable.
uint8 & g
Reference alias for green instance variable.
SDL_RENDERER::RawPtr renderer(void) const
Get a raw pointer to the SDL_Renderer in use.
uint8 & b
Reference alias for blue instance variable.
void draw(RenderTarget target) const
Render the object onto the primary video buffer – your visible screen.