// Computergraphik I // Prof. Dr. Juergen Doellner // Sommersemester 2001 // // Rahmenprogramm fuer Aufgabenzettel 4 // Stephan Brumme, 702544 // last changes: May 19, 2001 #ifndef CG_BRESENHAM_H #define CG_BRESENHAM_H #include "cgapplication.h" #include "cgraster.h" class CGEllipse : public CGApplication { public: CGEllipse(int width, int height); virtual void onInit(); virtual void onDraw(); virtual void onSize(unsigned int newWidth,unsigned int newHeight); virtual void onButton(MouseButton button, MouseButtonEvent event, int x, int y); virtual void onMove(MouseButton button, int x, int y); private: // zeichenen der Ellipse in das Raster raster_ void drawEllipse(int x1, int y1, int x2, int y2); void drawEllipsePoints(int midx, int midy, int x, int y); // interne Raster-Klasse CGRaster raster_; // Fenstergroesse speichern int winWidth_; int winHeight_; // linke untere und rechte obere Ecke des Rechteckes, das die Ellipse beschreibt int xBegin_; int yBegin_; int xEnd_; int yEnd_; bool First_; }; #endif // CG_BRESENHAM_H