pmc/include/surface.h
changeset 42 83b8151b966d
child 45 7197576fedcf
equal deleted inserted replaced
41:574503cf7bb0 42:83b8151b966d
       
     1 /**
       
     2  * test/demos/pmc/include/surface.h
       
     3  * Copyright (C) 2008 Markus Broeker
       
     4  */
       
     5 
       
     6 #ifndef SURFACE_H
       
     7 #define SURFACE_H
       
     8 
       
     9 #include <object.h>
       
    10 #include <SDL/SDL.h>
       
    11 
       
    12 class Surface:public Object {
       
    13   private:
       
    14     int width;
       
    15     int height;
       
    16     int depth;
       
    17 
       
    18     Uint32 color, red, black;
       
    19     SDL_Surface *screen;
       
    20 
       
    21   public:
       
    22     enum foregroundColor { BLACK, RED };
       
    23     Surface (int w, int h, int d);
       
    24    ~Surface ();
       
    25 
       
    26     int getWidth () {
       
    27         return width;
       
    28     };
       
    29     int getHeight () {
       
    30         return height;
       
    31     };
       
    32 
       
    33     void drawPixel (int x, int y);
       
    34     void drawLine (int x1, int y1, int x2, int y2);
       
    35 
       
    36     void flip ();
       
    37     void setColor (enum foregroundColor);
       
    38 };
       
    39 #endif