summaryrefslogtreecommitdiff
path: root/ext/gd/gd.stub.php
blob: 531ccb798972783730b4fac0151b7e922a091f49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
<?php

/** @generate-class-entries */

/** @strict-properties */
final class GdImage {}
/** @strict-properties */
final class GdFont {}

function gd_info(): array {}

function imageloadfont(string $filename): GdFont|false {}

function imagesetstyle(GdImage $image, array $style): bool {}

function imagecreatetruecolor(int $width, int $height): GdImage|false {}

function imageistruecolor(GdImage $image): bool {}

function imagetruecolortopalette(GdImage $image, bool $dither, int $num_colors): bool {}

function imagepalettetotruecolor(GdImage $image): bool {}

function imagecolormatch(GdImage $image1, GdImage $image2): bool {}

function imagesetthickness(GdImage $image, int $thickness): bool {}

function imagefilledellipse(GdImage $image, int $center_x, int $center_y, int $width, int $height, int $color): bool {}

function imagefilledarc(GdImage $image, int $center_x, int $center_y, int $width, int $height, int $start_angle, int $end_angle, int $color, int $style): bool {}

function imagealphablending(GdImage $image, bool $enable): bool {}

function imagesavealpha(GdImage $image, bool $enable): bool {}

function imagelayereffect(GdImage $image, int $effect): bool {}

function imagecolorallocatealpha(GdImage $image, int $red, int $green, int $blue, int $alpha): int|false {}

function imagecolorresolvealpha(GdImage $image, int $red, int $green, int $blue, int $alpha): int|false {}

function imagecolorclosestalpha(GdImage $image, int $red, int $green, int $blue, int $alpha): int|false {}

function imagecolorexactalpha(GdImage $image, int $red, int $green, int $blue, int $alpha): int|false {}

function imagecopyresampled(GdImage $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_width, int $dst_height, int $src_width, int $src_height): bool {}

#ifdef PHP_WIN32

function imagegrabwindow(int $handle, bool $client_area = false): GdImage|false {}

function imagegrabscreen(): GdImage|false {}

#endif

// TODO: $ignore_transparent is ignored???
function imagerotate(GdImage $image, float $angle, int $background_color, bool $ignore_transparent = false): GdImage|false {}

function imagesettile(GdImage $image, GdImage $tile): bool {}

function imagesetbrush(GdImage $image, GdImage $brush): bool {}

function imagecreate(int $width, int $height): GdImage|false {}

function imagetypes(): int {}

function imagecreatefromstring(string $data): GdImage|false {}

function imagecreatefromgif(string $filename): GdImage|false {}

#ifdef HAVE_GD_JPG
function imagecreatefromjpeg(string $filename): GdImage|false {}
#endif

#ifdef HAVE_GD_PNG
function imagecreatefrompng(string $filename): GdImage|false {}
#endif

#ifdef HAVE_GD_WEBP
function imagecreatefromwebp(string $filename): GdImage|false {}
#endif

function imagecreatefromxbm(string $filename): GdImage|false {}

#ifdef HAVE_GD_XPM
function imagecreatefromxpm(string $filename): GdImage|false {}
#endif

function imagecreatefromwbmp(string $filename): GdImage|false {}

function imagecreatefromgd(string $filename): GdImage|false {}

function imagecreatefromgd2(string $filename): GdImage|false {}

function imagecreatefromgd2part(string $filename, int $x, int $y, int $width, int $height): GdImage|false {}

#ifdef HAVE_GD_BMP
function imagecreatefrombmp(string $filename): GdImage|false {}
#endif

#ifdef HAVE_GD_TGA
function imagecreatefromtga(string $filename): GdImage|false {}
#endif

function imagexbm(GdImage $image, ?string $filename, ?int $foreground_color = null): bool {}

/** @param resource|string|null $file */
function imagegif(GdImage $image, $file = null): bool {}

#ifdef HAVE_GD_PNG
/** @param resource|string|null $file */
function imagepng(GdImage $image, $file = null, int $quality = -1, int $filters = -1): bool {}
#endif

#ifdef HAVE_GD_WEBP
/** @param resource|string|null $file */
function imagewebp(GdImage $image, $file = null, int $quality = -1): bool {}
#endif

#ifdef HAVE_GD_JPG
/** @param resource|string|null $file */
function imagejpeg(GdImage $image, $file = null, int $quality = -1): bool {}
#endif

/** @param resource|string|null $file */
function imagewbmp(GdImage $image, $file = null, ?int $foreground_color = null): bool {}

function imagegd(GdImage $image, ?string $file = null): bool {}

function imagegd2(GdImage $image, ?string $file = null, int $chunk_size = UNKNOWN, int $mode = UNKNOWN): bool {}

#ifdef HAVE_GD_BMP
/** @param resource|string|null $file */
function imagebmp(GdImage $image, $file = null, bool $compressed = true): bool {}
#endif

function imagedestroy(GdImage $image): bool {}

function imagecolorallocate(GdImage $image, int $red, int $green, int $blue): int|false {}

function imagepalettecopy(GdImage $dst, GdImage $src): void {}

function imagecolorat(GdImage $image, int $x, int $y): int|false {}

function imagecolorclosest(GdImage $image, int $red, int $green, int $blue): int|false {}

function imagecolorclosesthwb(GdImage $image, int $red, int $green, int $blue): int|false {}

function imagecolordeallocate(GdImage $image, int $color): bool {}

function imagecolorresolve(GdImage $image, int $red, int $green, int $blue): int|false {}

function imagecolorexact(GdImage $image, int $red, int $green, int $blue): int|false {}

function imagecolorset(GdImage $image, int $color, int $red, int $green, int $blue, int $alpha = 0): ?bool {}

function imagecolorsforindex(GdImage $image, int $color): array|false {}

function imagegammacorrect(GdImage $image, float $input_gamma, float $output_gamma): bool {}

function imagesetpixel(GdImage $image, int $x, int $y, int $color): bool {}

function imageline(GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color): bool {}

function imagedashedline(GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color): bool {}

function imagerectangle(GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color): bool {}

function imagefilledrectangle(GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color): bool {}

function imagearc(GdImage $image, int $center_x, int $center_y, int $width, int $height, int $start_angle, int $end_angle, int $color): bool {}

function imageellipse(GdImage $image, int $center_x, int $center_y, int $width, int $height, int $color): bool {}

function imagefilltoborder(GdImage $image, int $x, int $y, int $border_color, int $color): bool {}

function imagefill(GdImage $image, int $x, int $y, int $color): bool {}

function imagecolorstotal(GdImage $image): int {}

function imagecolortransparent(GdImage $image, ?int $color = null): ?int {}

function imageinterlace(GdImage $image, ?bool $enable = null): bool {}

function imagepolygon(GdImage $image, array $points, int $num_points_or_color, ?int $color = null): bool {}

function imageopenpolygon(GdImage $image, array $points, int $num_points_or_color, ?int $color = null): bool {}

function imagefilledpolygon(GdImage $image, array $points, int $num_points_or_color, ?int $color = null): bool {}

function imagefontwidth(GdFont|int $font): int {}

function imagefontheight(GdFont|int $font): int {}

function imagechar(GdImage $image, GdFont|int $font, int $x, int $y, string $char, int $color): bool {}

function imagecharup(GdImage $image, GdFont|int $font, int $x, int $y, string $char, int $color): bool {}

function imagestring(GdImage $image, GdFont|int $font, int $x, int $y, string $string, int $color): bool {}

function imagestringup(GdImage $image, GdFont|int $font, int $x, int $y, string $string, int $color): bool {}

function imagecopy(GdImage $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height): bool {}

function imagecopymerge(GdImage $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height, int $pct): bool {}

function imagecopymergegray(GdImage $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height, int $pct): bool {}

function imagecopyresized(GdImage $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_width, int $dst_height, int $src_width, int $src_height): bool {}

function imagesx(GdImage $image): int {}

function imagesy(GdImage $image): int {}

function imagesetclip(GdImage $image, int $x1, int $x2, int $y1, int $y2): bool {}

function imagegetclip(GdImage $image): array {}

#ifdef HAVE_GD_FREETYPE
function imageftbbox(float $size, float $angle, string $font_filename, string $string, array $options = []): array|false {}

function imagefttext(GdImage $image, float $size, float $angle, int $x, int $y, int $color, string $font_filename, string $text, array $options = []): array|false {}

/** @alias imageftbbox */
function imagettfbbox(float $size, float $angle, string $font_filename, string $string, array $options = []): array|false {}

/** @alias imagefttext */
function imagettftext(GdImage $image, float $size, float $angle, int $x, int $y, int $color, string $font_filename, string $text, array $options = []): array|false {}
#endif

/** @param array|int|float|bool $args */
function imagefilter(GdImage $image, int $filter, ...$args): bool {}

function imageconvolution(GdImage $image, array $matrix, float $divisor, float $offset): bool {}

function imageflip(GdImage $image, int $mode): bool {}

function imageantialias(GdImage $image, bool $enable): bool {}

function imagecrop(GdImage $image, array $rectangle): GdImage|false {}

function imagecropauto(GdImage $image, int $mode = IMG_CROP_DEFAULT, float $threshold = 0.5, int $color = -1): GdImage|false {}

function imagescale(GdImage $image, int $width, int $height = -1, int $mode = IMG_BILINEAR_FIXED): GdImage|false {}

function imageaffine(GdImage $image, array $affine, ?array $clip = null): GdImage|false {}

/** @param array|float $options */
function imageaffinematrixget(int $type, $options): array|false {}

function imageaffinematrixconcat(array $matrix1, array $matrix2): array|false {}

function imagegetinterpolation(GdImage $image): int {}

function imagesetinterpolation(GdImage $image, int $method = IMG_BILINEAR_FIXED): bool {}

function imageresolution(GdImage $image, ?int $resolution_x = null, ?int $resolution_y = null): array|bool {}