fltk/draw.h File Reference

Detailed Description

The FLTK drawing library, used by all widgets to draw themselves.

These functions can only be called when FLTK is setup to draw things. This is only true:


namespace  fltk


class  fltk::GSave


const int * fltk::column_widths_
Font * fltk::current_font_
float fltk::current_size_
const char * fltk::encoding_
void fltk::column_widths (const int *i)
const int * fltk::column_widths ()
void fltk::drawtext (void(*textfunction)(const char *, int, float, float), float(*getwidth)(const char *, int), const char *str, const Rectangle &r, Flags flags)
void fltk::drawtext (const char *, const Rectangle &, Flags)
void fltk::drawtext (const char *, int length, float x, float y)
void fltk::drawtext (const char *, float x, float y)
void fltk::drawtext_transformed (const char *, int n, float x, float y)
const char * fltk::get_encoding ()
float fltk::getascent ()
float fltk::getdescent ()
Font * fltk::getfont ()
float fltk::getsize ()
float fltk::getwidth (const char *, int length)
float fltk::getwidth (const char *)
void fltk::measure (float(*getwidth)(const char *, int), const char *, float &w, float &h, Flags=0)
void fltk::measure (const char *, int &w, int &h, Flags=0)
void fltk::set_encoding (const char *)
void fltk::setfont (const char *, int attributes, float size)
void fltk::setfont (const char *, float size)
void fltk::setfont (Font *, float size)


typedef const uchar *(* fltk::DrawImageCallback )(void *data, int x, int y, int w, uchar *buffer)
void fltk::drawimage (DrawImageCallback, void *, PixelType, const Rectangle &)
void fltk::drawimage (const uchar *, PixelType, const Rectangle &, int linedelta)
void fltk::drawimage (const uchar *, PixelType, const Rectangle &)
uchar * fltk::readimage (uchar *p, PixelType, const Rectangle &, int linedelta)
uchar * fltk::readimage (uchar *p, PixelType, const Rectangle &)
void fltk::scrollrect (const Rectangle &, int dx, int dy, void(*draw_area)(void *, const Rectangle &), void *)


enum  {


Flags fltk::drawflags (Flags f)
Flags fltk::drawflags ()
const Style * fltk::drawstyle ()
void fltk::drawstyle (const Style *s, Flags)
Color fltk::getbgcolor ()
Color fltk::getcolor ()
const char * fltk::line_dashes ()
int fltk::line_style ()
void fltk::line_style (int, float width=0, const char *dashes=0)
float fltk::line_width ()
void fltk::setbgcolor (Color c)
void fltk::setcolor (Color)
void fltk::setcolor_alpha (Color, float alpha)
void fltk::setdrawflags (Flags f)
Path construction
void fltk::addarc (float x, float y, float w, float h, float a1, float a2)
void fltk::addchord (const Rectangle &r, float a, float a2)
void fltk::addcurve (float, float, float, float, float, float, float, float)
void fltk::addpie (const Rectangle &r, float a, float a2)
void fltk::addvertex (int x, int y)
void fltk::addvertex (float x, float y)
void fltk::addvertices (int n, const int v[][2])
void fltk::addvertices (int n, const float v[][2])
void fltk::addvertices_transformed (int n, const float v[][2])
void fltk::closepath ()
void fltk::newpath ()
void fltk::clipout (const Rectangle &)
int fltk::intersect_with_clip (Rectangle &)
bool fltk::not_clipped (const Rectangle &)
void fltk::pop_clip ()
void fltk::push_clip (int X, int Y, int W, int H)
 Same as push_clip(Rectangle(x,y,w,h)) but faster:.
void fltk::push_clip (const Rectangle &)
void fltk::push_no_clip ()
void fltk::concat (float, float, float, float, float, float)
void fltk::load_identity ()
void fltk::pop_matrix ()
void fltk::push_matrix ()
void fltk::rotate (float d)
void fltk::scale (float x)
void fltk::scale (float x, float y)
void fltk::transform (int &x, int &y, int &w, int &h)
void fltk::transform (const Rectangle &from, Rectangle &to)
void fltk::transform (int &x, int &y)
void fltk::transform (float &x, float &y)
void fltk::transform_distance (float &x, float &y)
void fltk::translate (int x, int y)
void fltk::translate (float x, float y)
Shapes and lines
void fltk::drawline (float x0, float y0, float x1, float y1)
void fltk::drawline (int x0, int y0, int x1, int y1)
void fltk::drawpoint (float x, float y)
void fltk::drawpoint (int x, int y)
void fltk::fillpath ()
void fltk::fillrect (const Rectangle &r)
void fltk::fillrect (int, int, int, int)
void fltk::fillstrokepath (Color)
void fltk::strokepath ()
void fltk::strokerect (const Rectangle &r)
void fltk::strokerect (int, int, int, int)


Color fltk::current_bgcolor_
Color fltk::current_color_
Flags fltk::drawflags_
const Stylefltk::drawstyle_
const char * fltk::line_dashes_
int fltk::line_style_
float fltk::line_width_

Wed Sep 10 02:47:46 2008. FLTK ©2007 Bill Spitzak and others.
Permission is granted to reproduce this manual or any portion for any purpose, provided this copyright and permission notice are preserved.