1/***********************************************************************
2 *                                                                     *
3 * $Id: hpgsimage.h 270 2006-01-29 21:12:23Z softadm $
4 *                                                                     *
5 * hpgs - HPGl Script, a hpgl/2 interpreter, which uses a Postscript   *
6 *        API for rendering a scene and thus renders to a variety of   *
7 *        devices and fileformats.                                     *
8 *                                                                     *
9 * (C) 2004-2006 ev-i Informationstechnologie GmbH  http://www.ev-i.at *
10 *                                                                     *
11 * Author: Wolfgang Glas                                               *
12 *                                                                     *
13 *  hpgs is free software; you can redistribute it and/or              *
14 * modify it under the terms of the GNU Lesser General Public          *
15 * License as published by the Free Software Foundation; either        *
16 * version 2.1 of the License, or (at your option) any later version.  *
17 *                                                                     *
18 * hpgs is distributed in the hope that it will be useful,             *
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of      *
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU   *
21 * Lesser General Public License for more details.                     *
22 *                                                                     *
23 * You should have received a copy of the GNU Lesser General Public    *
24 * License along with this library; if not, write to the               *
25 * Free Software  Foundation, Inc., 59 Temple Place, Suite 330,        *
26 * Boston, MA  02111-1307  USA                                         *
27 *                                                                     *
28 ***********************************************************************
29 *                                                                     *
30 * Private declarations for images.                                    *
31 *                                                                     *
32 ***********************************************************************/
33
34#ifndef __HPGS_IMAGE_H__
35#define __HPGS_IMAGE_H__
36
37#include <hpgs.h>
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43/*! \brief An concrete pixel image.
44
45    This structure has a public alias \c hpgs_png_image and
46    implements \c hpgs_image. The storage format is similar
47    to the format used by \c libpng, so the image may be written
48    to png file using \c hpgs_png_image_write.
49*/
50
51/*! @addtogroup image
52 *  @{
53 */
54struct hpgs_png_image_st {
55  hpgs_image inherited;
56
57  int depth;         //!< The bit depth of the image.
58  int color_type;    //!< The color type.
59  int bytes_per_row; //!< The number of bytes per row of the pixel data.
60  int compression;   //!< The compression used for writing the image in the range from 0 to 9.
61
62  unsigned char *data; //!< The pixel data.
63
64  hpgs_rop3_func_t rop3; //!< The ROP3 raster operation.
65  hpgs_palette_color pattern_color; //!< The color of the ROP3 pattern.
66
67  unsigned res_x; //!< The number of pixels per meter in x-direction, or 0 if unknown.
68  unsigned res_y; //!< The number of pixels per meter in y-direction, or 0 if unknown.
69};
70
71/*! @} */ /* end of group reader */
72
73#ifdef __cplusplus
74} // end of extern "C"
75#endif
76
77#endif // ! __HPGS_IMAGE_H__
78