diff options
author | Mateja <mail@matejamaric.com> | 2020-12-27 00:09:34 +0100 |
---|---|---|
committer | Mateja <mail@matejamaric.com> | 2020-12-27 00:09:34 +0100 |
commit | 0a2da4f82435a49212e276d9d603e84ac298246d (patch) | |
tree | 1fea3b94712df18d1229f4f3492b540c90f6f302 /source/Bitmap.cpp | |
parent | a84debff887c3e3d930665db140b7a287d3879d4 (diff) | |
download | erender-0a2da4f82435a49212e276d9d603e84ac298246d.tar.gz erender-0a2da4f82435a49212e276d9d603e84ac298246d.zip |
Reorganize entire project.
Diffstat (limited to 'source/Bitmap.cpp')
-rw-r--r-- | source/Bitmap.cpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/source/Bitmap.cpp b/source/Bitmap.cpp deleted file mode 100644 index 363145f..0000000 --- a/source/Bitmap.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include "Bitmap.h"
-
-Bitmap::Bitmap(int width_, int height_) {
- width = width_;
- height = height_;
- pixels = new unsigned char[width * height * 4];
-}
-
-Bitmap::~Bitmap() {
- delete[] pixels;
-}
-
-void Bitmap::fill(int r, int g, int b) {
- for (int i = 0; i < width * height * 4; i+=4)
- {
- pixels[i + 0] = r;
- pixels[i + 1] = g;
- pixels[i + 2] = b;
- pixels[i + 3] = 255;
- }
-}
-
-void Bitmap::setPixel(int x, int y, int r, int g, int b) {
- int hlp = ((y * width) + x) * 4;
- if (!(hlp < 0 || hlp >(width * height * 4) - 3)) {
- pixels[hlp + 0] = r;
- pixels[hlp + 1] = g;
- pixels[hlp + 2] = b;
- pixels[hlp + 3] = 255;
- }
- else {
- std::cout << "Position of pixel:\t" << hlp << "\tX: " << x << "\tY: "<< y << "\n";
- }
-}
|