ReactOS 0.4.17-dev-218-g5635d24
gdiplus_private.h
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#ifndef __WINE_GP_PRIVATE_H_
20#define __WINE_GP_PRIVATE_H_
21
22#include <math.h>
23#include <stdarg.h>
24
25#include "windef.h"
26#include "wingdi.h"
27#include "winbase.h"
28#include "winuser.h"
29
30#include "objbase.h"
31#include "ocidl.h"
32#include "wincodecsdk.h"
33#include "wine/list.h"
34
35#include "gdiplus.h"
36
37#define GP_DEFAULT_PENSTYLE (PS_GEOMETRIC | PS_SOLID | PS_ENDCAP_FLAT | PS_JOIN_MITER)
38#define MAX_ARC_PTS (13)
39#define MAX_DASHLEN (16) /* this is a limitation of gdi */
40#define INCH_HIMETRIC (2540)
41
42#define VERSION_MAGIC 0xdbc01001
43#define VERSION_MAGIC2 0xdbc01002
44#define VALID_MAGIC(x) (((x) & 0xfffff000) == 0xdbc01000)
45#define TENSION_CONST (0.3)
46
47#define GIF_DISPOSE_UNSPECIFIED 0
48#define GIF_DISPOSE_DO_NOT_DISPOSE 1
49#define GIF_DISPOSE_RESTORE_TO_BKGND 2
50#define GIF_DISPOSE_RESTORE_TO_PREV 3
51
52#define PIXELFORMATBPP(x) ((x) ? ((x) >> 8) & 255 : 24)
53
54
58 REAL startAngle, REAL sweepAngle);
61extern REAL units_to_pixels(REAL units, GpUnit unit, REAL dpi, BOOL printer_display);
62extern REAL pixels_to_units(REAL pixels, GpUnit unit, REAL dpi, BOOL printer_display);
63extern REAL units_scale(GpUnit from, GpUnit to, REAL dpi, BOOL printer_display);
64
65#define WineCoordinateSpaceGdiDevice ((GpCoordinateSpace)4)
66
67extern GpStatus gdi_dc_acquire(GpGraphics *graphics, HDC *hdc);
68extern void gdi_dc_release(GpGraphics *graphics, HDC hdc);
76
80
86 GDIPCONST GpRectF* rects, INT count);
98 GDIPCONST GpRectF *srcrect, GpUnit unit, DWORD StackIndex);
105 GDIPCONST GpPointF *points, INT count, REAL srcx, REAL srcy, REAL srcwidth,
106 REAL srcheight, GpUnit srcUnit, GDIPCONST GpImageAttributes* imageAttributes,
107 DrawImageAbort callback, VOID *callbackData);
115 GpRegion* region);
116extern void METAFILE_Free(GpMetafile *metafile);
121 REAL startAngle, REAL sweepAngle);
123 REAL startAngle, REAL sweepAngle);
128
129extern void calc_curve_bezier(const GpPointF *pts, REAL tension, REAL *x1,
130 REAL *y1, REAL *x2, REAL *y2);
131extern void calc_curve_bezier_endp(REAL xend, REAL yend, REAL xadj, REAL yadj,
132 REAL tension, REAL *x, REAL *y);
133
134extern void get_font_hfont(GpGraphics *graphics, GDIPCONST GpFont *font,
136 LOGFONTW *lfw_return, GDIPCONST GpMatrix *matrix);
137
138extern void free_installed_fonts(void);
139
141
142extern GpStatus widen_flat_path_anchors(GpPath *flat_path, GpPen *pen, REAL pen_width, GpPath **anchors);
143
144extern DWORD write_region_data(const GpRegion *region, void *data);
145extern DWORD write_path_data(GpPath *path, void *data);
146
147extern GpStatus trace_path(GpGraphics *graphics, GpPath *path);
148
151
152extern GpStatus get_hatch_data(GpHatchStyle hatchstyle, const unsigned char **result);
153
154static inline INT gdip_round(REAL x)
155{
156 return (INT) floorf(x + 0.5);
157}
158
159static inline INT ceilr(REAL x)
160{
161 return (INT) ceilf(x);
162}
163
164static inline REAL deg2rad(REAL degrees)
165{
166 return M_PI * degrees / 180.0;
167}
168
169static inline ARGB color_over(ARGB bg, ARGB fg)
170{
171 BYTE b, g, r, a;
172 BYTE bg_alpha, fg_alpha;
173
174 fg_alpha = (fg>>24)&0xff;
175
176 if (fg_alpha == 0xff) return fg;
177
178 if (fg_alpha == 0) return bg;
179
180 bg_alpha = (((bg>>24)&0xff) * (0xff-fg_alpha)) / 0xff;
181
182 if (bg_alpha == 0) return fg;
183
184 a = bg_alpha + fg_alpha;
185 b = ((bg&0xff)*bg_alpha + (fg&0xff)*fg_alpha)/a;
186 g = (((bg>>8)&0xff)*bg_alpha + ((fg>>8)&0xff)*fg_alpha)/a;
187 r = (((bg>>16)&0xff)*bg_alpha + ((fg>>16)&0xff)*fg_alpha)/a;
188
189 return (a<<24)|(r<<16)|(g<<8)|b;
190}
191
192/* fg is premult, bg and return value are not */
193static inline ARGB color_over_fgpremult(ARGB bg, ARGB fg)
194{
195 BYTE b, g, r, a;
196 BYTE bg_alpha, fg_alpha;
197
198 fg_alpha = (fg>>24)&0xff;
199
200 if (fg_alpha == 0) return bg;
201
202 bg_alpha = (((bg>>24)&0xff) * (0xff-fg_alpha)) / 0xff;
203
204 a = bg_alpha + fg_alpha;
205 b = ((bg&0xff)*bg_alpha + (fg&0xff)*0xff)/a;
206 g = (((bg>>8)&0xff)*bg_alpha + ((fg>>8)&0xff)*0xff)/a;
207 r = (((bg>>16)&0xff)*bg_alpha + ((fg>>16)&0xff)*0xff)/a;
208
209 return (a<<24)|(r<<16)|(g<<8)|b;
210}
211
212extern const char *debugstr_rectf(const RectF* rc);
213
214extern const char *debugstr_pointf(const PointF* pt);
215
216extern const char *debugstr_matrix(const GpMatrix* matrix);
217
219 BYTE *dst_bits, INT dst_stride, const BYTE *src_bits, INT src_stride);
220
222 INT dst_stride, BYTE *dst_bits, PixelFormat dst_format, ColorPalette *dst_palette,
223 INT src_stride, const BYTE *src_bits, PixelFormat src_format, ColorPalette *src_palette);
224
227
228struct GpMatrix{
230};
231
232struct GpPen{
246 REAL offset; /* dash offset */
252};
253
269 GpUnit unit; /* page unit */
270 REAL scale; /* page scale */
272 GpMatrix worldtrans; /* world transform */
273 BOOL busy; /* hdc handle obtained by GdipGetDC */
274 GpRegion *clip; /* in device coords */
275 UINT textcontrast; /* not used yet. get/set only */
277 GraphicsContainer contid; /* last-issued container ID */
282 /* For giving the caller an HDC when we technically can't: */
288};
289
290struct GpBrush{
292};
293
294struct GpHatch{
299};
300
304};
305
314 REAL* blendfac; /* blend factors */
315 REAL* blendpos; /* blend positions */
319 ARGB* pblendcolor; /* preset blend colors */
320 REAL* pblendpos; /* preset blend positions */
323};
324
332 REAL* blendfac; /* blend factors */
333 REAL* blendpos; /* blend positions */
335 ARGB* pblendcolor; /* preset blend colors */
336 REAL* pblendpos; /* preset blend positions */
339};
340
346 BYTE *bitmap_bits; /* image bits converted to ARGB and run through imageattributes */
347};
348
349struct GpPath{
352 BOOL newfigure; /* whether the next drawing action starts a new figure */
353 INT datalen; /* size of the arrays in pathdata */
354};
355
358 INT subpath_pos; /* for NextSubpath methods */
359 INT marker_pos; /* for NextMarker methods */
360 INT pathtype_pos; /* for NextPathType methods */
361};
362
366 BOOL fill; /* TRUE for fill, FALSE for stroke */
367 GpLineCap basecap; /* cap used together with customLineCap */
368 REAL inset; /* distance between line end and cap beginning */
371 GpLineJoin join; /* joins used for drawing custom cap*/
373};
374
380};
381
382typedef enum EffectType {
396
397typedef struct CGpEffect{
400
401struct GpImage{
410 SRWLOCK lock;
411};
412
413#define EmfPlusObjectTableSize 64
414
416{
429
430/* Deserialized EmfPlusObject record. */
433 union {
441 void *object;
442 } u;
443};
444
450 HENHMETAFILE hemf;
451 int preserve_hemf; /* if true, hemf belongs to the app and should not be deleted */
452
453 /* recording */
460 BOOL auto_frame; /* If true, determine the frame automatically */
467
468 /* playback */
478 GpRegion *base_clip; /* clip region in device space for all metafile output */
479 GpRegion *clip; /* clip region within the metafile */
482};
483
484struct GpBitmap{
490 BYTE *bitmapbits; /* pointer to the buffer we passed in BitmapLockBits */
491 BYTE *bits; /* actual image bits if this is a DIB */
492 INT stride; /* stride of bits if this is a DIB */
493 BYTE *own_bits; /* image bits that need to be freed with this object */
494 INT lockx, locky; /* X and Y coordinates of the rect when a bitmap is locked for writing. */
495 IWICMetadataReader *metadata_reader; /* NULL if there is no metadata */
497 PropertyItem *prop_item; /* cached image properties */
498};
499
502};
503
508};
509
515};
516
521};
522
527};
528
539};
540
541struct GpFont{
544 REAL emSize; /* in font units */
546};
547
548extern const struct GpStringFormat default_drawstring_format;
549
565};
566
567extern void init_generic_string_formats(void);
568extern void free_generic_string_formats(void);
569
574};
575
579 int dpi;
582};
583
584/* internal use */
585typedef enum RegionType
586{
587 RegionDataRect = 0x10000000,
588 RegionDataPath = 0x10000001,
592
594{
595 DWORD type; /* Rectangle, Path, SpecialRectangle, or CombineMode */
596 union
597 {
600 struct
601 {
602 struct region_element *left; /* the original region */
603 struct region_element *right; /* what *left was combined with */
606};
607
608struct GpRegion{
611};
612
614{
615 const BYTE *buffer;
617};
618
619static inline void init_memory_buffer(struct memory_buffer *mbuf, const BYTE *buffer, INT size)
620{
621 mbuf->buffer = buffer;
622 mbuf->size = size;
623 mbuf->pos = 0;
624}
625
626static inline const void *buffer_read(struct memory_buffer *mbuf, INT size)
627{
628 if (mbuf->size - mbuf->pos >= size)
629 {
630 const void *data = mbuf->buffer + mbuf->pos;
631 mbuf->pos += size;
632 return data;
633 }
634 return NULL;
635}
636
637/* Represents a string section and the font it should use. */
639 struct list entry;
640 DWORD start; /* The starting index of the string where the font applies. */
641 DWORD end; /* The end index of the string. */
643};
644
648};
649
660 const RectF *bounds;
664};
665
667
670 GDIPCONST RectF *rect, GDIPCONST GpStringFormat *format, int ignore_empty_clip,
672
673void get_log_fontW(const GpFont *, GpGraphics *, LOGFONTW *);
674
676{
677 return TryAcquireSRWLockExclusive(&image->lock);
678}
679
680static inline void image_unlock(GpImage *image)
681{
683}
684
686{
687 return graphics->hdc != NULL || graphics->owndc;
688}
689
690static inline void set_rect(GpRectF *rect, REAL x, REAL y, REAL width, REAL height)
691{
692 rect->X = x;
693 rect->Y = y;
694 rect->Width = width;
695 rect->Height = height;
696}
697
698#endif
static HFONT hfont
unsigned short UINT16
Definition: actypes.h:129
Definition: list.h:37
RECT rect
Definition: combotst.c:67
#define LF_FACESIZE
Definition: dimm.idl:39
#define NULL
Definition: types.h:112
float REAL
Definition: types.h:41
VOID WINAPI ReleaseSRWLockExclusive(PSRWLOCK Lock)
Definition: sync.c:36
static void * user_data
Definition: metahost.c:106
const WCHAR * text
Definition: package.c:1794
#define pt(x, y)
Definition: drawing.c:79
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GpStatus METAFILE_RotateWorldTransform(GpMetafile *metafile, REAL angle, MatrixOrder order)
Definition: metafile.c:1503
void transform_properties(GpGraphics *, GDIPCONST GpMatrix *, BOOL, REAL *, REAL *, REAL *)
Definition: graphics.c:5696
DWORD write_region_data(const GpRegion *region, void *data)
Definition: region.c:689
GpStatus encode_image_png(GpImage *image, IStream *stream, GDIPCONST EncoderParameters *params)
Definition: image.c:4859
static BOOL image_lock(GpImage *image)
GpStatus METAFILE_GraphicsClear(GpMetafile *metafile, ARGB color)
Definition: metafile.c:960
GpStatus METAFILE_TranslateWorldTransform(GpMetafile *metafile, REAL dx, REAL dy, MatrixOrder order)
Definition: metafile.c:1524
GpStatus hresult_to_status(HRESULT res)
Definition: gdiplus.c:314
GpStatus terminate_encoder_wic(GpImage *image)
Definition: image.c:4655
GpStatus METAFILE_OffsetClip(GpMetafile *metafile, REAL dx, REAL dy)
Definition: metafile.c:5581
void delete_element(region_element *element)
Definition: gdiplus.c:465
GpStatus METAFILE_GetGraphicsContext(GpMetafile *metafile, GpGraphics **result)
Definition: metafile.c:921
GpStatus get_graphics_transform(GpGraphics *graphics, GpCoordinateSpace dst_space, GpCoordinateSpace src_space, GpMatrix *matrix)
Definition: graphics.c:7266
void init_generic_string_formats(void)
Definition: stringformat.c:56
static ARGB color_over(ARGB bg, ARGB fg)
GpStatus METAFILE_ScaleWorldTransform(GpMetafile *metafile, REAL sx, REAL sy, MatrixOrder order)
Definition: metafile.c:1460
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
static INT gdip_round(REAL x)
REAL units_to_pixels(REAL units, GpUnit unit, REAL dpi, BOOL printer_display)
Definition: gdiplus.c:329
#define EmfPlusObjectTableSize
imageattr_noop
@ IMAGEATTR_NOOP_UNDEFINED
@ IMAGEATTR_NOOP_CLEAR
@ IMAGEATTR_NOOP_SET
GpStatus METAFILE_FillEllipse(GpMetafile *metafile, GpBrush *brush, GpRectF *rect)
Definition: metafile.c:5175
static void init_memory_buffer(struct memory_buffer *mbuf, const BYTE *buffer, INT size)
DWORD write_path_data(GpPath *path, void *data)
GpStatus METAFILE_AddSimpleProperty(GpMetafile *metafile, SHORT prop, SHORT val)
Definition: metafile.c:4839
static void set_rect(GpRectF *rect, REAL x, REAL y, REAL width, REAL height)
GpStatus METAFILE_SetPageTransform(GpMetafile *metafile, GpUnit unit, REAL scale)
Definition: metafile.c:1419
void gdi_dc_release(GpGraphics *graphics, HDC hdc)
Definition: graphics.c:75
BOOL lengthen_path(GpPath *path, INT len)
Definition: gdiplus.c:415
GpStatus METAFILE_ReleaseDC(GpMetafile *metafile, HDC hdc)
Definition: metafile.c:1667
GpStatus METAFILE_SetClipRegion(GpMetafile *metafile, GpRegion *region, CombineMode mode)
Definition: metafile.c:1395
EffectType
@ ColorMatrixEffect
@ ColorLUTEffect
@ ColorBalanceEffect
@ BlurEffect
@ SharpenEffect
@ BrightnessContrastEffect
@ HueSaturationLightnessEffect
@ TintEffect
@ RedEyeCorrectionEffect
@ LevelsEffect
@ ColorCurveEffect
@ NoneEffect
EmfPlusObjectType
@ ObjectTypeStringFormat
@ ObjectTypeImage
@ ObjectTypeInvalid
@ ObjectTypeImageAttributes
@ ObjectTypePen
@ ObjectTypeFont
@ ObjectTypeCustomLineCap
@ ObjectTypeRegion
@ ObjectTypeMax
@ ObjectTypeBrush
@ ObjectTypePath
GpStatus gdip_transform_points(GpGraphics *graphics, GpCoordinateSpace dst_space, GpCoordinateSpace src_space, GpPointF *points, INT count)
Definition: graphics.c:7344
GpStatus METAFILE_SetClipRect(GpMetafile *metafile, REAL x, REAL y, REAL width, REAL height, CombineMode mode)
Definition: metafile.c:1350
void calc_curve_bezier(const GpPointF *pts, REAL tension, REAL *x1, REAL *y1, REAL *x2, REAL *y2)
Definition: gdiplus.c:389
static const void * buffer_read(struct memory_buffer *mbuf, INT size)
GpStatus graphics_from_image(GpImage *image, GpGraphics **graphics)
Definition: graphics.c:2520
GpStatus METAFILE_GraphicsDeleted(GpMetafile *metafile)
Definition: metafile.c:1675
static INT ceilr(REAL x)
GpStatus gdi_dc_acquire(GpGraphics *graphics, HDC *hdc)
Definition: graphics.c:54
const char * debugstr_pointf(const PointF *pt)
Definition: gdiplus.c:492
GpStatus METAFILE_BeginContainerNoParams(GpMetafile *metafile, DWORD StackIndex)
Definition: metafile.c:1587
GpStatus convert_pixels(INT width, INT height, INT dst_stride, BYTE *dst_bits, PixelFormat dst_format, ColorPalette *dst_palette, INT src_stride, const BYTE *src_bits, PixelFormat src_format, ColorPalette *src_palette)
Definition: image.c:589
void free_installed_fonts(void)
Definition: font.c:1567
GpStatus widen_flat_path_anchors(GpPath *flat_path, GpPen *pen, REAL pen_width, GpPath **anchors)
GpStatus METAFILE_GetDC(GpMetafile *metafile, HDC *hdc)
Definition: metafile.c:941
GpStatus get_hatch_data(GpHatchStyle hatchstyle, const unsigned char **result)
Definition: brush.c:288
GpStatus gdi_transform_acquire(GpGraphics *graphics)
Definition: graphics.c:7228
GpStatus METAFILE_FillPath(GpMetafile *metafile, GpBrush *brush, GpPath *path)
Definition: metafile.c:5134
GpStatus METAFILE_DrawArc(GpMetafile *metafile, GpPen *pen, const GpRectF *rect, REAL startAngle, REAL sweepAngle)
Definition: metafile.c:5536
GpStatus METAFILE_SetClipPath(GpMetafile *metafile, GpPath *path, CombineMode mode)
Definition: metafile.c:5626
static void image_unlock(GpImage *image)
static REAL deg2rad(REAL degrees)
GpStatus METAFILE_DrawRectangles(GpMetafile *metafile, GpPen *pen, const GpRectF *rects, INT count)
Definition: metafile.c:5481
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
void free_generic_string_formats(void)
Definition: stringformat.c:67
GpStatus METAFILE_SetRenderingOrigin(GpMetafile *metafile, INT x, INT y)
Definition: metafile.c:5653
GpStatus METAFILE_RestoreGraphics(GpMetafile *metafile, DWORD StackIndex)
Definition: metafile.c:1647
void METAFILE_Free(GpMetafile *metafile)
Definition: metafile.c:687
REAL pixels_to_units(REAL pixels, GpUnit unit, REAL dpi, BOOL printer_display)
Definition: gdiplus.c:356
RegionType
@ RegionDataEmptyRect
@ RegionDataRect
@ RegionDataInfiniteRect
@ RegionDataPath
GpStatus METAFILE_MultiplyWorldTransform(GpMetafile *metafile, GDIPCONST GpMatrix *matrix, MatrixOrder order)
Definition: metafile.c:1482
GpStatus METAFILE_SetWorldTransform(GpMetafile *metafile, GDIPCONST GpMatrix *transform)
Definition: metafile.c:1440
GpStatus METAFILE_ResetWorldTransform(GpMetafile *metafile)
Definition: metafile.c:1546
static BOOL has_gdi_dc(GpGraphics *graphics)
GpStatus gdi_transform_release(GpGraphics *graphics)
Definition: graphics.c:7250
GpStatus METAFILE_DrawImagePointsRect(GpMetafile *metafile, GpImage *image, GDIPCONST GpPointF *points, INT count, REAL srcx, REAL srcy, REAL srcwidth, REAL srcheight, GpUnit srcUnit, GDIPCONST GpImageAttributes *imageAttributes, DrawImageAbort callback, VOID *callbackData)
Definition: metafile.c:4759
GpStatus trace_path(GpGraphics *graphics, GpPath *path)
Definition: graphics.c:2127
REAL gdiplus_atan2(REAL dy, REAL dx)
Definition: gdiplus.c:306
GpStatus gdip_format_string(GpGraphics *graphics, HDC hdc, GDIPCONST WCHAR *string, INT length, GDIPCONST GpFont *font, GDIPCONST RectF *rect, GDIPCONST GpStringFormat *format, int ignore_empty_clip, gdip_format_string_callback callback, void *user_data)
Definition: graphics.c:5478
const struct GpStringFormat default_drawstring_format
Definition: stringformat.c:35
GpStatus METAFILE_DrawEllipse(GpMetafile *metafile, GpPen *pen, GpRectF *rect)
Definition: metafile.c:5095
GpStatus METAFILE_BeginContainer(GpMetafile *metafile, GDIPCONST GpRectF *dstrect, GDIPCONST GpRectF *srcrect, GpUnit unit, DWORD StackIndex)
Definition: metafile.c:1564
GpStatus(* gdip_format_string_callback)(struct gdip_format_string_info *info)
GpStatus METAFILE_FillPie(GpMetafile *metafile, GpBrush *brush, const GpRectF *rect, REAL startAngle, REAL sweepAngle)
Definition: metafile.c:5224
static ARGB color_over_fgpremult(ARGB bg, ARGB fg)
GpStatus METAFILE_DrawDriverString(GpMetafile *metafile, GDIPCONST UINT16 *text, INT length, GDIPCONST GpFont *font, GDIPCONST GpStringFormat *format, GDIPCONST GpBrush *brush, GDIPCONST PointF *positions, INT flags, GDIPCONST GpMatrix *matrix)
Definition: metafile.c:5322
GpStatus METAFILE_EndContainer(GpMetafile *metafile, DWORD StackIndex)
Definition: metafile.c:1607
HBITMAP ARGB2BMP(ARGB color)
Definition: gdiplus.c:274
void get_font_hfont(GpGraphics *graphics, GDIPCONST GpFont *font, GDIPCONST GpStringFormat *format, HFONT *hfont, LOGFONTW *lfw_return, GDIPCONST GpMatrix *matrix)
Definition: graphics.c:2385
void get_log_fontW(const GpFont *, GpGraphics *, LOGFONTW *)
Definition: graphics.c:2353
GpStatus METAFILE_DrawPath(GpMetafile *metafile, GpPen *pen, GpPath *path)
Definition: metafile.c:5065
REAL units_scale(GpUnit from, GpUnit to, REAL dpi, BOOL printer_display)
Definition: gdiplus.c:382
PixelFormat apply_image_attributes(const GpImageAttributes *attributes, LPBYTE data, UINT width, UINT height, INT stride, ColorAdjustType type, PixelFormat fmt)
Definition: graphics.c:796
INT arc2polybezier(GpPointF *points, REAL x1, REAL y1, REAL x2, REAL y2, REAL startAngle, REAL sweepAngle)
Definition: gdiplus.c:223
GpStatus METAFILE_SaveGraphics(GpMetafile *metafile, DWORD StackIndex)
Definition: metafile.c:1627
const char * debugstr_matrix(const GpMatrix *matrix)
Definition: gdiplus.c:498
GpStatus METAFILE_ResetClip(GpMetafile *metafile)
Definition: metafile.c:5605
GpStatus METAFILE_FillRegion(GpMetafile *metafile, GpBrush *brush, GpRegion *region)
Definition: metafile.c:5434
GpStatus METAFILE_FillRectangles(GpMetafile *metafile, GpBrush *brush, GDIPCONST GpRectF *rects, INT count)
Definition: metafile.c:1261
ColorAdjustType
@ ColorAdjustTypeCount
ColorMatrixFlags
HatchStyle
Definition: gdiplusenums.h:427
SmoothingMode
Definition: gdiplusenums.h:120
DashCap
Definition: gdiplusenums.h:169
CompositingMode
Definition: gdiplusenums.h:246
LineJoin
Definition: gdiplusenums.h:104
StringTrimming
Definition: gdiplusenums.h:290
StringAlignment
Definition: gdiplusenums.h:262
ImageType
Definition: gdiplusenums.h:192
CombineMode
Definition: gdiplusenums.h:387
StringDigitSubstitute
Definition: gdiplusenums.h:269
CustomLineCapType
Definition: gdiplusenums.h:77
PixelOffsetMode
Definition: gdiplusenums.h:159
LineCap
Definition: gdiplusenums.h:60
UINT GraphicsContainer
Definition: gdiplusenums.h:23
FillMode
Definition: gdiplusenums.h:54
DashStyle
Definition: gdiplusenums.h:176
CompositingQuality
Definition: gdiplusenums.h:130
WrapMode
Definition: gdiplusenums.h:204
MatrixOrder
Definition: gdiplusenums.h:186
TextRenderingHint
Definition: gdiplusenums.h:252
PenAlignment
Definition: gdiplusenums.h:153
HotkeyPrefix
Definition: gdiplusenums.h:310
Unit
Definition: gdiplusenums.h:26
MetafileType
Definition: gdiplusenums.h:213
CoordinateSpace
Definition: gdiplusenums.h:403
BrushType
Definition: gdiplusenums.h:37
InterpolationMode
Definition: gdiplusenums.h:140
#define GDIPCONST
Definition: gdiplusflat.h:24
Status GpStatus
ImageLockMode
DWORD ARGB
INT PixelFormat
ImageAbort DrawImageAbort
Definition: gdiplustypes.h:55
Status
Definition: gdiplustypes.h:24
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid * pixels
Definition: gl.h:1546
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLint GLint GLsizei width
Definition: gl.h:1546
GLuint GLenum GLenum transform
Definition: glext.h:9407
GLsizei stride
Definition: glext.h:5848
GLuint res
Definition: glext.h:9613
GLenum GLenum GLenum GLenum GLenum scale
Definition: glext.h:9032
GLuint buffer
Definition: glext.h:5915
GLsizeiptr size
Definition: glext.h:5919
GLuint color
Definition: glext.h:6243
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLuint GLenum matrix
Definition: glext.h:9407
GLenum mode
Definition: glext.h:6217
GLenum const GLfloat * params
Definition: glext.h:5645
GLfloat units
Definition: glext.h:11727
GLbitfield flags
Definition: glext.h:7161
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
GLboolean GLboolean g
Definition: glext.h:6204
GLfloat angle
Definition: glext.h:10853
GLuint GLfloat * val
Definition: glext.h:7180
GLuint64EXT * result
Definition: glext.h:11304
GLuint GLdouble GLdouble GLint GLint order
Definition: glext.h:11194
GLenum GLsizei len
Definition: glext.h:6722
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
GLsizei const GLfloat * points
Definition: glext.h:8112
#define a
Definition: ke_i.h:78
#define b
Definition: ke_i.h:79
USHORT LANGID
Definition: mui.h:9
GLint dy
Definition: linetemp.h:97
GLint dx
Definition: linetemp.h:97
#define M_PI
Definition: macros.h:263
HDC hdc
Definition: main.c:9
static HBITMAP
Definition: button.c:44
static HDC
Definition: imagelist.c:88
static IPrintDialogCallback callback
Definition: printdlg.c:326
static const char * dst_format
Definition: dib.c:1339
static const unsigned char metafile[]
Definition: olepicture.c:138
#define ceilf(x)
Definition: mymath.h:62
#define floorf(x)
Definition: mymath.h:65
Definition: mk_font.cpp:20
unsigned int UINT
Definition: ndis.h:50
static HANDLE ACCESS_MASK ULONG attributes
Definition: om.c:94
short WCHAR
Definition: pedump.c:58
short SHORT
Definition: pedump.c:59
long LONG
Definition: pedump.c:60
png_const_structrp png_const_inforp int * unit
Definition: png.h:2392
CardRegion * from
Definition: spigame.cpp:19
EffectType type
GpCustomLineCap cap
BYTE * own_bits
GpImage image
IWICMetadataReader * metadata_reader
ImageLockMode lockmode
PropertyItem * prop_item
BYTE * bitmapbits
PixelFormat format
GpBrushType bt
GpPathData pathdata
CustomLineCapType type
GpLineCap strokeEndCap
GpLineCap strokeStartCap
GpFontFamily ** FontFamilies
WCHAR FamilyName[LF_FACESIZE]
GpFontFamily * family
OUTLINETEXTMETRICW otm
int temp_hbitmap_width
BYTE * temp_bits
INT gdi_transform_acquire_count
PixelOffsetMode pixeloffset
SmoothingMode smoothing
int temp_hbitmap_height
GpMatrix worldtrans
struct list containers
GpImage * image
InterpolationMode interpolation
GraphicsContainer contid
BOOL printer_display
HBITMAP temp_hbitmap
CompositingQuality compqual
TextRenderingHint texthint
ImageType image_type
INT gdi_transform_save
GpMatrix gdi_transform
CompositingMode compmode
GpRegion * clip
GpBrush brush
GpHatchStyle hatchstyle
struct color_key colorkeys[ColorAdjustTypeCount]
REAL gamma[ColorAdjustTypeCount]
struct color_matrix colormatrices[ColorAdjustTypeCount]
enum imageattr_noop noop[ColorAdjustTypeCount]
BOOL gamma_enabled[ColorAdjustTypeCount]
struct color_remap_table colorremaptables[ColorAdjustTypeCount]
IWICBitmapDecoder * decoder
ColorPalette * palette
UINT frame_count
SRWLOCK lock
IWICBitmapEncoder * encoder
ImageType type
UINT current_frame
BOOL printer_display
GpRegion * base_clip
BYTE * comment_data
IStream * record_stream
DWORD comment_data_size
GpPointF auto_frame_min
GpGraphics * record_graphics
struct list containers
GpMatrix * world_transform
struct emfplus_object objtable[EmfPlusObjectTableSize]
GpPointF auto_frame_max
GpGraphics * playback_graphics
DWORD comment_data_length
GpRectF bounds
GpUnit page_unit
GpRectF src_rect
DWORD next_object_id
HANDLETABLE * handle_table
MetafileType metafile_type
GpRegion * clip
GpPointF playback_points[3]
HENHMETAFILE hemf
GpPathData pathdata
GpPathData pathdata
BOOL newfigure
GpFillMode fill
GpDashStyle dash
GpLineCap startcap
INT numdashes
REAL * dashes
GpCustomLineCap * customend
REAL * compound_array
GpMatrix transform
REAL offset
REAL miterlimit
GpLineCap endcap
UINT style
GpLineJoin join
GpDashCap dashcap
GpBrush * brush
GpPenAlignment align
INT compound_array_size
GpUnit unit
REAL width
GpCustomLineCap * customstart
region_element node
DWORD num_children
CharacterRange * character_ranges
StringTrimming trimming
StringAlignment align
StringDigitSubstitute digitsub
HotkeyPrefix hkprefix
StringAlignment line_align
GpBrush brush
GpImageAttributes * imageattributes
GpImage * image
BYTE * bitmap_bits
GpMatrix transform
ColorMatrix graymatrix
ColorMatrixFlags flags
ColorMatrix colormatrix
GpRegion * region
GpImageAttributes * image_attributes
EmfPlusObjectType type
union emfplus_object::@404 u
Definition: dsound.c:943
Definition: format.c:58
GDIPCONST GpStringFormat * format
GDIPCONST WCHAR * string
GDIPCONST RectF * rect
struct gdip_font_link_info font_link_info
const BYTE * buffer
struct region_element * right
struct region_element * left
struct region_element::@405::@406 combine
union region_element::@405 elementdata
Definition: parse.h:23
unsigned char * LPBYTE
Definition: typedefs.h:53
int32_t INT
Definition: typedefs.h:58
#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
unsigned char BYTE
Definition: xxhash.c:193