pmc/include/surface.hpp
author Markus Bröker <mbroeker@largo.dyndns.tv>
Mon, 08 Mar 2010 18:30:04 +0100
changeset 121 fef2ccfa7b12
parent 65 76514757b0d6
permissions -rw-r--r--
step 2) Header seperation cpuid, bits, list and maybe lsf are too common names and have to reside in a seperate folder to avoid clashes committer: Markus Bröker <mbroeker@largo.homelinux.org>

/**
 * test/demos/pmc/include/surface.h
 * Copyright (C) 2008 Markus Broeker
 */

#ifndef SURFACE_H
#define SURFACE_H

#include <object.hpp>
#include <SDL/SDL.h>

class Surface:public Object {
  private:
    int width;
    int height;
    int depth;
    int bpp;

    Uint32 color, red, green, blue, black;
    SDL_Surface *screen;

  public:
    enum foregroundColor { BLACK = 1, RED, GREEN, BLUE };

    Surface (int w, int h, int d);
    Surface (const Surface &) { /* Copy Constructor disabled */ };
    virtual ~Surface ();

    int getWidth () { return width; };
    int getHeight () { return height; };

    void drawPixel (int x, int y);
    void drawLine (int x1, int y1, int x2, int y2);

    void flip ();
    void setColor (enum foregroundColor);
};
#endif