ifm::DeviceContextAdapter Class Reference

List of all members.


Detailed Description

The gui toolkit independant interface for device contexts and painting operations.

Public Member Functions

int calc_text_width (const Font &font, std::string str) const
void cancel_clip ()
void clip_rect (const Rect &rect)
 DeviceContextAdapter (DeviceContext &dc)
void draw_bitmap (const Point &pos, const Bitmap &bmp, const Color &mask)
void draw_bitmap (const Point &pos, const Bitmap &bmp, bool use_mask)
void draw_bitmap (const Point &pos, const Bitmap &bmp)
void draw_line (int x1, int y1, int x2, int y2)
void draw_line (const Point &pos1, const Point &pos2)
void draw_line (const Point &pos1, const Point &pos2, const Color &color, int width)
 Renders a line between two points.
void draw_polygon (int n, Point points[], int xoffset=0, int yoffset=0)
void draw_rectangle (const Rect &rect)
void draw_text (const std::string &text, const Point &pt, const Font &font, const Color &color)
 Renders the given string at the given position.
void fill_rect (const Rect &rect, const Color &bg, const Color &border)
 Fills the given rect with the given background and border colors.
 operator const DeviceContext & () const
 operator DeviceContext & ()
void paint_straight_gradient_box (const Rect &rect, const Color &startColor, const Color &endColor, bool vertical=true)
void set_brush (const Color &color)
void set_pen (const Color &color, int width)
void set_text_background (const Color &color)
void set_transparent_brush ()

Private Attributes

DeviceContextm_dc

Constructor & Destructor Documentation

ifm::DeviceContextAdapter::DeviceContextAdapter ( DeviceContext dc  ) 


Member Function Documentation

int ifm::DeviceContextAdapter::calc_text_width ( const Font font,
std::string  str 
) const

void ifm::DeviceContextAdapter::cancel_clip (  ) 

Removes any existing clipping region

void ifm::DeviceContextAdapter::clip_rect ( const Rect rect  ) 

Sets the clipping region. Anything rendered outside of the clipping region will be ignored.

void ifm::DeviceContextAdapter::draw_bitmap ( const Point pos,
const Bitmap bmp,
const Color mask 
)

void ifm::DeviceContextAdapter::draw_bitmap ( const Point pos,
const Bitmap bmp,
bool  use_mask 
)

void ifm::DeviceContextAdapter::draw_bitmap ( const Point pos,
const Bitmap bmp 
)

void ifm::DeviceContextAdapter::draw_line ( int  x1,
int  y1,
int  x2,
int  y2 
)

void ifm::DeviceContextAdapter::draw_line ( const Point pos1,
const Point pos2 
)

void ifm::DeviceContextAdapter::draw_line ( const Point pos1,
const Point pos2,
const Color color,
int  width 
)

Renders a line between two points.

Parameters:
pos1 The first point
pos2 The second point
color The color to use
width The width of the line

void ifm::DeviceContextAdapter::draw_polygon ( int  n,
Point  points[],
int  xoffset = 0,
int  yoffset = 0 
)

void ifm::DeviceContextAdapter::draw_rectangle ( const Rect rect  ) 

void ifm::DeviceContextAdapter::draw_text ( const std::string &  text,
const Point pt,
const Font font,
const Color color 
)

Renders the given string at the given position.

void ifm::DeviceContextAdapter::fill_rect ( const Rect rect,
const Color bg,
const Color border 
)

Fills the given rect with the given background and border colors.

ifm::DeviceContextAdapter::operator const DeviceContext & (  )  const

ifm::DeviceContextAdapter::operator DeviceContext & (  ) 

void ifm::DeviceContextAdapter::paint_straight_gradient_box ( const Rect rect,
const Color startColor,
const Color endColor,
bool  vertical = true 
)

Save the current pen and brush

Restore the pen and brush

void ifm::DeviceContextAdapter::set_brush ( const Color color  ) 

void ifm::DeviceContextAdapter::set_pen ( const Color color,
int  width 
)

void ifm::DeviceContextAdapter::set_text_background ( const Color color  ) 

void ifm::DeviceContextAdapter::set_transparent_brush (  ) 


Member Data Documentation


doxygen Get IFM - Interface Management System at SourceForge.net. Fast, secure and Free Open Source software downloads