19#ifndef __WINE_GP_PRIVATE_H_
20#define __WINE_GP_PRIVATE_H_
32#include "wincodecsdk.h"
38#define GP_DEFAULT_PENSTYLE (PS_GEOMETRIC | PS_SOLID | PS_ENDCAP_FLAT | PS_JOIN_MITER)
39#define MAX_ARC_PTS (13)
40#define MAX_DASHLEN (16)
41#define INCH_HIMETRIC (2540)
43#define VERSION_MAGIC 0xdbc01001
44#define VERSION_MAGIC2 0xdbc01002
45#define VALID_MAGIC(x) (((x) & 0xfffff000) == 0xdbc01000)
46#define TENSION_CONST (0.3)
48#define GIF_DISPOSE_UNSPECIFIED 0
49#define GIF_DISPOSE_DO_NOT_DISPOSE 1
50#define GIF_DISPOSE_RESTORE_TO_BKGND 2
51#define GIF_DISPOSE_RESTORE_TO_PREV 3
64#define WineCoordinateSpaceGdiDevice ((GpCoordinateSpace)4)
139 return M_PI * degrees / 180.0;
145 BYTE bg_alpha, fg_alpha;
147 fg_alpha = (fg>>24)&0xff;
149 if (fg_alpha == 0xff)
return fg;
151 if (fg_alpha == 0)
return bg;
153 bg_alpha = (((bg>>24)&0xff) * (0xff-fg_alpha)) / 0xff;
155 if (bg_alpha == 0)
return fg;
157 a = bg_alpha + fg_alpha;
158 b = ((bg&0xff)*bg_alpha + (fg&0xff)*fg_alpha)/
a;
159 g = (((bg>>8)&0xff)*bg_alpha + ((fg>>8)&0xff)*fg_alpha)/
a;
160 r = (((bg>>16)&0xff)*bg_alpha + ((fg>>16)&0xff)*fg_alpha)/
a;
162 return (
a<<24)|(
r<<16)|(
g<<8)|
b;
169 BYTE bg_alpha, fg_alpha;
171 fg_alpha = (fg>>24)&0xff;
173 if (fg_alpha == 0)
return bg;
175 bg_alpha = (((bg>>24)&0xff) * (0xff-fg_alpha)) / 0xff;
177 a = bg_alpha + fg_alpha;
178 b = ((bg&0xff)*bg_alpha + (fg&0xff)*0xff)/
a;
179 g = (((bg>>8)&0xff)*bg_alpha + ((fg>>8)&0xff)*0xff)/
a;
180 r = (((bg>>16)&0xff)*bg_alpha + ((fg>>16)&0xff)*0xff)/
a;
182 return (
a<<24)|(
r<<16)|(
g<<8)|
b;
358#define EmfPlusObjectTableSize 64
582 INT lineno,
const RectF *bounds,
INT *underlined_indexes,
583 INT underlined_index_count,
void *user_data);
596 *unlock = !owner_tid;
597 return !owner_tid || owner_tid==
tid;
602 if (unlock)
image->busy = 0;
HBITMAP ARGB2BMP(ARGB color) DECLSPEC_HIDDEN
GpStatus METAFILE_SetPageTransform(GpMetafile *metafile, GpUnit unit, REAL scale) DECLSPEC_HIDDEN
GpStatus(* gdip_format_string_callback)(HDC hdc, GDIPCONST WCHAR *string, INT index, INT length, GDIPCONST GpFont *font, GDIPCONST RectF *rect, GDIPCONST GpStringFormat *format, INT lineno, const RectF *bounds, INT *underlined_indexes, INT underlined_index_count, void *user_data)
GpStatus METAFILE_MultiplyWorldTransform(GpMetafile *metafile, GDIPCONST GpMatrix *matrix, MatrixOrder order) DECLSPEC_HIDDEN
GpStatus METAFILE_GraphicsDeleted(GpMetafile *metafile) DECLSPEC_HIDDEN
GpStatus METAFILE_ScaleWorldTransform(GpMetafile *metafile, REAL sx, REAL sy, MatrixOrder order) DECLSPEC_HIDDEN
GpStatus gdip_format_string(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) DECLSPEC_HIDDEN
GpStatus gdip_transform_points(GpGraphics *graphics, GpCoordinateSpace dst_space, GpCoordinateSpace src_space, GpPointF *points, INT count) DECLSPEC_HIDDEN
GpStatus METAFILE_RotateWorldTransform(GpMetafile *metafile, REAL angle, MatrixOrder order) DECLSPEC_HIDDEN
DWORD write_path_data(GpPath *path, void *data) DECLSPEC_HIDDEN
void delete_element(region_element *element) DECLSPEC_HIDDEN
REAL units_to_pixels(REAL units, GpUnit unit, REAL dpi) DECLSPEC_HIDDEN
static ARGB color_over(ARGB bg, ARGB fg)
static INT gdip_round(REAL x)
#define EmfPlusObjectTableSize
@ IMAGEATTR_NOOP_UNDEFINED
static void image_unlock(GpImage *image, BOOL unlock)
static void init_memory_buffer(struct memory_buffer *mbuf, const BYTE *buffer, INT size)
GpStatus METAFILE_SetClipRect(GpMetafile *metafile, REAL x, REAL y, REAL width, REAL height, CombineMode mode) DECLSPEC_HIDDEN
GpStatus graphics_from_image(GpImage *image, GpGraphics **graphics) DECLSPEC_HIDDEN
REAL units_scale(GpUnit from, GpUnit to, REAL dpi) DECLSPEC_HIDDEN
GpStatus METAFILE_SaveGraphics(GpMetafile *metafile, DWORD StackIndex) DECLSPEC_HIDDEN
@ ObjectTypeImageAttributes
@ ObjectTypeCustomLineCap
GpStatus METAFILE_GetDC(GpMetafile *metafile, HDC *hdc) DECLSPEC_HIDDEN
void calc_curve_bezier_endp(REAL xend, REAL yend, REAL xadj, REAL yadj, REAL tension, REAL *x, REAL *y) DECLSPEC_HIDDEN
GpStatus get_graphics_transform(GpGraphics *graphics, GpCoordinateSpace dst_space, GpCoordinateSpace src_space, GpMatrix *matrix) DECLSPEC_HIDDEN
GpStatus METAFILE_ReleaseDC(GpMetafile *metafile, HDC hdc) DECLSPEC_HIDDEN
static const void * buffer_read(struct memory_buffer *mbuf, INT size)
GpStatus METAFILE_GraphicsClear(GpMetafile *metafile, ARGB color) DECLSPEC_HIDDEN
GpStatus METAFILE_SetClipRegion(GpMetafile *metafile, GpRegion *region, CombineMode mode) DECLSPEC_HIDDEN
GpStatus get_hatch_data(GpHatchStyle hatchstyle, const char **result) DECLSPEC_HIDDEN
BOOL lengthen_path(GpPath *path, INT len) DECLSPEC_HIDDEN
static BOOL image_lock(GpImage *image, BOOL *unlock)
REAL gdiplus_atan2(REAL dy, REAL dx) DECLSPEC_HIDDEN
GpStatus METAFILE_RestoreGraphics(GpMetafile *metafile, DWORD StackIndex) DECLSPEC_HIDDEN
const struct GpStringFormat default_drawstring_format DECLSPEC_HIDDEN
GpStatus METAFILE_BeginContainerNoParams(GpMetafile *metafile, DWORD StackIndex) DECLSPEC_HIDDEN
GpStatus METAFILE_AddSimpleProperty(GpMetafile *metafile, SHORT prop, SHORT val) DECLSPEC_HIDDEN
GpStatus gdi_transform_acquire(GpGraphics *graphics)
GpStatus METAFILE_DrawPath(GpMetafile *metafile, GpPen *pen, GpPath *path) DECLSPEC_HIDDEN
PixelFormat apply_image_attributes(const GpImageAttributes *attributes, LPBYTE data, UINT width, UINT height, INT stride, ColorAdjustType type, PixelFormat fmt) DECLSPEC_HIDDEN
GpStatus hresult_to_status(HRESULT res) DECLSPEC_HIDDEN
static REAL deg2rad(REAL degrees)
void get_log_fontW(const GpFont *, GpGraphics *, LOGFONTW *) DECLSPEC_HIDDEN
GpStatus encode_image_png(GpImage *image, IStream *stream, GDIPCONST EncoderParameters *params) DECLSPEC_HIDDEN
GpStatus METAFILE_SetWorldTransform(GpMetafile *metafile, GDIPCONST GpMatrix *transform) DECLSPEC_HIDDEN
const char * debugstr_pointf(const PointF *pt) DECLSPEC_HIDDEN
GpStatus METAFILE_FillPath(GpMetafile *metafile, GpBrush *brush, GpPath *path) DECLSPEC_HIDDEN
GpStatus gdi_transform_release(GpGraphics *graphics)
GpStatus METAFILE_GetGraphicsContext(GpMetafile *metafile, GpGraphics **result) DECLSPEC_HIDDEN
INT arc2polybezier(GpPointF *points, REAL x1, REAL y1, REAL x2, REAL y2, REAL startAngle, REAL sweepAngle) DECLSPEC_HIDDEN
GpStatus METAFILE_BeginContainer(GpMetafile *metafile, GDIPCONST GpRectF *dstrect, GDIPCONST GpRectF *srcrect, GpUnit unit, DWORD StackIndex) DECLSPEC_HIDDEN
GpStatus METAFILE_TranslateWorldTransform(GpMetafile *metafile, REAL dx, REAL dy, MatrixOrder order) DECLSPEC_HIDDEN
GpStatus METAFILE_ResetWorldTransform(GpMetafile *metafile) DECLSPEC_HIDDEN
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) DECLSPEC_HIDDEN
GpStatus trace_path(GpGraphics *graphics, GpPath *path) DECLSPEC_HIDDEN
static ARGB color_over_fgpremult(ARGB bg, ARGB fg)
COLORREF ARGB2COLORREF(ARGB color) DECLSPEC_HIDDEN
void METAFILE_Free(GpMetafile *metafile) DECLSPEC_HIDDEN
DWORD write_region_data(const GpRegion *region, void *data) DECLSPEC_HIDDEN
void free_installed_fonts(void) DECLSPEC_HIDDEN
REAL pixels_to_units(REAL pixels, GpUnit unit, REAL dpi) DECLSPEC_HIDDEN
void convert_32bppARGB_to_32bppPARGB(UINT width, UINT height, BYTE *dst_bits, INT dst_stride, const BYTE *src_bits, INT src_stride) DECLSPEC_HIDDEN
GpStatus METAFILE_FillRectangles(GpMetafile *metafile, GpBrush *brush, GDIPCONST GpRectF *rects, INT count) DECLSPEC_HIDDEN
void init_generic_string_formats(void) DECLSPEC_HIDDEN
void calc_curve_bezier(const GpPointF *pts, REAL tension, REAL *x1, REAL *y1, REAL *x2, REAL *y2) DECLSPEC_HIDDEN
const char * debugstr_rectf(const RectF *rc) DECLSPEC_HIDDEN
void free_generic_string_formats(void) DECLSPEC_HIDDEN
GpStatus convert_pixels(INT width, INT height, INT dst_stride, BYTE *dst_bits, PixelFormat dst_format, INT src_stride, const BYTE *src_bits, PixelFormat src_format, ColorPalette *palette) DECLSPEC_HIDDEN
GpStatus METAFILE_EndContainer(GpMetafile *metafile, DWORD StackIndex) DECLSPEC_HIDDEN
ImageAbort DrawImageAbort
GLint GLint GLint GLint GLint x
GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid * pixels
GLuint GLuint GLsizei GLenum type
GLint GLint GLint GLint GLint GLint y
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
GLint GLint GLsizei GLsizei height
GLdouble GLdouble GLdouble r
GLint GLint GLsizei width
GLuint GLenum GLenum transform
GLenum GLenum GLenum GLenum GLenum scale
GLboolean GLboolean GLboolean b
GLenum const GLfloat * params
GLuint GLsizei GLsizei * length
GLuint GLdouble GLdouble GLint GLint order
GLboolean GLboolean GLboolean GLboolean a
GLsizei const GLfloat * points
#define InterlockedCompareExchange
static IPrintDialogCallback callback
static const char * dst_format
static const unsigned char metafile[]
png_const_structrp png_const_inforp int * unit
IWICMetadataReader * metadata_reader
GpFontFamily ** FontFamilies
WCHAR FamilyName[LF_FACESIZE]
INT gdi_transform_acquire_count
PixelOffsetMode pixeloffset
InterpolationMode interpolation
CompositingQuality compqual
TextRenderingHint texthint
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
GpCustomLineCap * customend
GpCustomLineCap * customstart
GpImageAttributes * imageattributes
union emfplus_object::@411 u
GpImageAttributes * image_attributes
union region_element::@412 elementdata
struct region_element * right
struct region_element * left
struct region_element::@412::@413 combine
DWORD WINAPI GetCurrentThreadId(void)
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG y1
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG _In_ LONG y2