FbPixmap is a FbDrawable
fluxgen fluxgen
2 files changed,
5 insertions(+),
56 deletions(-)
M
src/FbTk/FbPixmap.cc
→
src/FbTk/FbPixmap.cc
@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// 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"@@ -60,48 +60,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) {@@ -207,7 +165,6 @@ XSetForeground(dpy, gc, XGetPixel(src_image,
static_cast<int>(src_x), static_cast<int>(src_y))); XDrawPoint(dpy, new_pm.drawable(), gc, tx, ty); - } }
M
src/FbTk/FbPixmap.hh
→
src/FbTk/FbPixmap.hh
@@ -19,17 +19,19 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// 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 @@ int depth);
~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);