#line 1 "/user/cvsspst/ees1cg/RAVL/RAVL-0.7/GUI/GTK/Bitmap.hh" // This file is part of RAVL, Recognition And Vision Library // Copyright (C) 2001, University of Surrey // This code may be redistributed under the terms of the GNU Lesser // General Public License (LGPL). See the lgpl.licence file for details or // see http://www.gnu.org/copyleft/lesser.html // file-header-ends-here #ifndef RAVLGUIBITMAP_HEADER #define RAVLGUIBITMAP_HEADER 1 //////////////////////////////////////////////// //! rcsid="$Id: Bitmap.hh,v 1.3 2001/07/11 11:49:08 craftit Exp $" //! file="Ravl/GUI/GTK/Bitmap.hh" //! lib=RavlGUI //! docentry="Ravl.GUI.Layout" //! author="Charles Galambos" //! date="17/08/2000" #include "Ravl/GUI/Widget.hh" namespace RavlGUIN { //! userlevel=Develop //: Bitmap body. class BitmapBodyC : public RCBodyC { public: BitmapBodyC(int width,int height); //: Create a bit map of the given size. ~BitmapBodyC(); //: Destructor. GdkBitmap &Bitmap() { return *bmp; } //: access bitmap. void Clear(); //: Clear the bitmap. protected: int width,height; GdkBitmap *bmp; }; //! userlevel=Normal //: Bitmap. // Hold a binary image. often used as a mask. class BitmapC : public RCHandleC { public: BitmapC() {} //: Default constructor. // creates an invalid handle. BitmapC(int width,int height) : RCHandleC(*new BitmapBodyC(width,height)) {} //: Create a bit map of the given size. GdkBitmap &Bitmap() { return Body().Bitmap(); } //: access bitmap. void Clear() { Body().Clear(); } //: Clear the bitmap. }; } #endif