00001 /* 00002 /-------------------------------------------------------------------- 00003 | 00004 | $Id: plsubbmp_8h-source.html,v 1.2 2004/09/15 15:26:32 uzadow Exp $ 00005 | 00006 | Copyright (c) 1996-2002 Ulrich von Zadow 00007 | 00008 \-------------------------------------------------------------------- 00009 */ 00010 00011 #ifndef INCL_PLSUBBMP 00012 #define INCL_PLSUBBMP 00013 00014 #ifndef INCL_PLBITMAP 00015 #include "plbitmap.h" 00016 #endif 00017 00018 class PLRect; 00019 00020 00021 //! A PLSubBmp is a way to manipulate bitmap data in an application-defined 00022 //! memory region or a rectangular subsection of another PLBmp. All operations 00023 //! on PLBmps that don't change the size or bpp of the image can be performed 00024 //! on a PLSubBmp. A PLSubBmp can be used as source for all filter operations. 00025 //! It doesn't own the pixel data it manipulates, so care must be taken to ensure 00026 //! that the data remains valid as long as the PLSubBmp exists. 00027 class PLSubBmp : public PLBmpBase 00028 { 00029 00030 public: 00031 //! Creates an empty bitmap. 00032 PLSubBmp 00033 (); 00034 00035 //! Destroys the bitmap. 00036 virtual ~PLSubBmp 00037 (); 00038 00039 //! Creates a PLSubBmp as a rectangle in another bitmap. 00040 virtual void Create 00041 ( PLBmpBase & SrcBmp, 00042 const PLRect & SrcRect 00043 ); 00044 00045 //! Creates a PLSubBmp from an arbitrary memory region. Stride 00046 //! is the distance in bytes from one line of the bitmap to the 00047 //! next. 00048 virtual void Create 00049 ( int Width, 00050 int Height, 00051 const PLPixelFormat& pf, 00052 PLBYTE * pBits, 00053 int Stride 00054 ); 00055 00056 private: 00057 00058 // Deletes memory allocated by member variables. 00059 virtual void freeMembers 00060 (); 00061 }; 00062 00063 00064 00065 #endif 00066 /* 00067 /-------------------------------------------------------------------- 00068 | 00069 | $Log: plsubbmp_8h-source.html,v $ 00069 | Revision 1.2 2004/09/15 15:26:32 uzadow 00069 | Linux compatibility changes, doc update. 00069 | 00070 | Revision 1.3 2004/09/09 16:52:49 artcom 00071 | refactored PixelFormat 00072 | 00073 | Revision 1.2 2004/06/19 17:34:27 uzadow 00074 | Documentation update 00075 | 00076 | Revision 1.1 2004/06/15 14:17:11 uzadow 00077 | First working version of PLSubBmp. 00078 | 00079 | 00080 \-------------------------------------------------------------------- 00081 */