6 * Portable Windows Library
8 * Copyright (c) 1993-1998 Equivalence Pty. Ltd.
10 * The contents of this file are subject to the Mozilla Public License
11 * Version 1.0 (the "License"); you may not use this file except in
12 * compliance with the License. You may obtain a copy of the License at
13 * http://www.mozilla.org/MPL/
15 * Software distributed under the License is distributed on an "AS IS"
16 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
17 * the License for the specific language governing rights and limitations
20 * The Original Code is Portable Windows Library.
22 * The Initial Developer of the Original Code is Equivalence Pty. Ltd.
24 * Portions are Copyright (C) 1993 Free Software Foundation, Inc.
25 * All Rights Reserved.
27 * Contributor(s): ______________________________________.
30 * Revision 1.11 2001/05/22 12:49:33 robertj
31 * Did some seriously wierd rewrite of platform headers to eliminate the
32 * stupid GNU compiler warning about braces not matching.
34 * Revision 1.10 1999/03/10 03:49:52 robertj
35 * More documentation adjustments.
37 * Revision 1.9 1999/03/09 08:01:49 robertj
38 * Changed comments for doc++ support (more to come).
40 * Revision 1.8 1999/02/16 08:08:46 robertj
41 * MSVC 6.0 compatibility changes.
43 * Revision 1.7 1998/09/23 06:28:02 robertj
44 * Added open source copyright license.
46 * Revision 1.6 1995/06/17 11:12:56 robertj
47 * Documentation update.
49 * Revision 1.5 1995/03/14 12:42:05 robertj
50 * Updated documentation to use HTML codes.
52 * Revision 1.4 1995/01/09 12:39:04 robertj
55 * Revision 1.3 1994/12/12 10:07:08 robertj
56 * Made depth member of PPixels and removed virtual function.
58 * Revision 1.2 1994/12/05 11:34:13 robertj
59 * Major rewrite of images, pictures and pixmaps.
60 * Renamed PPict, PPixels and PImage to make sure all uses are found.
62 * Revision 1.1 1994/10/23 04:52:05 robertj
75 ///////////////////////////////////////////////////////////////////////////////
78 /**A 1 bit per pixel image. This is a non true colour rendition of the image
79 with 1 bit ber pixel allowing 2 colours to be represented. The palette
80 is mandatory with pixel images of this class.
82 class PPixels1
: public PPixelBase
84 PCLASSINFO(PPixels1
, PPixelBase
);
87 /** Create a 1 bit per pixel image. */
89 PDIMENSION dx
, /// Width of image in pixels.
90 PDIMENSION dy
/// Height of image in pixels.
94 /**@name Overrides from class PPixelBase */
95 /**Set the pixel at the location to the specified value. This sets the
96 colour of the pixel to that in the palette at the index position.
98 virtual void SetPixel(
99 PORDINATE x
, /// Horizontal position of pixel in raster.
100 PORDINATE y
, /// Vertical raster line.
101 BYTE value
/// New value for pixel.
104 /**Get the pixel at the location. This returns the index into the palette
105 that the pixel value represents.
108 current value of pixel.
110 virtual BYTE
GetPixel(
111 PORDINATE x
, /// Horizontal position of pixel in raster.
112 PORDINATE y
/// Vertical raster line.
117 /**Set the colours of a raster line in the pixel image. This is the
118 polymorphic form of the \Ref{SetRaster()} functions.
120 virtual void SetRasterValues(
121 PORDINATE x
, /// Horizontal position of start pixel in raster.
122 PORDINATE y
, /// Vertical raster line.
123 const BYTE
* raster
, /// Pointer to array of values for pixels.
124 PDIMENSION width
/// Number of pixels in raster to set.
127 /**Get the colours of a raster line in the pixel image. This is the
128 polymorphic form of the \Ref{GetRaster()} functions.
130 virtual void GetRasterValues(
131 PORDINATE x
, /// Horizontal position of start pixel in raster.
132 PORDINATE y
, /// Vertical raster line.
133 BYTE
* raster
, /// Pointer to array of values for pixels.
134 PDIMENSION width
/// Number of pixels in raster to get.
138 // Include platform dependent part of class
139 #include <pwlib/pixels1.h>
143 // End Of File ///////////////////////////////////////////////////////////////