ReactOS 0.4.17-dev-218-g5635d24
gdiplus.c
Go to the documentation of this file.
1/*
2 * Copyright (C) 2007 Google (Evan Stade)
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19#include <stdarg.h>
20#include <math.h>
21
22#include "windef.h"
23#include "winbase.h"
24#include "winerror.h"
25#include "wine/debug.h"
26#include "wingdi.h"
27
28#include "objbase.h"
29
30#include "winreg.h"
31#include "shlwapi.h"
32
33#include "gdiplus.h"
34#include "gdiplus_private.h"
35
37
38static const REAL mm_per_inch = 25.4;
39static const REAL inch_per_mm = 1.0 / 25.4;
40static const REAL point_per_inch = 72.0;
41static const REAL inch_per_point = 1.0 / 72.0;
42
44{
45 TRACE("%p\n", token);
46 if(!token)
47 return InvalidParameter;
48
49 return Ok;
50}
51
53{
54 TRACE("%Id\n", token);
55}
56
57/*****************************************************
58 * DllMain
59 */
61{
62 TRACE("(%p, %ld, %p)\n", hinst, reason, reserved);
63
64 switch(reason)
65 {
69 break;
70
72 if (reserved) break;
75 break;
76 }
77 return TRUE;
78}
79
80/*****************************************************
81 * GdiplusStartup [GDIPLUS.@]
82 */
84 struct GdiplusStartupOutput *output)
85{
86 if(!token || !input)
87 return InvalidParameter;
88
89 TRACE("%p %p %p\n", token, input, output);
90 TRACE("GdiplusStartupInput %d %p %d %d\n", input->GdiplusVersion,
91 input->DebugEventCallback, input->SuppressBackgroundThread,
92 input->SuppressExternalCodecs);
93
94 if(input->GdiplusVersion < 1 || input->GdiplusVersion > 2)
96
97 if(input->SuppressBackgroundThread){
98 if(!output)
99 return InvalidParameter;
100
103 }
104
105 *token = 0xdeadbeef;
106
107 /* FIXME: DebugEventCallback ignored */
108
109 return Ok;
110}
111
113{
114 FIXME("%p\n", token);
115 return NotificationHook(token);
116}
117
119{
120 FIXME("%Id\n", token);
122}
123
124/*****************************************************
125 * GdiplusShutdown [GDIPLUS.@]
126 */
128{
129 /* Notice the slightly different prototype from the official
130 * signature which forces us to use the _wrapper suffix.
131 */
132
133 /* FIXME: no object tracking */
134
135 /* "bricksntiles" expects a return value of 0, which native
136 * coincidentally gives.
137 */
138 return 0;
139}
140
141/*****************************************************
142 * GdipAlloc [GDIPLUS.@]
143 */
145{
146 return calloc(1, size);
147}
148
149/*****************************************************
150 * GdipFree [GDIPLUS.@]
151 */
153{
154 free(ptr);
155}
156
157/* Calculates the bezier points needed to fill in the arc portion starting at
158 * angle start and ending at end. These two angles should be no more than 90
159 * degrees from each other. x1, y1, x2, y2 describes the bounding box (upper
160 * left and width and height). Angles must be in radians. write_first indicates
161 * that the first bezier point should be written out (usually this is false).
162 * pt is the array of GpPointFs that gets written to.
163 **/
165 REAL start, REAL end, BOOL write_first)
166{
167 REAL center_x, center_y, rad_x, rad_y, cos_start, cos_end,
168 sin_start, sin_end, a, half;
169 INT i;
170
171 rad_x = x2 / 2.0;
172 rad_y = y2 / 2.0;
173 center_x = x1 + rad_x;
174 center_y = y1 + rad_y;
175
176 cos_start = cos(start);
177 cos_end = cos(end);
178 sin_start = sin(start);
179 sin_end = sin(end);
180
181 half = (end - start) / 2.0;
182 a = 4.0 / 3.0 * (1 - cos(half)) / sin(half);
183
184 if(write_first){
185 pt[0].X = cos_start;
186 pt[0].Y = sin_start;
187 }
188 pt[1].X = cos_start - a * sin_start;
189 pt[1].Y = sin_start + a * cos_start;
190
191 pt[3].X = cos_end;
192 pt[3].Y = sin_end;
193 pt[2].X = cos_end + a * sin_end;
194 pt[2].Y = sin_end - a * cos_end;
195
196 /* expand the points back from the unit circle to the ellipse */
197 for(i = (write_first ? 0 : 1); i < 4; i ++){
198 pt[i].X = pt[i].X * rad_x + center_x;
199 pt[i].Y = pt[i].Y * rad_y + center_y;
200 }
201}
202
203/* We plot the curve as if it is on a circle then stretch the points. This
204 * adjusts the angles so that when we stretch the points they will end in the
205 * right place. This is only complicated because atan and atan2 do not behave
206 * conveniently. */
207static REAL unstretch_angle(REAL angle, REAL dia_x, REAL dia_y)
208{
209 REAL stretched;
210 INT revs_off;
211
212 if(fabs(cos(angle)) < 0.00001 || fabs(sin(angle)) < 0.00001)
213 return angle;
214
215 stretched = gdiplus_atan2(sin(angle) / fabs(dia_y), cos(angle) / fabs(dia_x));
216 revs_off = gdip_round(angle / (2.0 * M_PI)) - gdip_round(stretched / (2.0 * M_PI));
217 stretched += ((REAL)revs_off) * M_PI * 2.0;
218 return stretched;
219}
220
221/* Stores the bezier points that correspond to the arc in points. If points is
222 * null, just return the number of points needed to represent the arc. */
224 REAL start_angle, REAL sweep_angle)
225{
226 INT i;
227 REAL partial_end_angle, end_angle;
228
229 end_angle = deg2rad(start_angle + sweep_angle);
230 start_angle = deg2rad(start_angle);
231
232 if (width != height)
233 {
234 start_angle = unstretch_angle(start_angle, width, height);
235 end_angle = unstretch_angle(end_angle, width, height);
236 }
237
238 for(i = 0; i < MAX_ARC_PTS - 1; i += 3){
239 /* check if we've overshot the end angle */
240 if( sweep_angle > 0.0 )
241 {
242 if (start_angle >= end_angle) break;
243 partial_end_angle = min(start_angle + M_PI_2, end_angle);
244 }
245 else
246 {
247 if (start_angle <= end_angle) break;
248 partial_end_angle = max(start_angle - M_PI_2, end_angle);
249 }
250
251 if (points)
252 add_arc_part(&points[i], left, top, width, height, start_angle, partial_end_angle, i == 0);
253
254 start_angle = partial_end_angle;
255 }
256
257 if (i == 0) return 0;
258 else return i+1;
259}
260
262{
263 /*
264 Packing of these color structures:
265 COLORREF: 00bbggrr
266 ARGB: aarrggbb
267 FIXME:doesn't handle alpha channel
268 */
269 return ((color & 0x0000ff) << 16) +
270 (color & 0x00ff00) +
271 ((color & 0xff0000) >> 16);
272}
273
275{
276 BITMAPINFO bi;
278 RGBQUAD *bits;
279 int alpha;
280
281 if ((color & 0xff000000) == 0xff000000) return 0;
282
283 bi.bmiHeader.biSize = sizeof(bi.bmiHeader);
284 bi.bmiHeader.biWidth = 1;
285 bi.bmiHeader.biHeight = 1;
286 bi.bmiHeader.biPlanes = 1;
287 bi.bmiHeader.biBitCount = 32;
289 bi.bmiHeader.biSizeImage = 0;
292 bi.bmiHeader.biClrUsed = 0;
294
295 result = CreateDIBSection(0, &bi, DIB_RGB_COLORS, (void*)&bits, NULL, 0);
296
297 bits[0].rgbReserved = alpha = (color>>24)&0xff;
298 bits[0].rgbRed = ((color>>16)&0xff)*alpha/255;
299 bits[0].rgbGreen = ((color>>8)&0xff)*alpha/255;
300 bits[0].rgbBlue = (color&0xff)*alpha/255;
301
302 return result;
303}
304
305/* Like atan2, but puts angle in correct quadrant if dx is 0. */
307{
308 if((dx == 0.0) && (dy != 0.0))
309 return dy > 0.0 ? M_PI_2 : -M_PI_2;
310
311 return atan2(dy, dx);
312}
313
315{
316 switch(res){
317 case S_OK:
318 return Ok;
319 case E_OUTOFMEMORY:
320 return OutOfMemory;
321 case E_INVALIDARG:
322 return InvalidParameter;
323 default:
324 return GenericError;
325 }
326}
327
328/* converts a given unit to its value in pixels */
330{
331 switch (unit)
332 {
333 case UnitPixel:
334 case UnitWorld:
335 return units;
336 case UnitDisplay:
337 if (printer_display)
338 return units * dpi * 0.01f;
339 else
340 return units;
341 case UnitPoint:
342 return units * dpi * inch_per_point;
343 case UnitInch:
344 return units * dpi;
345 case UnitDocument:
346 return units * dpi * (1.0f / 300.0f); /* Per MSDN */
347 case UnitMillimeter:
348 return units * dpi * inch_per_mm;
349 default:
350 FIXME("Unhandled unit type: %d\n", unit);
351 return 0;
352 }
353}
354
355/* converts value in pixels to a given unit */
357{
358 switch (unit)
359 {
360 case UnitPixel:
361 case UnitWorld:
362 return pixels;
363 case UnitDisplay:
364 if (printer_display)
365 return pixels * 100.0 / dpi;
366 else
367 return pixels;
368 case UnitPoint:
369 return pixels * point_per_inch / dpi;
370 case UnitInch:
371 return pixels / dpi;
372 case UnitDocument:
373 return pixels * 300.0 / dpi;
374 case UnitMillimeter:
375 return pixels * mm_per_inch / dpi;
376 default:
377 FIXME("Unhandled unit type: %d\n", unit);
378 return 0;
379 }
380}
381
383{
384 REAL pixels = units_to_pixels(1.0, from, dpi, printer_display);
385 return pixels_to_units(pixels, to, dpi, printer_display);
386}
387
388/* Calculates Bezier points from cardinal spline points. */
389void calc_curve_bezier(const GpPointF *pts, REAL tension, REAL *x1,
390 REAL *y1, REAL *x2, REAL *y2)
391{
392 REAL xdiff, ydiff;
393
394 /* calculate tangent */
395 xdiff = pts[2].X - pts[0].X;
396 ydiff = pts[2].Y - pts[0].Y;
397
398 /* apply tangent to get control points */
399 *x1 = pts[1].X - tension * xdiff;
400 *y1 = pts[1].Y - tension * ydiff;
401 *x2 = pts[1].X + tension * xdiff;
402 *y2 = pts[1].Y + tension * ydiff;
403}
404
405/* Calculates Bezier points from cardinal spline endpoints. */
406void calc_curve_bezier_endp(REAL xend, REAL yend, REAL xadj, REAL yadj,
407 REAL tension, REAL *x, REAL *y)
408{
409 /* tangent at endpoints is the line from the endpoint to the adjacent point */
410 *x = gdip_round(tension * (xadj - xend) + xend);
411 *y = gdip_round(tension * (yadj - yend) + yend);
412}
413
414/* make sure path has enough space for len more points */
416{
417 /* initial allocation */
418 if(path->datalen == 0){
419 path->datalen = len * 2;
420
421 path->pathdata.Points = calloc(path->datalen, sizeof(PointF));
422 if(!path->pathdata.Points) return FALSE;
423
424 path->pathdata.Types = calloc(1, path->datalen);
425 if(!path->pathdata.Types){
426 free(path->pathdata.Points);
427 return FALSE;
428 }
429 }
430 /* reallocation, double size of arrays */
431 else if(path->datalen - path->pathdata.Count < len){
432 while(path->datalen - path->pathdata.Count < len)
433 path->datalen *= 2;
434
435 path->pathdata.Points = realloc(path->pathdata.Points, path->datalen * sizeof(PointF));
436 if(!path->pathdata.Points) return FALSE;
437
438 path->pathdata.Types = realloc(path->pathdata.Types, path->datalen);
439 if(!path->pathdata.Types) return FALSE;
440 }
441
442 return TRUE;
443}
444
446 BYTE *dst_bits, INT dst_stride, const BYTE *src_bits, INT src_stride)
447{
448 INT x, y;
449 for (y=0; y<height; y++)
450 {
451 const BYTE *src=src_bits+y*src_stride;
452 BYTE *dst=dst_bits+y*dst_stride;
453 for (x=0; x<width; x++)
454 {
455 BYTE alpha=src[3];
456 *dst++ = (*src++ * alpha + 127) / 255;
457 *dst++ = (*src++ * alpha + 127) / 255;
458 *dst++ = (*src++ * alpha + 127) / 255;
459 *dst++ = *src++;
460 }
461 }
462}
463
464/* recursive deletion of GpRegion nodes */
466{
467 switch(element->type)
468 {
469 case RegionDataRect:
470 break;
471 case RegionDataPath:
472 GdipDeletePath(element->elementdata.path);
473 break;
476 break;
477 default:
478 delete_element(element->elementdata.combine.left);
479 delete_element(element->elementdata.combine.right);
480 free(element->elementdata.combine.left);
481 free(element->elementdata.combine.right);
482 break;
483 }
484}
485
486const char *debugstr_rectf(const RectF* rc)
487{
488 if (!rc) return "(null)";
489 return wine_dbg_sprintf("(%0.2f,%0.2f,%0.2f,%0.2f)", rc->X, rc->Y, rc->Width, rc->Height);
490}
491
492const char *debugstr_pointf(const PointF* pt)
493{
494 if (!pt) return "(null)";
495 return wine_dbg_sprintf("(%0.2f,%0.2f)", pt->X, pt->Y);
496}
497
498const char *debugstr_matrix(const GpMatrix *matrix)
499{
500 if (!matrix) return "(null)";
501 return wine_dbg_sprintf("%p(%0.2f,%0.2f,%0.2f,%0.2f,%0.2f,%0.2f)",matrix, matrix->matrix[0], matrix->matrix[1],
502 matrix->matrix[2], matrix->matrix[3], matrix->matrix[4], matrix->matrix[5]);
503}
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define FIXME(fmt,...)
Definition: precomp.h:53
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define realloc
Definition: debug_ros.c:6
#define free
Definition: debug_ros.c:5
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
float REAL
Definition: types.h:41
static WCHAR reason[MAX_STRING_RESOURCE_LEN]
Definition: object.c:1904
const char * wine_dbg_sprintf(const char *format,...)
Definition: compat.c:296
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define DLL_PROCESS_DETACH
Definition: compat.h:130
void free_installed_fonts(void)
Definition: font.c:1567
GpStatus WINGDIPAPI GdipDeletePath(GpPath *path)
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
_ACRTIMP double __cdecl fabs(double)
_ACRTIMP double __cdecl sin(double)
Definition: sin.c:21
#define M_PI_2
Definition: math.h:410
_ACRTIMP double __cdecl cos(double)
Definition: cos.c:21
_ACRTIMP double __cdecl atan2(double, double)
Definition: atan2.c:52
#define pt(x, y)
Definition: drawing.c:79
ULONG RGBQUAD
Definition: precomp.h:47
r reserved
Definition: btrfs.c:3006
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
void WINGDIPAPI GdipFree(void *ptr)
Definition: gdiplus.c:152
static const REAL mm_per_inch
Definition: gdiplus.c:38
GpStatus hresult_to_status(HRESULT res)
Definition: gdiplus.c:314
void delete_element(region_element *element)
Definition: gdiplus.c:465
static const REAL inch_per_mm
Definition: gdiplus.c:39
Status WINAPI GdiplusStartup(ULONG_PTR *token, const struct GdiplusStartupInput *input, struct GdiplusStartupOutput *output)
Definition: gdiplus.c:83
void convert_32bppARGB_to_32bppPARGB(UINT width, UINT height, BYTE *dst_bits, INT dst_stride, const BYTE *src_bits, INT src_stride)
Definition: gdiplus.c:445
const char * debugstr_rectf(const RectF *rc)
Definition: gdiplus.c:486
REAL units_to_pixels(REAL units, GpUnit unit, REAL dpi, BOOL printer_display)
Definition: gdiplus.c:329
BOOL lengthen_path(GpPath *path, INT len)
Definition: gdiplus.c:415
static const REAL inch_per_point
Definition: gdiplus.c:41
BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved)
Definition: gdiplus.c:60
void calc_curve_bezier(const GpPointF *pts, REAL tension, REAL *x1, REAL *y1, REAL *x2, REAL *y2)
Definition: gdiplus.c:389
ULONG WINAPI GdiplusShutdown_wrapper(ULONG_PTR token)
Definition: gdiplus.c:127
const char * debugstr_pointf(const PointF *pt)
Definition: gdiplus.c:492
GpStatus WINAPI GdiplusNotificationHook(ULONG_PTR *token)
Definition: gdiplus.c:112
static void add_arc_part(GpPointF *pt, REAL x1, REAL y1, REAL x2, REAL y2, REAL start, REAL end, BOOL write_first)
Definition: gdiplus.c:164
COLORREF ARGB2COLORREF(ARGB color)
Definition: gdiplus.c:261
void calc_curve_bezier_endp(REAL xend, REAL yend, REAL xadj, REAL yadj, REAL tension, REAL *x, REAL *y)
Definition: gdiplus.c:406
static Status WINAPI NotificationHook(ULONG_PTR *token)
Definition: gdiplus.c:43
REAL pixels_to_units(REAL pixels, GpUnit unit, REAL dpi, BOOL printer_display)
Definition: gdiplus.c:356
static REAL unstretch_angle(REAL angle, REAL dia_x, REAL dia_y)
Definition: gdiplus.c:207
REAL gdiplus_atan2(REAL dy, REAL dx)
Definition: gdiplus.c:306
static const REAL point_per_inch
Definition: gdiplus.c:40
void *WINGDIPAPI GdipAlloc(SIZE_T size)
Definition: gdiplus.c:144
HBITMAP ARGB2BMP(ARGB color)
Definition: gdiplus.c:274
void WINAPI GdiplusNotificationUnhook(ULONG_PTR token)
Definition: gdiplus.c:118
INT arc2polybezier(GpPointF *points, REAL left, REAL top, REAL width, REAL height, REAL start_angle, REAL sweep_angle)
Definition: gdiplus.c:223
REAL units_scale(GpUnit from, GpUnit to, REAL dpi, BOOL printer_display)
Definition: gdiplus.c:382
const char * debugstr_matrix(const GpMatrix *matrix)
Definition: gdiplus.c:498
static void WINAPI NotificationUnhook(ULONG_PTR token)
Definition: gdiplus.c:52
void init_generic_string_formats(void)
Definition: stringformat.c:56
static INT gdip_round(REAL x)
#define MAX_ARC_PTS
static REAL deg2rad(REAL degrees)
void free_generic_string_formats(void)
Definition: stringformat.c:67
@ RegionDataEmptyRect
@ RegionDataRect
@ RegionDataInfiniteRect
@ RegionDataPath
Unit
Definition: gdiplusenums.h:26
@ UnitDocument
Definition: gdiplusenums.h:32
@ UnitInch
Definition: gdiplusenums.h:31
@ UnitMillimeter
Definition: gdiplusenums.h:33
@ UnitDisplay
Definition: gdiplusenums.h:28
@ UnitWorld
Definition: gdiplusenums.h:27
@ UnitPoint
Definition: gdiplusenums.h:30
@ UnitPixel
Definition: gdiplusenums.h:29
#define WINGDIPAPI
Definition: gdiplusflat.h:22
DWORD ARGB
Status
Definition: gdiplustypes.h:24
@ Ok
Definition: gdiplustypes.h:25
@ UnsupportedGdiplusVersion
Definition: gdiplustypes.h:42
@ InvalidParameter
Definition: gdiplustypes.h:27
@ OutOfMemory
Definition: gdiplustypes.h:28
@ GenericError
Definition: gdiplustypes.h:26
GLuint start
Definition: gl.h:1545
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid * pixels
Definition: gl.h:1546
GLclampf GLclampf GLclampf alpha
Definition: gl.h:1740
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLuint GLuint end
Definition: gl.h:1545
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLint GLint GLsizei width
Definition: gl.h:1546
GLuint res
Definition: glext.h:9613
GLenum src
Definition: glext.h:6340
GLsizeiptr size
Definition: glext.h:5919
GLuint color
Definition: glext.h:6243
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
GLuint GLenum matrix
Definition: glext.h:9407
GLfloat units
Definition: glext.h:11727
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
Definition: glext.h:10929
GLint left
Definition: glext.h:7726
GLenum GLenum dst
Definition: glext.h:6340
GLfloat angle
Definition: glext.h:10853
GLuint64EXT * result
Definition: glext.h:11304
GLenum GLsizei len
Definition: glext.h:6722
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
GLenum GLenum GLenum input
Definition: glext.h:9031
GLsizei const GLfloat * points
Definition: glext.h:8112
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat token
Definition: glfuncs.h:210
#define bits
Definition: infblock.c:15
#define S_OK
Definition: intsafe.h:52
#define a
Definition: ke_i.h:78
GLint dy
Definition: linetemp.h:97
GLint dx
Definition: linetemp.h:97
#define M_PI
Definition: macros.h:263
static PVOID ptr
Definition: dispmode.c:27
static HBITMAP
Definition: button.c:44
static HINSTANCE hinst
Definition: edit.c:551
#define min(a, b)
Definition: monoChain.cc:55
unsigned int UINT
Definition: ndis.h:50
png_const_structrp png_const_inforp int * unit
Definition: png.h:2392
#define calloc
Definition: rosglue.h:14
#define TRACE(s)
Definition: solgame.cpp:4
CardRegion * from
Definition: spigame.cpp:19
NotificationUnhookProc NotificationUnhook
Definition: gdiplusinit.h:55
NotificationHookProc NotificationHook
Definition: gdiplusinit.h:54
REAL Y
Definition: gdiplustypes.h:644
REAL X
Definition: gdiplustypes.h:643
REAL Height
Definition: gdiplustypes.h:659
REAL X
Definition: gdiplustypes.h:656
REAL Width
Definition: gdiplustypes.h:658
REAL Y
Definition: gdiplustypes.h:657
ULONG biClrImportant
Definition: precomp.h:40
USHORT biBitCount
Definition: precomp.h:34
LONG biYPelsPerMeter
Definition: precomp.h:38
ULONG biCompression
Definition: precomp.h:35
LONG biXPelsPerMeter
Definition: precomp.h:37
BITMAPINFOHEADER bmiHeader
Definition: wingdi.h:1922
#define max(a, b)
Definition: svc.c:63
ULONG_PTR SIZE_T
Definition: typedefs.h:80
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint32_t ULONG
Definition: typedefs.h:59
#define BI_RGB
Definition: uefivid.c:46
HBITMAP WINAPI CreateDIBSection(HDC hDC, CONST BITMAPINFO *BitmapInfo, UINT Usage, VOID **Bits, HANDLE hSection, DWORD dwOffset)
Definition: bitmap.c:245
#define dpi
Definition: sysparams.c:23
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
Definition: winddi.h:3708
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG y1
Definition: winddi.h:3709
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG _In_ LONG y2
Definition: winddi.h:3711
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
Definition: winddi.h:3710
DWORD COLORREF
Definition: windef.h:100
#define WINAPI
Definition: msvc.h:6
#define DIB_RGB_COLORS
Definition: wingdi.h:367
unsigned char BYTE
Definition: xxhash.c:193