Main Page   Class Hierarchy   Compound List   File List   Header Files   Compound Members   File Members  

Graphics Class Reference

The native part of a Java Graphics object. More...

Class diagram for Graphics:

BView

List of all members.


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
KWndwnd
BPoint cliOff
char xor
rgb_color xclr
int x0
int y0

Detailed Description

The native part of a Java Graphics object.

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.


Member Function Documentation

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.


Member Data Documentation

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


The documentation for this class was generated from the following file:
Generated at Sat Jun 10 12:37:09 2000 by doxygen 1.0.0 written by Dimitri van Heesch, © 1997-1999