ProteoWizard
Classes | Public Member Functions | Static Public Member Functions
pwiz::util::Image Class Reference

wrapper class for using 'gd' graphics library More...

#include <Image.hpp>

List of all members.

Classes

struct  Color
 struct for holding rgb values (in [0,255]) More...
struct  Point
 struct for holding pixel coordinates More...

Public Member Functions

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 &center, 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 Public Member Functions

static Color white ()
static Color black ()
static std::auto_ptr< Imagecreate (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)

Detailed Description

wrapper class for using 'gd' graphics library

Definition at line 38 of file Image.hpp.


Constructor & Destructor Documentation

virtual pwiz::util::Image::~Image ( )
inlinevirtual

Definition at line 101 of file Image.hpp.

{}

Member Function Documentation

static Color pwiz::util::Image::white ( )
inlinestatic

Definition at line 52 of file Image.hpp.

{return Color(255, 255, 255);}
static Color pwiz::util::Image::black ( )
inlinestatic

Definition at line 53 of file Image.hpp.

{return Color(0, 0, 0);}
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)

virtual void pwiz::util::Image::pixel ( const Point point,
const Color color 
)
pure virtual

draw pixel

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

draw string

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

draw string

virtual void pwiz::util::Image::rectangle ( const Point point1,
const Point point2,
const Color color,
bool  filled = true 
)
pure virtual

draw rectangle

virtual void pwiz::util::Image::circle ( const Point center,
int  radius,
const Color color,
bool  filled = true 
)
pure virtual

draw circle

virtual void pwiz::util::Image::line ( const Point point1,
const Point point2,
const Color color 
)
pure virtual

draw line

virtual void pwiz::util::Image::clip ( const Point point1,
const Point point2 
)
pure virtual

set clipping rectangle

virtual bool pwiz::util::Image::writePng ( const char *  filename) const
pure virtual

write png file


The documentation for this class was generated from the following file: