1 /******************************************************************************
3 * $Id: image.h,v 1.7 2001/03/19 19:27:40 root Exp $
6 * Copyright (C) 1997-2012 by Dimitri van Heesch.
8 * Permission to use, copy, modify, and distribute this software and its
9 * documentation under the terms of the GNU General Public License is hereby
10 * granted. No representations are made about the suitability of this software
11 * for any purpose. It is provided "as is" without express or implied warranty.
12 * See the GNU General Public License for more details.
14 * Documents produced by Doxygen are derivative works derived from the
15 * input used in their production; they are not affected by this license.
23 /** Class representing a bitmap image generated by doxygen. */
30 void setPixel(int x,int y,uchar val);
31 uchar getPixel(int x,int y) const;
32 void writeChar(int x,int y,char c,uchar fg);
33 void writeString(int x,int y,const char *s,uchar fg);
34 void drawHorzLine(int y,int xs,int xe,uchar colIndex,uint mask);
35 void drawHorzArrow(int y,int xs,int xe,uchar colIndex,uint mask);
36 void drawVertLine(int x,int ys,int ye,uchar colIndex,uint mask);
37 void drawVertArrow(int x,int ys,int ye,uchar colIndex,uint mask);
38 void drawRect(int x,int y,int width,int height,uchar colIndex,uint mask);
39 void fillRect(int x,int y,int width,int height,uchar colIndex,uint mask);
40 bool save(const char *fileName,int mode=0);
41 friend uint stringLength(const char *s);
42 uint getWidth() const { return width; }
43 uint getHeight() const { return height; }
44 uchar *getData() const { return data; }
45 static uint stringLength(const char *s);
53 /** Class representing a bitmap image colored based on hue/sat/gamma settings. */
57 ColoredImage(int width,int height,
58 const uchar *greyLevels,const uchar *alphaLevels,
59 int saturation,int hue,int gamma);
61 bool save(const char *fileName);
62 static void hsl2rgb(double h,double s,double l,
63 double *pRed,double *pGreen,double *pBlue);