lab 5 part 1 done

This commit is contained in:
2022-05-02 22:07:53 -05:00
parent bf5490504c
commit e381f5d7ca
7 changed files with 69 additions and 44 deletions

View File

@@ -1,5 +1,15 @@
#ifndef shape_h
#define shape_h
/**
* @file shape.h
* @author Trevor Barnes (barnestr@msoe.edu)
* @brief
* @version 1.0
* @date 2022-04-12
*
* @copyright Copyright (c) 2022
*
*/
#include <iostream>
#include "x11context.h"
#include "matrix.h"
@@ -15,9 +25,9 @@ class Shape{
// Destructor
virtual ~Shape();
// Draw shape
virtual void draw(GraphicsContext *gc);
virtual void draw(GraphicsContext *gc) = 0;
// Print to output stream
virtual void out(std::ostream& os, const Shape& rhs);
virtual void out(std::ostream& os)const = 0;
// Virtual Constructor
virtual Shape* clone() = 0; // Pure virtual "=0"
protected:
@@ -26,7 +36,7 @@ class Shape{
// RGB color
uint32_t color;
// Assignment Operator
Shape& operator=(const Shape& rhs);
virtual Shape& operator=(const Shape& rhs);
};
#endif