From f589d55aa90cf347da75ba39922b9d14f8621cfb Mon Sep 17 00:00:00 2001 From: fluxgen <fluxgen> Date: Tue, 29 Apr 2003 08:53:24 +0000 Subject: FbPixmap is a FbDrawable --- src/FbTk/FbPixmap.cc | 45 +-------------------------------------------- src/FbTk/FbPixmap.hh | 16 ++++------------ 2 files changed, 5 insertions(+), 56 deletions(-) diff --git a/src/FbTk/FbPixmap.cc b/src/FbTk/FbPixmap.cc index c627779..a05e287 100644 --- a/src/FbTk/FbPixmap.cc +++ b/src/FbTk/FbPixmap.cc @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbPixmap.cc,v 1.3 2003/04/27 23:56:13 fluxgen Exp $ +// $Id: FbPixmap.cc,v 1.4 2003/04/29 08:53:24 fluxgen Exp $ #include "FbPixmap.hh" #include "App.hh" @@ -62,48 +62,6 @@ FbPixmap::~FbPixmap() { free(); } -void FbPixmap::copyArea(Drawable src, GC gc, - int src_x, int src_y, - int dest_x, int dest_y, - unsigned int width, unsigned int height) { - if (m_pm == 0 || src == 0 || gc == 0) - return; - XCopyArea(FbTk::App::instance()->display(), - src, m_pm, gc, - src_x, src_y, - width, height, - dest_x, dest_y); -} - -void FbPixmap::fillRectangle(GC gc, int x, int y, - unsigned int width, unsigned int height) { - if (m_pm == 0 || gc == 0) - return; - XFillRectangle(FbTk::App::instance()->display(), - m_pm, gc, - x, y, - width, height); -} - -void FbPixmap::drawRectangle(GC gc, int x, int y, - unsigned int width, unsigned int height) { - if (m_pm == 0 || gc == 0) - return; - XDrawRectangle(FbTk::App::instance()->display(), - m_pm, gc, - x, y, - width, height); -} - -void FbPixmap::fillPolygon(GC gc, XPoint *points, int npoints, - int shape, int mode) { - if (m_pm == 0 || gc == 0 || points == 0 || npoints == 0) - return; - XFillPolygon(FbTk::App::instance()->display(), - m_pm, gc, points, npoints, - shape, mode); -} - FbPixmap &FbPixmap::operator = (const FbPixmap &the_copy) { copy(the_copy); return *this; @@ -207,7 +165,6 @@ void FbPixmap::scale(unsigned int dest_width, unsigned int dest_height) { static_cast<int>(src_x), static_cast<int>(src_y))); XDrawPoint(dpy, new_pm.drawable(), gc, tx, ty); - } } diff --git a/src/FbTk/FbPixmap.hh b/src/FbTk/FbPixmap.hh index 487854a..94d37de 100644 --- a/src/FbTk/FbPixmap.hh +++ b/src/FbTk/FbPixmap.hh @@ -19,17 +19,19 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbPixmap.hh,v 1.3 2003/04/27 23:55:08 fluxgen Exp $ +// $Id: FbPixmap.hh,v 1.4 2003/04/29 08:52:51 fluxgen Exp $ #ifndef FBTK_FBPIXMAP_HH #define FBTK_FBPIXMAP_HH +#include "FbDrawable.hh" + #include <X11/Xlib.h> namespace FbTk { /// a wrapper for X Pixmap -class FbPixmap { +class FbPixmap:public FbDrawable { public: FbPixmap(); /// copy pixmap @@ -42,16 +44,6 @@ public: ~FbPixmap(); - void copyArea(Drawable src, GC gc, - int src_x, int src_y, - int dest_x, int dest_y, - unsigned int width, unsigned int height); - void fillRectangle(GC gc, int x, int y, - unsigned int width, unsigned int height); - void drawRectangle(GC gc, int x, int y, - unsigned int width, unsigned int height); - void fillPolygon(GC gc, XPoint *points, int npoints, - int shape, int mode); void copy(const FbPixmap &the_copy); /// scales the pixmap to specified size void scale(unsigned int width, unsigned int height); -- cgit v0.11.2