Annotation of embedaddon/php/ext/gd/php_gd.h, revision 1.1.1.3
1.1 misho 1: /*
2: +----------------------------------------------------------------------+
3: | PHP Version 5 |
4: +----------------------------------------------------------------------+
1.1.1.3 ! misho 5: | Copyright (c) 1997-2013 The PHP Group |
1.1 misho 6: +----------------------------------------------------------------------+
7: | This source file is subject to version 3.01 of the PHP license, |
8: | that is bundled with this package in the file LICENSE, and is |
9: | available through the world-wide-web at the following url: |
10: | http://www.php.net/license/3_01.txt |
11: | If you did not receive a copy of the PHP license and are unable to |
12: | obtain it through the world-wide-web, please send a note to |
13: | license@php.net so we can mail you a copy immediately. |
14: +----------------------------------------------------------------------+
15: | Authors: Rasmus Lerdorf <rasmus@php.net> |
16: | Stig Bakken <ssb@php.net> |
17: +----------------------------------------------------------------------+
18: */
19:
1.1.1.2 misho 20: /* $Id$ */
1.1 misho 21:
22: #ifndef PHP_GD_H
23: #define PHP_GD_H
24:
25: #define HAVE_GDIMAGECREATEFROMPNG 1
26:
27: #if HAVE_LIBFREETYPE
28: # ifndef ENABLE_GD_TTF
29: # define ENABLE_GD_TTF
30: # endif
31: #endif
32:
33: #if HAVE_LIBGD
34:
35: /* open_basedir and safe_mode checks */
1.1.1.2 misho 36: #define PHP_GD_CHECK_OPEN_BASEDIR(filename, errormsg) \
37: if (!filename || php_check_open_basedir(filename TSRMLS_CC)) { \
38: php_error_docref(NULL TSRMLS_CC, E_WARNING, errormsg); \
39: RETURN_FALSE; \
1.1 misho 40: }
41:
42: #define PHP_GDIMG_TYPE_GIF 1
43: #define PHP_GDIMG_TYPE_PNG 2
44: #define PHP_GDIMG_TYPE_JPG 3
45: #define PHP_GDIMG_TYPE_WBM 4
46: #define PHP_GDIMG_TYPE_XBM 5
47: #define PHP_GDIMG_TYPE_XPM 6
48: #define PHP_GDIMG_CONVERT_WBM 7
49: #define PHP_GDIMG_TYPE_GD 8
50: #define PHP_GDIMG_TYPE_GD2 9
1.1.1.2 misho 51: #define PHP_GDIMG_TYPE_GD2PART 10
52: #define PHP_GDIMG_TYPE_WEBP 11
1.1 misho 53:
54: #ifdef PHP_WIN32
55: # define PHP_GD_API __declspec(dllexport)
56: #elif defined(__GNUC__) && __GNUC__ >= 4
57: # define PHP_GD_API __attribute__ ((visibility("default")))
58: #else
59: # define PHP_GD_API
60: #endif
61:
62: PHPAPI extern const char php_sig_gif[3];
63: PHPAPI extern const char php_sig_jpg[3];
64: PHPAPI extern const char php_sig_png[3];
65:
66: extern zend_module_entry gd_module_entry;
67: #define phpext_gd_ptr &gd_module_entry
68:
69: /* gd.c functions */
70: PHP_MINFO_FUNCTION(gd);
71: PHP_MINIT_FUNCTION(gd);
72: #if HAVE_LIBT1 || HAVE_GD_FONTMUTEX
73: PHP_MSHUTDOWN_FUNCTION(gd);
74: #endif
75: #if HAVE_GD_STRINGFT
76: PHP_RSHUTDOWN_FUNCTION(gd);
77: #endif
78:
79: PHP_FUNCTION(gd_info);
80: PHP_FUNCTION(imagearc);
81: PHP_FUNCTION(imageellipse);
82: PHP_FUNCTION(imagechar);
83: PHP_FUNCTION(imagecharup);
84: PHP_FUNCTION(imageistruecolor);
85: PHP_FUNCTION(imagecolorallocate);
86: PHP_FUNCTION(imagepalettecopy);
87: PHP_FUNCTION(imagecolorat);
88: PHP_FUNCTION(imagecolorclosest);
89: PHP_FUNCTION(imagecolorclosesthwb);
90: PHP_FUNCTION(imagecolordeallocate);
91: PHP_FUNCTION(imagecolorresolve);
92: PHP_FUNCTION(imagecolorexact);
93: PHP_FUNCTION(imagecolorset);
94: PHP_FUNCTION(imagecolorstotal);
95: PHP_FUNCTION(imagecolorsforindex);
96: PHP_FUNCTION(imagecolortransparent);
97: PHP_FUNCTION(imagecopy);
98: PHP_FUNCTION(imagecopymerge);
99: PHP_FUNCTION(imagecopyresized);
100: PHP_FUNCTION(imagetypes);
101: PHP_FUNCTION(imagecreate);
102: PHP_FUNCTION(imageftbbox);
103: PHP_FUNCTION(imagefttext);
104:
105: PHP_FUNCTION(imagecreatetruecolor);
106: PHP_FUNCTION(imagetruecolortopalette);
107: PHP_FUNCTION(imagesetthickness);
108: PHP_FUNCTION(imagefilledellipse);
109: PHP_FUNCTION(imagefilledarc);
110: PHP_FUNCTION(imagealphablending);
111: PHP_FUNCTION(imagesavealpha);
112: PHP_FUNCTION(imagecolorallocatealpha);
113: PHP_FUNCTION(imagecolorresolvealpha);
114: PHP_FUNCTION(imagecolorclosestalpha);
115: PHP_FUNCTION(imagecolorexactalpha);
116: PHP_FUNCTION(imagecopyresampled);
117:
118: #ifdef PHP_WIN32
119: PHP_FUNCTION(imagegrabwindow);
120: PHP_FUNCTION(imagegrabscreen);
121: #endif
122:
123: PHP_FUNCTION(imagerotate);
124:
125: #ifdef HAVE_GD_BUNDLED
126: PHP_FUNCTION(imageantialias);
127: #endif
128:
129: PHP_FUNCTION(imagesetthickness);
130: PHP_FUNCTION(imagecopymergegray);
131: PHP_FUNCTION(imagesetbrush);
132: PHP_FUNCTION(imagesettile);
133: PHP_FUNCTION(imagesetstyle);
134:
135: PHP_FUNCTION(imagecreatefromstring);
136: PHP_FUNCTION(imagecreatefromgif);
137: PHP_FUNCTION(imagecreatefromjpeg);
138: PHP_FUNCTION(imagecreatefromxbm);
1.1.1.2 misho 139: PHP_FUNCTION(imagecreatefromwebp);
1.1 misho 140: PHP_FUNCTION(imagecreatefrompng);
141: PHP_FUNCTION(imagecreatefromwbmp);
142: PHP_FUNCTION(imagecreatefromgd);
143: PHP_FUNCTION(imagecreatefromgd2);
144: PHP_FUNCTION(imagecreatefromgd2part);
145: #if defined(HAVE_GD_XPM) && defined(HAVE_GD_BUNDLED)
146: PHP_FUNCTION(imagecreatefromxpm);
147: #endif
148:
149: PHP_FUNCTION(imagegammacorrect);
150: PHP_FUNCTION(imagedestroy);
151: PHP_FUNCTION(imagefill);
152: PHP_FUNCTION(imagefilledpolygon);
153: PHP_FUNCTION(imagefilledrectangle);
154: PHP_FUNCTION(imagefilltoborder);
155: PHP_FUNCTION(imagefontwidth);
156: PHP_FUNCTION(imagefontheight);
157:
158: PHP_FUNCTION(imagegif );
159: PHP_FUNCTION(imagejpeg );
160: PHP_FUNCTION(imagepng);
1.1.1.2 misho 161: PHP_FUNCTION(imagewebp);
1.1 misho 162: PHP_FUNCTION(imagewbmp);
163: PHP_FUNCTION(imagegd);
164: PHP_FUNCTION(imagegd2);
165:
166: PHP_FUNCTION(imageinterlace);
167: PHP_FUNCTION(imageline);
168: PHP_FUNCTION(imageloadfont);
169: PHP_FUNCTION(imagepolygon);
170: PHP_FUNCTION(imagerectangle);
171: PHP_FUNCTION(imagesetpixel);
172: PHP_FUNCTION(imagestring);
173: PHP_FUNCTION(imagestringup);
174: PHP_FUNCTION(imagesx);
175: PHP_FUNCTION(imagesy);
176: PHP_FUNCTION(imagedashedline);
177: PHP_FUNCTION(imagettfbbox);
178: PHP_FUNCTION(imagettftext);
179: PHP_FUNCTION(imagepsloadfont);
180: /*
181: PHP_FUNCTION(imagepscopyfont);
182: */
183: PHP_FUNCTION(imagepsfreefont);
184: PHP_FUNCTION(imagepsencodefont);
185: PHP_FUNCTION(imagepsextendfont);
186: PHP_FUNCTION(imagepsslantfont);
187: PHP_FUNCTION(imagepstext);
188: PHP_FUNCTION(imagepsbbox);
189:
190: PHP_FUNCTION(jpeg2wbmp);
191: PHP_FUNCTION(png2wbmp);
192: PHP_FUNCTION(image2wbmp);
193:
194: PHP_FUNCTION(imagecolormatch);
195:
196: #if HAVE_GD_BUNDLED
197: PHP_FUNCTION(imagelayereffect);
198: PHP_FUNCTION(imagexbm);
199: #endif
200:
201: PHP_FUNCTION(imagefilter);
202: PHP_FUNCTION(imageconvolution);
203:
204: PHP_GD_API int phpi_get_le_gd(void);
205:
206: #else
207:
208: #define phpext_gd_ptr NULL
209:
210: #endif
211:
212: #endif /* PHP_GD_H */
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>