|
|
| version 1.7, 2001/04/26 14:55:17 | version 1.14, 2001/09/26 10:32:25 |
|---|---|
| Line 1 | Line 1 |
| /** @file | /** @file |
| Parser: image manipulations decls. | Parser: image manipulations decls. |
| Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) | |
| Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf) | Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf) |
| $Id$ | $Id$ |
| based on: | based on: |
| gd.h: declarations file for the gifdraw module. | gd.h: declarations file for the gifdraw module. |
| Line 29 | Line 29 |
| #define gdMaxColors 0x100 | #define gdMaxColors 0x100 |
| #define HSIZE 5003 /* 80% occupancy */ | #define HSIZE 5003 /* 80% occupancy */ |
| /* For backwards compatibility only. Use gdImageSetStyle() for MUCH more flexible line drawing. Also see gdImageSetBrush(). */ | |
| #define gdDashSize 4 | |
| /** Image type. | /** Image type. |
| See functions below; you will not need to change | See functions below; you will not need to change |
| the elements directly. Use the provided macros to | the elements directly. Use the provided macros to |
| Line 51 public: | Line 47 public: |
| void SetPixel(int x, int y, int color); | void SetPixel(int x, int y, int color); |
| int GetPixel(int x, int y); | int GetPixel(int x, int y); |
| void Line(int x1, int y1, int x2, int y2, int color); | void Line(int x1, int y1, int x2, int y2, int color); |
| void DashedLine(int x1, int y1, int x2, int y2, int color); | void StyledLine(int x1, int y1, int x2, int y2, int color, const char *lineStyle); |
| void Rectangle(int x1, int y1, int x2, int y2, int color); | void Rectangle(int x1, int y1, int x2, int y2, int color); |
| void LineReplaceColor(int x1, int y1, int x2, int y2, int a, int b); | void LineReplaceColor(int x1, int y1, int x2, int y2, int a, int b); |
| void FilledRectangle(int x1, int y1, int x2, int y2, int color); | void FilledRectangle(int x1, int y1, int x2, int y2, int color); |
| Line 62 public: | Line 58 public: |
| int x, y; | int x, y; |
| }; | }; |
| void Polygon(Point *p, int n, int c); | void Polygon(Point *p, int n, int c, bool closed=true); |
| void FilledPolygon(Point *p, int n, int c); | void FilledPolygon(Point *p, int n, int c); |
| void FilledPolygonReplaceColor(Point *p, int n, int a, int b); | void FilledPolygonReplaceColor(Point *p, int n, int a, int b); |
| Line 83 public: | Line 79 public: |
| void Fill(int x, int y, int color); | void Fill(int x, int y, int color); |
| void Copy(gdImage& dst, int dstX, int dstY, int srcX, int srcY, int w, int h); | void Copy(gdImage& dst, int dstX, int dstY, int srcX, int srcY, int w, int h); |
| void CopyResized(gdImage& dst, int dstX, int dstY, int srcX, int srcY, int dstW, int dstH, int srcW, int srcH); | void CopyResized(gdImage& dst, int dstX, int dstY, int srcX, int srcY, int dstW, int dstH, int srcW, int srcH); |
| void SetStyle(int width); | void SetLineWidth(int width); |
| void SetLineStyle(const char *aLineStyle); | |
| void SetInterlace(int interlaceArg); /* On or off(1 or 0) */ | void SetInterlace(int interlaceArg); /* On or off(1 or 0) */ |
| public: | public: |
| Line 113 private: | Line 110 private: |
| int transparent; | int transparent; |
| int *polyInts; | int *polyInts; |
| int polyAllocated; | int polyAllocated; |
| int styleWidth; | int lineWidth; const char *lineStyle; |
| int interlace; | int interlace; |
| private: // read gif | private: // read gif |
| Line 146 private: | Line 143 private: |
| /// a code_int must be able to hold 2**GIFBITS values of type int, and also -1 | /// a code_int must be able to hold 2**GIFBITS values of type int, and also -1 |
| typedef int code_int; | typedef int code_int; |
| #ifdef SIGNED_COMPARE_SLOW | #ifdef SIGNED_COMPARE_SLOW |
| typedef unsigned long int count_int; | typedef unsigned long int count_int; |
| typedef unsigned short int count_short; | typedef unsigned short int count_short; |
| #else /*SIGNED_COMPARE_SLOW*/ | #else |
| typedef long int count_int; | typedef long int count_int; |
| #endif /*SIGNED_COMPARE_SLOW*/ | #endif |
| private: | private: |