wrapper class for using 'gd' graphics library
More...
#include <Image.hpp>
|
| struct | Color |
| | struct for holding rgb values (in [0,255]) More...
|
| |
| struct | Point |
| | struct for holding pixel coordinates More...
|
| |
|
| virtual void | pixel (const Point &point, const Color &color)=0 |
| | draw pixel
|
| |
| 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 | stringUp (const std::string &text, const Point &point, const Color &color, Size size=Large, int align=Left|Top)=0 |
| | draw string
|
| |
| virtual void | rectangle (const Point &point1, const Point &point2, const Color &color, bool filled=true)=0 |
| | draw rectangle
|
| |
| virtual void | circle (const Point ¢er, int radius, const Color &color, bool filled=true)=0 |
| | draw circle
|
| |
| virtual void | line (const Point &point1, const Point &point2, const Color &color)=0 |
| | draw line
|
| |
| virtual void | clip (const Point &point1, const Point &point2)=0 |
| | set clipping rectangle
|
| |
| virtual bool | writePng (const char *filename) const =0 |
| | write png file
|
| |
| virtual | ~Image () |
| |
|
| static Color | white () |
| |
| static Color | black () |
| |
| 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 image size without complicating the drawing code (default is to use logical width and height)
|
| |
wrapper class for using 'gd' graphics library
Definition at line 38 of file Image.hpp.
◆ ~Image()
| virtual pwiz::util::Image::~Image |
( |
| ) |
|
|
inlinevirtual |
◆ white()
| static Color pwiz::util::Image::white |
( |
| ) |
|
|
inlinestatic |
Definition at line 52 of file Image.hpp.
52{return Color(255, 255, 255);}
◆ black()
| static Color pwiz::util::Image::black |
( |
| ) |
|
|
inlinestatic |
Definition at line 53 of file Image.hpp.
53{return Color(0, 0, 0);}
◆ create()
| static std::auto_ptr< Image > pwiz::util::Image::create |
( |
int |
logical_width, |
|
|
int |
logical_height, |
|
|
int |
output_width = -1, |
|
|
int |
output_height = -1 |
|
) |
| |
|
static |
create an instance optional output_width and output_height allows easy scaling to a desired output image size without complicating the drawing code (default is to use logical width and height)
◆ pixel()
| virtual void pwiz::util::Image::pixel |
( |
const Point & |
point, |
|
|
const Color & |
color |
|
) |
| |
|
pure virtual |
◆ string()
| virtual void pwiz::util::Image::string |
( |
const std::string & |
text, |
|
|
const Point & |
point, |
|
|
const Color & |
color, |
|
|
Size |
size = Large, |
|
|
int |
align = Left|Top |
|
) |
| |
|
pure virtual |
◆ stringUp()
| virtual void pwiz::util::Image::stringUp |
( |
const std::string & |
text, |
|
|
const Point & |
point, |
|
|
const Color & |
color, |
|
|
Size |
size = Large, |
|
|
int |
align = Left|Top |
|
) |
| |
|
pure virtual |
◆ rectangle()
| virtual void pwiz::util::Image::rectangle |
( |
const Point & |
point1, |
|
|
const Point & |
point2, |
|
|
const Color & |
color, |
|
|
bool |
filled = true |
|
) |
| |
|
pure virtual |
◆ circle()
| virtual void pwiz::util::Image::circle |
( |
const Point & |
center, |
|
|
int |
radius, |
|
|
const Color & |
color, |
|
|
bool |
filled = true |
|
) |
| |
|
pure virtual |
◆ line()
| virtual void pwiz::util::Image::line |
( |
const Point & |
point1, |
|
|
const Point & |
point2, |
|
|
const Color & |
color |
|
) |
| |
|
pure virtual |
◆ clip()
| virtual void pwiz::util::Image::clip |
( |
const Point & |
point1, |
|
|
const Point & |
point2 |
|
) |
| |
|
pure virtual |
◆ writePng()
| virtual bool pwiz::util::Image::writePng |
( |
const char * |
filename | ) |
const |
|
pure virtual |
The documentation for this class was generated from the following file:
- /build/libpwiz-n8pw9z/libpwiz-3.0.18342/pwiz/utility/misc/Image.hpp