pixels1.h
上传用户:hzhsqp
上传日期:2007-01-06
资源大小:1600k
文件大小:4k
- /*
- * pixels1.h
- *
- * 1 bit pixel image.
- *
- * Portable Windows Library
- *
- * Copyright (c) 1993-1998 Equivalence Pty. Ltd.
- *
- * The contents of this file are subject to the Mozilla Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- * the License for the specific language governing rights and limitations
- * under the License.
- *
- * The Original Code is Portable Windows Library.
- *
- * The Initial Developer of the Original Code is Equivalence Pty. Ltd.
- *
- * Portions are Copyright (C) 1993 Free Software Foundation, Inc.
- * All Rights Reserved.
- *
- * Contributor(s): ______________________________________.
- *
- * $Log: pixels1.h,v $
- * Revision 1.10 1999/03/10 03:49:52 robertj
- * More documentation adjustments.
- *
- * Revision 1.9 1999/03/09 08:01:49 robertj
- * Changed comments for doc++ support (more to come).
- *
- * Revision 1.8 1999/02/16 08:08:46 robertj
- * MSVC 6.0 compatibility changes.
- *
- * Revision 1.7 1998/09/23 06:28:02 robertj
- * Added open source copyright license.
- *
- * Revision 1.6 1995/06/17 11:12:56 robertj
- * Documentation update.
- *
- * Revision 1.5 1995/03/14 12:42:05 robertj
- * Updated documentation to use HTML codes.
- *
- * Revision 1.4 1995/01/09 12:39:04 robertj
- * Documentation.
- *
- * Revision 1.3 1994/12/12 10:07:08 robertj
- * Made depth member of PPixels and removed virtual function.
- *
- * Revision 1.2 1994/12/05 11:34:13 robertj
- * Major rewrite of images, pictures and pixmaps.
- * Renamed PPict, PPixels and PImage to make sure all uses are found.
- *
- * Revision 1.1 1994/10/23 04:52:05 robertj
- * Initial revision
- *
- */
- #define _PPIXELS1
- #ifdef __GNUC__
- #pragma interface
- #endif
- ///////////////////////////////////////////////////////////////////////////////
- // PPixels1
- /**A 1 bit per pixel image. This is a non true colour rendition of the image
- with 1 bit ber pixel allowing 2 colours to be represented. The palette
- is mandatory with pixel images of this class.
- */
- class PPixels1 : public PPixelBase
- {
- PCLASSINFO(PPixels1, PPixelBase);
- public:
- /** Create a 1 bit per pixel image. */
- PPixels1(
- PDIMENSION dx, /// Width of image in pixels.
- PDIMENSION dy /// Height of image in pixels.
- );
- /**@name Overrides from class PPixelBase */
- /**Set the pixel at the location to the specified value. This sets the
- colour of the pixel to that in the palette at the index position.
- */
- virtual void SetPixel(
- PORDINATE x, /// Horizontal position of pixel in raster.
- PORDINATE y, /// Vertical raster line.
- BYTE value /// New value for pixel.
- );
- /**Get the pixel at the location. This returns the index into the palette
- that the pixel value represents.
-
- @return
- current value of pixel.
- */
- virtual BYTE GetPixel(
- PORDINATE x, /// Horizontal position of pixel in raster.
- PORDINATE y /// Vertical raster line.
- ) const;
- protected:
- /**Set the colours of a raster line in the pixel image. This is the
- polymorphic form of the Ref{SetRaster()} functions.
- */
- virtual void SetRasterValues(
- PORDINATE x, /// Horizontal position of start pixel in raster.
- PORDINATE y, /// Vertical raster line.
- const BYTE * raster, /// Pointer to array of values for pixels.
- PDIMENSION width /// Number of pixels in raster to set.
- );
- /**Get the colours of a raster line in the pixel image. This is the
- polymorphic form of the Ref{GetRaster()} functions.
- */
- virtual void GetRasterValues(
- PORDINATE x, /// Horizontal position of start pixel in raster.
- PORDINATE y, /// Vertical raster line.
- BYTE * raster, /// Pointer to array of values for pixels.
- PDIMENSION width /// Number of pixels in raster to get.
- ) const;
- #ifdef DOC_PLUS_PLUS
- };
- #endif
- // Class declaration continued in platform specific header file ///////////////