lab 5 progress
This commit is contained in:
20
Lab5/shape.h
20
Lab5/shape.h
@@ -1,5 +1,8 @@
|
||||
#ifndef shape_h
|
||||
#define shape_h
|
||||
#include <iostream>
|
||||
#include "x11context.h"
|
||||
#include "matrix.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -11,20 +14,19 @@ class Shape{
|
||||
Shape(const Shape& from);
|
||||
// Destructor
|
||||
virtual ~Shape();
|
||||
// Virtual Constructor
|
||||
virtual Shape* clone();
|
||||
// Draw shape
|
||||
virtual void draw(GraphicsContext gc);
|
||||
virtual void draw(GraphicsContext *gc);
|
||||
// Print to output stream
|
||||
virtual void out(std::ostream& os, const Shape& rhs);
|
||||
|
||||
|
||||
// Virtual Constructor
|
||||
virtual Shape* clone() = 0; // Pure virtual "=0"
|
||||
protected:
|
||||
// Matrix containing the coords of each point in the shape
|
||||
Matrix* coords;
|
||||
// RGB color
|
||||
uint32_t color;
|
||||
// Assignment Operator
|
||||
Shape& operator=(const Shape& rhs);
|
||||
private:
|
||||
uint32_t RGB;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user