-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathColorPixel.h
More file actions
24 lines (23 loc) · 859 Bytes
/
Copy pathColorPixel.h
File metadata and controls
24 lines (23 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#pragma once
#include <iostream>
#include <cassert>
class ColorPixel {
private:
unsigned int MaxColor;
unsigned int red;
unsigned int green;
unsigned int blue;
public:
ColorPixel(unsigned int mC = 255, unsigned int r = 255, unsigned int g = 255, unsigned int b = 255);
ColorPixel(const ColorPixel& other);
ColorPixel& operator=(const ColorPixel& other);
void grayscale(); //formula
void monochrome(); //logicly
void negative(); //logicly
void setColors(unsigned int r, unsigned int g, unsigned int b);
void setMaxColor(unsigned int mC);
void setMaxColorandColors(unsigned int mC, unsigned int r, unsigned int g, unsigned int b);
void setMaxColorandColors(unsigned int mC);
friend std::ostream& operator<<(std::ostream& out, const ColorPixel& cp);
friend std::istream& operator>>(std::istream& in, ColorPixel& cp);
};