Class diagram for Graphics:
Public Members | |||
Graphics () | |||
default constructor. | |||
bool | lock () | ||
EVERY GRAPHICAL OP LOCKS THE BView's LOOPER, WHICH IS A MAIN BOTTLENECK THAT WE SHOULD ADDRESS... More... | |||
void | unlock () | ||
void | init ( KWnd* pWnd, rgb_color cfg, rgb_color cbg, BFont* fnt) | ||
called by graInitGraphics, Graphics must already be locked. | |||
void | restoreBrush () | ||
void | selectNullBrush () | ||
void | restorePen () | ||
void | selectNullPen () | ||
void | setFont ( BFont * fnt) | ||
void | setXORMode ( rgb_color xorClr) | ||
void | setPaintMode () | ||
bool | setBackground ( rgb_color irgb) | ||
bool | setForeground ( rgb_color irgb) | ||
bool | fillRect ( int x, int y, int w, int h, rgb_color clr) | ||
void | drawRect ( int x, int y, int w, int h ) | ||
void | drawLine ( int x1, int y1, int x2, int y2) | ||
void | drawText ( int x, int y, TCHAR* txt, int len) | ||
void | translate ( int x, int y) | ||
void | cleanUp () | ||
void | setClip ( int x, int y, int w, int h, bool set) | ||
UNIMPLEMENTED. | |||
BRegion | oldreg | ||
BRegion | newreg | ||
KWnd* | wnd | ||
BPoint | cliOff | ||
char | xor | ||
rgb_color | xclr | ||
int | x0 | ||
int | y0 |
Unlike KWnd and friends, this class inherits directly from BView. Doing this we don't need an additional indirection on every call to the drawing functions.
See gra.cpp for the complete list of drawing functions.
Graphics::Graphics () |
default constructor.
bool Graphics::lock () [inline]
|
EVERY GRAPHICAL OP LOCKS THE BView's LOOPER, WHICH IS A MAIN BOTTLENECK THAT WE SHOULD ADDRESS...
IMPROVEMENTS: Work to improve the graphics throughput: - a better locking scheme, with a superLock/superUnlock pair wrapping complete paint operations - asynchronous calls to the Toolkit (protecting the shared Toolkit data), in most graphics ops we are thread-safe on our own, so we don't need synchronized calls everywhere
void Graphics::unlock () [inline]
|
void Graphics::init (KWnd * pWnd, rgb_color cfg, rgb_color cbg, BFont * fnt) [inline]
|
called by graInitGraphics, Graphics must already be locked.
void Graphics::restoreBrush () [inline]
|
void Graphics::selectNullBrush () [inline]
|
void Graphics::restorePen () [inline]
|
void Graphics::selectNullPen () [inline]
|
void Graphics::setFont (BFont * fnt) [inline]
|
void Graphics::setXORMode (rgb_color xorClr) [inline]
|
void Graphics::setPaintMode () [inline]
|
bool Graphics::setBackground (rgb_color irgb) [inline]
|
bool Graphics::setForeground (rgb_color irgb) [inline]
|
bool Graphics::fillRect (int x, int y, int w, int h, rgb_color clr) [inline]
|
void Graphics::drawRect (int x, int y, int w, int h) [inline]
|
void Graphics::drawLine (int x1, int y1, int x2, int y2) [inline]
|
void Graphics::drawText (int x, int y, TCHAR * txt, int len) [inline]
|
void Graphics::translate (int x, int y) [inline]
|
void Graphics::cleanUp () [inline]
|
void Graphics::setClip (int x, int y, int w, int h, bool set) [inline]
|
UNIMPLEMENTED.
BRegion Graphics::oldreg |
BRegion Graphics::newreg |
KWnd* Graphics::wnd |
BPoint Graphics::cliOff |
char Graphics::xor |
rgb_color Graphics::xclr |
int Graphics::x0 |
int Graphics::y0 |