-
Notifications
You must be signed in to change notification settings - Fork 0
/
Formats.h
49 lines (36 loc) · 1.05 KB
/
Formats.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef FORMATS_H
#define FORMATS_H
#include<string>
#include<vector>
#include<iostream>
class Formats
{
protected:
std::string path;
std::string ASCIInum;
std::string comment;
int width = 0;
int height = 0;
public:
Formats() = default;
virtual ~Formats();
std::string getPath() const;
int getWidth() const;
int getHeight() const;
//×åñòî âèðòóàëíè ôóíêöèè.
virtual void load(std::string path) = 0;
virtual void saveas(std::string path) const = 0;
virtual void print(std::ostream& out) const = 0;
virtual void grayscale();
virtual void monochrome();
virtual void negative() = 0;
virtual void rotation(std::string direction) = 0;
virtual void collage(std::string direction, std::string image1, std::string image2, std::string outimage) = 0;
virtual void undoGrayscale();
virtual void undoMonochrome();
friend std::ostream& operator<<(std::ostream& out, const Formats& other);
static bool isOneDigit(int x);
static bool isTwoDigit(int x);
static bool isThreeDigit(int x);
};
#endif