49 Color(
int r=0,
int g=0,
int b=0) : red(r), green(g), blue(b) {}
61 Point(
int _x=0,
int _y=0) : x(_x), y(_y) {}
70 static std::auto_ptr<Image> create(
int logical_width,
int logical_height,
71 int output_width=-1,
int output_height=-1);
74 virtual void pixel(
const Point& point,
const Color& color) = 0;
77 virtual void string(
const std::string& text,
const Point& point,
const Color& color,
81 virtual void stringUp(
const std::string& text,
const Point& point,
const Color& color,
85 virtual void rectangle(
const Point& point1,
const Point& point2,
const Color& color,
86 bool filled=
true) = 0;
89 virtual void circle(
const Point& center,
int radius,
const Color& color,
90 bool filled=
true) = 0;
93 virtual void line(
const Point& point1,
const Point& point2,
const Color& color) = 0;
96 virtual void clip(
const Point& point1,
const Point& point2) = 0;
99 virtual bool writePng(
const char* filename)
const = 0;
121 #endif // _IMAGE_HPP_
Point(int _x=0, int _y=0)
struct for holding pixel coordinates
wrapper class for using 'gd' graphics library
Image::Point operator-(const Image::Point &a, const Image::Point &b)
Image::Point operator+(const Image::Point &a, const Image::Point &b)
Color(int r=0, int g=0, int b=0)
struct for holding rgb values (in [0,255])