lab5 outlined
This commit is contained in:
0
Lab5/image.cpp
Normal file
0
Lab5/image.cpp
Normal file
0
Lab5/image.h
Normal file
0
Lab5/image.h
Normal file
21
Lab5/line.h
Normal file
21
Lab5/line.h
Normal file
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* @file line.h
|
||||
* @author your name (you@domain.com)
|
||||
* @brief
|
||||
* @version 0.1
|
||||
* @date 2022-04-12
|
||||
*
|
||||
* @copyright Copyright (c) 2022
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shape.h"
|
||||
#include "matrix.h"
|
||||
|
||||
class Line: public Shape{
|
||||
public:
|
||||
|
||||
private:
|
||||
|
||||
|
||||
}
|
||||
15
Lab5/shape.cpp
Normal file
15
Lab5/shape.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* @file shape.cpp
|
||||
* @author your name (you@domain.com)
|
||||
* @brief
|
||||
* @version 0.1
|
||||
* @date 2022-04-12
|
||||
*
|
||||
* @copyright Copyright (c) 2022
|
||||
*
|
||||
*/
|
||||
#include "shape.h"
|
||||
|
||||
Shape::Shape(){
|
||||
this->RGB = (uint32_t) 0x00FFFFFF;
|
||||
}
|
||||
30
Lab5/shape.h
Normal file
30
Lab5/shape.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#include <iostream>
|
||||
#include "x11context.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
class Shape{
|
||||
public:
|
||||
// Constructor
|
||||
Shape();
|
||||
// Copy Constructor
|
||||
Shape(const Shape& from);
|
||||
// Destructor
|
||||
virtual ~Shape();
|
||||
// Virtual Constructor
|
||||
virtual Shape* clone();
|
||||
// Draw shape
|
||||
virtual void draw(GraphicsContext gc);
|
||||
// Print to output stream
|
||||
virtual void out(std::ostream& os, const Shape& rhs);
|
||||
|
||||
|
||||
protected:
|
||||
// Assignment Operator
|
||||
Shape& operator=(const Shape& rhs);
|
||||
private:
|
||||
uint32_t RGB;
|
||||
};
|
||||
|
||||
|
||||
|
||||
0
Lab5/triangle.cpp
Normal file
0
Lab5/triangle.cpp
Normal file
0
Lab5/triangle.h
Normal file
0
Lab5/triangle.h
Normal file
Reference in New Issue
Block a user