#include <surface.hh>
Collaboration diagram for otk::Surface:
Public Methods | |
Surface (int screen, const Point &size) | |
virtual | ~Surface () |
int | screen (void) const |
virtual const Point & | size () const |
virtual int | width () const |
virtual int | height () const |
virtual Pixmap | pixmap () const |
Protected Methods | |
void | createObjects () |
void | destroyObjects () |
void | setPixmap (XImage *image) |
void | setPixmap (const RenderColor &color) |
Private Attributes | |
int | _screen |
Point | _size |
Pixmap | _pixmap |
XftDraw * | _xftdraw |
Friends | |
class | RenderControl |
class | TrueRenderControl |
class | PseudoRenderControl |
|
Definition at line 18 of file surface.cc.
|
|
Definition at line 26 of file surface.cc. References destroyObjects().
00027 { 00028 destroyObjects(); 00029 } |
|
Definition at line 52 of file surface.cc. References _pixmap, _size, _xftdraw, otk::ScreenInfo::colormap(), otk::ScreenInfo::depth(), otk::display, otk::ScreenInfo::rootWindow(), otk::Display::screenInfo(), otk::ScreenInfo::visual(), otk::Point::x(), and otk::Point::y(). Referenced by setPixmap().
00053 { 00054 assert(_pixmap == None); assert(!_xftdraw); 00055 00056 const ScreenInfo *info = display->screenInfo(_screen); 00057 00058 _pixmap = XCreatePixmap(**display, info->rootWindow(), 00059 _size.x(), _size.y(), info->depth()); 00060 assert(_pixmap != None); 00061 00062 _xftdraw = XftDrawCreate(**display, _pixmap, 00063 info->visual(), info->colormap()); 00064 assert(_xftdraw); 00065 } |
|
Definition at line 67 of file surface.cc. References _pixmap, and _xftdraw. Referenced by ~Surface().
|
|
Definition at line 41 of file surface.hh. References otk::Point::y(). Referenced by otk::TrueRenderControl::crossDiagonalGradient(), otk::TrueRenderControl::diagonalGradient(), otk::TrueRenderControl::drawGradientBackground(), otk::RenderControl::drawSolidBackground(), and otk::TrueRenderControl::verticalGradient().
00041 { return _size.y(); } |
|
Definition at line 43 of file surface.hh. Referenced by otk::RenderControl::drawSolidBackground(), and otk::Widget::render().
00043 { return _pixmap; } |
|
Definition at line 37 of file surface.hh.
00037 { return _screen; } |
|
Definition at line 31 of file surface.cc. References _pixmap, _size, createObjects(), otk::RenderColor::gc(), otk::Point::x(), and otk::Point::y().
00032 { 00033 if (_pixmap == None) 00034 createObjects(); 00035 00036 XFillRectangle(**display, _pixmap, color.gc(), 0, 0, 00037 _size.x(), _size.y()); 00038 } |
|
Definition at line 40 of file surface.cc. References _pixmap, _size, createObjects(), otk::Point::x(), and otk::Point::y(). Referenced by otk::TrueRenderControl::drawGradientBackground(), and otk::RenderControl::drawSolidBackground().
|
|
Definition at line 39 of file surface.hh.
00039 { return _size; } |
|
Definition at line 40 of file surface.hh. References otk::Point::x(). Referenced by otk::TrueRenderControl::crossDiagonalGradient(), otk::TrueRenderControl::diagonalGradient(), otk::TrueRenderControl::drawGradientBackground(), otk::RenderControl::drawSolidBackground(), and otk::TrueRenderControl::verticalGradient().
00040 { return _size.x(); } |
|
Definition at line 49 of file surface.hh. |
|
Definition at line 47 of file surface.hh. |
|
Definition at line 48 of file surface.hh. |
|
Definition at line 23 of file surface.hh. Referenced by createObjects(), destroyObjects(), and setPixmap(). |
|
Definition at line 21 of file surface.hh. Referenced by otk::TrueRenderControl::drawBackground(), otk::PseudoRenderControl::drawBackground(), otk::RenderControl::drawSolidBackground(), and otk::RenderControl::drawString(). |
|
Definition at line 22 of file surface.hh. Referenced by createObjects(), and setPixmap(). |
|
Definition at line 24 of file surface.hh. Referenced by createObjects(), destroyObjects(), and otk::RenderControl::drawString(). |