PROTO::KLUDGE  0.1
Quick prototyping library for games using SDL and OpenGL.
pk::Drawable Class Referenceabstract

Interface for creating drawable entities. Part of the Decorator pattern for drawable objects used in the game. More...

#include <Drawable.hpp>

Inheritance diagram for pk::Drawable:
Inheritance graph
Collaboration diagram for pk::Drawable:
Collaboration graph

Public Member Functions

 Drawable ()
 Drawable constructor. Call explicitly in inherited classes. More...
 
virtual ~Drawable ()
 
virtual void draw (SDL_Renderer *const renderTarget, SDL_Rect *const renderTargetRect)=0
 Draw the drawable entity to a render target. More...
 

Detailed Description

Interface for creating drawable entities. Part of the Decorator pattern for drawable objects used in the game.

Constructor & Destructor Documentation

◆ Drawable()

pk::Drawable::Drawable ( )

Drawable constructor. Call explicitly in inherited classes.

◆ ~Drawable()

virtual pk::Drawable::~Drawable ( )
virtual

Member Function Documentation

◆ draw()

void pk::Drawable::draw ( SDL_Renderer *const  renderTarget,
SDL_Rect *const  renderTargetRect 
)
pure virtual

Draw the drawable entity to a render target.

Parameters
SDL_Renderer* const renderTarget - the target to draw to.
SDL_Rect* const renderTargetRect - the rect belonging to the render target.

Implemented in pk::Text, and pk::Sprite.


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