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);
86 bool filled=
true) = 0;
90 bool filled=
true) = 0;
99 virtual bool writePng(
const char* filename)
const = 0;
KernelTraitsBase< Kernel >::space_type::abscissa_type x
KernelTraitsBase< Kernel >::space_type::ordinate_type y
wrapper class for using 'gd' graphics library
virtual void circle(const Point ¢er, int radius, const Color &color, bool filled=true)=0
draw circle
static std::auto_ptr< Image > create(int logical_width, int logical_height, int output_width=-1, int output_height=-1)
create an instance optional output_width and output_height allows easy scaling to a desired output im...
virtual bool writePng(const char *filename) const =0
write png file
virtual void line(const Point &point1, const Point &point2, const Color &color)=0
draw line
virtual void stringUp(const std::string &text, const Point &point, const Color &color, Size size=Large, int align=Left|Top)=0
draw string
virtual void pixel(const Point &point, const Color &color)=0
draw pixel
virtual void rectangle(const Point &point1, const Point &point2, const Color &color, bool filled=true)=0
draw rectangle
virtual void string(const std::string &text, const Point &point, const Color &color, Size size=Large, int align=Left|Top)=0
draw string
virtual void clip(const Point &point1, const Point &point2)=0
set clipping rectangle
Image::Point operator-(const Image::Point &a, const Image::Point &b)
Image::Point operator+(const Image::Point &a, const Image::Point &b)
struct for holding rgb values (in [0,255])
Color(int r=0, int g=0, int b=0)
struct for holding pixel coordinates
Point(int _x=0, int _y=0)