#include "objbase.h"
#include "ocidl.h"
+#include "wincodecsdk.h"
#include "wine/list.h"
#include "gdiplus.h"
REAL startAngle, REAL sweepAngle) DECLSPEC_HIDDEN;
extern REAL gdiplus_atan2(REAL dy, REAL dx) DECLSPEC_HIDDEN;
extern GpStatus hresult_to_status(HRESULT res) DECLSPEC_HIDDEN;
-extern REAL convert_unit(REAL logpixels, GpUnit unit) DECLSPEC_HIDDEN;
+extern REAL units_to_pixels(REAL units, GpUnit unit, REAL dpi) DECLSPEC_HIDDEN;
+extern REAL pixels_to_units(REAL pixels, GpUnit unit, REAL dpi) DECLSPEC_HIDDEN;
+extern REAL units_scale(GpUnit from, GpUnit to, REAL dpi) DECLSPEC_HIDDEN;
extern GpStatus graphics_from_image(GpImage *image, GpGraphics **graphics) DECLSPEC_HIDDEN;
extern GpStatus METAFILE_GetDC(GpMetafile* metafile, HDC *hdc) DECLSPEC_HIDDEN;
extern GpStatus METAFILE_ReleaseDC(GpMetafile* metafile, HDC hdc) DECLSPEC_HIDDEN;
extern GpStatus METAFILE_GraphicsDeleted(GpMetafile* metafile) DECLSPEC_HIDDEN;
+extern MetafileType METAFILE_GetEmfType(HENHMETAFILE hemf) DECLSPEC_HIDDEN;
extern void calc_curve_bezier(CONST GpPointF *pts, REAL tension, REAL *x1,
REAL *y1, REAL *x2, REAL *y2) DECLSPEC_HIDDEN;
extern void free_installed_fonts(void) DECLSPEC_HIDDEN;
-extern void get_font_hfont(GpGraphics *graphics, GDIPCONST GpFont *font, HFONT *hfont) DECLSPEC_HIDDEN;
-
extern BOOL lengthen_path(GpPath *path, INT len) DECLSPEC_HIDDEN;
extern GpStatus trace_path(GpGraphics *graphics, GpPath *path) DECLSPEC_HIDDEN;
extern GpStatus get_hatch_data(HatchStyle hatchstyle, const char **result) DECLSPEC_HIDDEN;
-static inline INT roundr(REAL x)
+static inline INT gdip_round(REAL x)
{
return (INT) floorf(x + 0.5);
}
extern 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, ARGB *src_palette) DECLSPEC_HIDDEN;
+ INT src_stride, const BYTE *src_bits, PixelFormat src_format, ColorPalette *palette) DECLSPEC_HIDDEN;
+
+struct GpMatrix{
+ REAL matrix[6];
+};
struct GpPen{
UINT style;
HDC hdc;
HWND hwnd;
BOOL owndc;
+ BOOL alpha_hdc;
GpImage *image;
SmoothingMode smoothing;
CompositingQuality compqual;
TextRenderingHint texthint;
GpUnit unit; /* page unit */
REAL scale; /* page scale */
- GpMatrix * worldtrans; /* world transform */
+ REAL xres, yres;
+ GpMatrix worldtrans; /* world transform */
BOOL busy; /* hdc handle obtained by GdipGetDC */
GpRegion *clip;
UINT textcontrast; /* not used yet. get/set only */
ARGB* pblendcolor; /* preset blend colors */
REAL* pblendpos; /* preset blend positions */
INT pblendcount;
- GpMatrix *transform;
+ GpMatrix transform;
};
struct GpLineGradient{
struct GpTexture{
GpBrush brush;
- GpMatrix *transform;
+ GpMatrix transform;
GpImage *image;
GpImageAttributes *imageattributes;
BYTE *bitmap_bits; /* image bits converted to ARGB and run through imageattributes */
INT datalen; /* size of the arrays in pathdata */
};
-struct GpMatrix{
- REAL matrix[6];
-};
-
struct GpPathIterator{
GpPathData pathdata;
INT subpath_pos; /* for NextSubpath methods */
};
struct GpImage{
- IPicture* picture;
+ IPicture *picture;
+ IStream *stream; /* source stream */
ImageType type;
GUID format;
UINT flags;
- UINT palette_flags;
- UINT palette_count;
- UINT palette_size;
- ARGB *palette_entries;
+ UINT frame_count, current_frame;
+ ColorPalette *palette;
REAL xres, yres;
};
GpUnit unit;
MetafileType metafile_type;
HENHMETAFILE hemf;
+ int preserve_hemf; /* if true, hemf belongs to the app and should not be deleted */
/* recording */
HDC record_dc;
INT stride; /* stride of bits if this is a DIB */
BYTE *own_bits; /* image bits that need to be freed with this object */
INT lockx, locky; /* X and Y coordinates of the rect when a bitmap is locked for writing. */
+ IWICMetadataReader *metadata_reader; /* NULL if there is no metadata */
+ UINT prop_count;
+ PropertyItem *prop_item; /* cached image properties */
};
struct GpCachedBitmap{
REAL *tabs;
CharacterRange *character_ranges;
INT range_count;
+ BOOL generic_typographic;
};
struct GpFontCollection{
GDIPCONST RectF *rect, GDIPCONST GpStringFormat *format,
gdip_format_string_callback callback, void *user_data) DECLSPEC_HIDDEN;
+void get_log_fontW(const GpFont *, GpGraphics *, LOGFONTW *) DECLSPEC_HIDDEN;
+
#endif