Public Member Functions | Private Attributes | List of all members
nom::Pixel Class Reference

OMG, they still do pixels?! More...

#include <Pixel.hpp>

Inheritance diagram for nom::Pixel:
[legend]
Collaboration diagram for nom::Pixel:
[legend]

Public Member Functions

 Pixel (const Coords &coords, const Color &color)
 
 Pixel (int32 x, int32 y, const Color &color)
 
void Update (void)
 
void Draw (SDL_Surface *video_buffer) const
 
- Public Member Functions inherited from nom::IDrawable
 IDrawable (void)
 Do nothing at all default constructor.
 
virtual ~IDrawable (void)
 Do nothing at all destructor.
 
virtual void update (void)=0
 
virtual void draw (RenderTarget) const =0
 Render the object onto the primary video buffer – your visible screen.
 

Private Attributes

Coords coords
 
Color color
 

Additional Inherited Members

- Public Types inherited from nom::IDrawable
typedef std::unique_ptr
< IDrawable > 
UniquePtr
 std::unique_ptr definition type for your convenience, sir!
 
typedef std::shared_ptr
< IDrawable > 
SharedPtr
 std::shared_ptr definition type at your leisure, sir!
 
typedef std::vector
< std::shared_ptr< IDrawable > > 
SharedDrawables
 Vector of std::shared_ptr definition type for the brotherhood, sir!
 
typedef std::vector
< std::unique_ptr< IDrawable > > 
UniqueDrawables
 std::unique_ptr vector container type
 
typedef const Window & RenderTarget
 

Detailed Description

OMG, they still do pixels?!

Definition at line 42 of file Pixel.hpp.

Member Function Documentation

void nom::Pixel::Draw ( SDL_Surface *  video_buffer) const

Pixel blitting – supports 8-bit, 15/16-bit, 24-bit & 32-bit color modes

If an unsupported canvas is detected, returns without attempting to write

You are responsible for locking & unlocking of the canvas before-hand

Todo:
Test 8-bit, 15/16-bit & 24-bit pixels

Definition at line 51 of file Pixel.cpp.


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