pmc/include/surface.h
changeset 65 76514757b0d6
parent 64 993b97c4ad2d
child 66 2b4f786d9073
equal deleted inserted replaced
64:993b97c4ad2d 65:76514757b0d6
     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     int bpp;
       
    18 
       
    19     Uint32 color, red, green, blue, black;
       
    20     SDL_Surface *screen;
       
    21 
       
    22   public:
       
    23     enum foregroundColor { BLACK = 1, RED, GREEN, BLUE };
       
    24 
       
    25     Surface (int w, int h, int d);
       
    26     Surface (const Surface &) { /* Copy Constructor disabled */ };
       
    27     virtual ~Surface ();
       
    28 
       
    29     int getWidth () { return width; };
       
    30     int getHeight () { return height; };
       
    31 
       
    32     void drawPixel (int x, int y);
       
    33     void drawLine (int x1, int y1, int x2, int y2);
       
    34 
       
    35     void flip ();
       
    36     void setColor (enum foregroundColor);
       
    37 };
       
    38 #endif