From 2bd6a5c42a0d17a867cd46eda531dbf5dd9f3bb6 Mon Sep 17 00:00:00 2001 From: chirsz-ever Date: Mon, 6 Apr 2020 20:08:53 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E6=89=80=E6=9C=89=20gdiplus?= =?UTF-8?q?=20=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ege_head.h | 8 - src/gdiplus3/gdiplus.h | 81 - src/gdiplus3/gdiplusbase.h | 54 - src/gdiplus3/gdiplusbrush.h | 606 ------ src/gdiplus3/gdipluscolor.h | 262 --- src/gdiplus3/gdipluscolormatrix.h | 67 - src/gdiplus3/gdipluseffects.h | 116 -- src/gdiplus3/gdiplusenums.h | 755 ------- src/gdiplus3/gdiplusflat.h | 722 ------- src/gdiplus3/gdiplusgpstubs.h | 139 -- src/gdiplus3/gdiplusgraphics.h | 1540 -------------- src/gdiplus3/gdiplusheaders.h | 581 ------ src/gdiplus3/gdiplusimageattributes.h | 236 --- src/gdiplus3/gdiplusimagecodec.h | 67 - src/gdiplus3/gdiplusimaging.h | 411 ---- src/gdiplus3/gdiplusimpl.h | 1613 --------------- src/gdiplus3/gdiplusinit.h | 74 - src/gdiplus3/gdipluslinecaps.h | 131 -- src/gdiplus3/gdiplusmatrix.h | 240 --- src/gdiplus3/gdiplusmem.h | 42 - src/gdiplus3/gdiplusmetafile.h | 305 --- src/gdiplus3/gdiplusmetaheader.h | 193 -- src/gdiplus3/gdipluspath.h | 964 --------- src/gdiplus3/gdipluspen.h | 338 --- src/gdiplus3/gdipluspixelformats.h | 120 -- src/gdiplus3/gdiplusstringformat.h | 251 --- src/gdiplus3/gdiplustypes.h | 456 ---- src/gdiplus4/gdiplus.h | 86 - src/gdiplus4/gdiplusbase.h | 54 - src/gdiplus4/gdiplusbrush.h | 606 ------ src/gdiplus4/gdipluscolor.h | 262 --- src/gdiplus4/gdipluscolormatrix.h | 67 - src/gdiplus4/gdipluseffects.h | 116 -- src/gdiplus4/gdiplusenums.h | 755 ------- src/gdiplus4/gdiplusflat.h | 722 ------- src/gdiplus4/gdiplusgpstubs.h | 139 -- src/gdiplus4/gdiplusgraphics.h | 1540 -------------- src/gdiplus4/gdiplusheaders.h | 581 ------ src/gdiplus4/gdiplusimageattributes.h | 236 --- src/gdiplus4/gdiplusimagecodec.h | 67 - src/gdiplus4/gdiplusimaging.h | 411 ---- src/gdiplus4/gdiplusimpl.h | 1613 --------------- src/gdiplus4/gdiplusinit.h | 74 - src/gdiplus4/gdipluslinecaps.h | 131 -- src/gdiplus4/gdiplusmatrix.h | 240 --- src/gdiplus4/gdiplusmem.h | 42 - src/gdiplus4/gdiplusmetafile.h | 305 --- src/gdiplus4/gdiplusmetaheader.h | 193 -- src/gdiplus4/gdipluspath.h | 964 --------- src/gdiplus4/gdipluspen.h | 338 --- src/gdiplus4/gdipluspixelformats.h | 120 -- src/gdiplus4/gdiplusstringformat.h | 251 --- src/gdiplus4/gdiplustypes.h | 456 ---- src/includes/GdiPlus.h | 156 -- src/includes/GdiPlusBase.h | 40 - src/includes/GdiPlusBitmap.h | 1004 --------- src/includes/GdiPlusBrush.h | 951 --------- src/includes/GdiPlusCachedBitmap.h | 71 - src/includes/GdiPlusColor.h | 209 -- src/includes/GdiPlusColorMatrix.h | 63 - src/includes/GdiPlusEnums.h | 1252 ----------- src/includes/GdiPlusFlat.h | 2740 ------------------------- src/includes/GdiPlusFont.h | 299 --- src/includes/GdiPlusFontCollection.h | 149 -- src/includes/GdiPlusFontFamily.h | 271 --- src/includes/GdiPlusGpStubs.h | 107 - src/includes/GdiPlusGraphics.h | 2726 ------------------------ src/includes/GdiPlusHeaders.h | 793 ------- src/includes/GdiPlusImageCodec.h | 73 - src/includes/GdiPlusImaging.h | 540 ----- src/includes/GdiPlusInit.h | 99 - src/includes/GdiPlusLineCaps.h | 253 --- src/includes/GdiPlusMatrix.h | 309 --- src/includes/GdiPlusMem.h | 49 - src/includes/GdiPlusMetaFile.h | 374 ---- src/includes/GdiPlusMetaHeader.h | 213 -- src/includes/GdiPlusPath.h | 1686 --------------- src/includes/GdiPlusPen.h | 519 ----- src/includes/GdiPlusPixelFormats.h | 201 -- src/includes/GdiPlusRegion.h | 498 ----- src/includes/GdiPlusStringFormat.h | 381 ---- src/includes/GdiPlusTypes.h | 826 -------- src/includes/GdiPlusimageAttributes.h | 397 ---- src/lib/GdiPlus.lib | Bin 200480 -> 0 bytes src/lib/libgdiplus.a | Bin 493572 -> 0 bytes src/lib/libgdiplus64.a | Bin 497804 -> 0 bytes 86 files changed, 37990 deletions(-) delete mode 100644 src/gdiplus3/gdiplus.h delete mode 100644 src/gdiplus3/gdiplusbase.h delete mode 100644 src/gdiplus3/gdiplusbrush.h delete mode 100644 src/gdiplus3/gdipluscolor.h delete mode 100644 src/gdiplus3/gdipluscolormatrix.h delete mode 100644 src/gdiplus3/gdipluseffects.h delete mode 100644 src/gdiplus3/gdiplusenums.h delete mode 100644 src/gdiplus3/gdiplusflat.h delete mode 100644 src/gdiplus3/gdiplusgpstubs.h delete mode 100644 src/gdiplus3/gdiplusgraphics.h delete mode 100644 src/gdiplus3/gdiplusheaders.h delete mode 100644 src/gdiplus3/gdiplusimageattributes.h delete mode 100644 src/gdiplus3/gdiplusimagecodec.h delete mode 100644 src/gdiplus3/gdiplusimaging.h delete mode 100644 src/gdiplus3/gdiplusimpl.h delete mode 100644 src/gdiplus3/gdiplusinit.h delete mode 100644 src/gdiplus3/gdipluslinecaps.h delete mode 100644 src/gdiplus3/gdiplusmatrix.h delete mode 100644 src/gdiplus3/gdiplusmem.h delete mode 100644 src/gdiplus3/gdiplusmetafile.h delete mode 100644 src/gdiplus3/gdiplusmetaheader.h delete mode 100644 src/gdiplus3/gdipluspath.h delete mode 100644 src/gdiplus3/gdipluspen.h delete mode 100644 src/gdiplus3/gdipluspixelformats.h delete mode 100644 src/gdiplus3/gdiplusstringformat.h delete mode 100644 src/gdiplus3/gdiplustypes.h delete mode 100644 src/gdiplus4/gdiplus.h delete mode 100644 src/gdiplus4/gdiplusbase.h delete mode 100644 src/gdiplus4/gdiplusbrush.h delete mode 100644 src/gdiplus4/gdipluscolor.h delete mode 100644 src/gdiplus4/gdipluscolormatrix.h delete mode 100644 src/gdiplus4/gdipluseffects.h delete mode 100644 src/gdiplus4/gdiplusenums.h delete mode 100644 src/gdiplus4/gdiplusflat.h delete mode 100644 src/gdiplus4/gdiplusgpstubs.h delete mode 100644 src/gdiplus4/gdiplusgraphics.h delete mode 100644 src/gdiplus4/gdiplusheaders.h delete mode 100644 src/gdiplus4/gdiplusimageattributes.h delete mode 100644 src/gdiplus4/gdiplusimagecodec.h delete mode 100644 src/gdiplus4/gdiplusimaging.h delete mode 100644 src/gdiplus4/gdiplusimpl.h delete mode 100644 src/gdiplus4/gdiplusinit.h delete mode 100644 src/gdiplus4/gdipluslinecaps.h delete mode 100644 src/gdiplus4/gdiplusmatrix.h delete mode 100644 src/gdiplus4/gdiplusmem.h delete mode 100644 src/gdiplus4/gdiplusmetafile.h delete mode 100644 src/gdiplus4/gdiplusmetaheader.h delete mode 100644 src/gdiplus4/gdipluspath.h delete mode 100644 src/gdiplus4/gdipluspen.h delete mode 100644 src/gdiplus4/gdipluspixelformats.h delete mode 100644 src/gdiplus4/gdiplusstringformat.h delete mode 100644 src/gdiplus4/gdiplustypes.h delete mode 100644 src/includes/GdiPlus.h delete mode 100644 src/includes/GdiPlusBase.h delete mode 100644 src/includes/GdiPlusBitmap.h delete mode 100644 src/includes/GdiPlusBrush.h delete mode 100644 src/includes/GdiPlusCachedBitmap.h delete mode 100644 src/includes/GdiPlusColor.h delete mode 100644 src/includes/GdiPlusColorMatrix.h delete mode 100644 src/includes/GdiPlusEnums.h delete mode 100644 src/includes/GdiPlusFlat.h delete mode 100644 src/includes/GdiPlusFont.h delete mode 100644 src/includes/GdiPlusFontCollection.h delete mode 100644 src/includes/GdiPlusFontFamily.h delete mode 100644 src/includes/GdiPlusGpStubs.h delete mode 100644 src/includes/GdiPlusGraphics.h delete mode 100644 src/includes/GdiPlusHeaders.h delete mode 100644 src/includes/GdiPlusImageCodec.h delete mode 100644 src/includes/GdiPlusImaging.h delete mode 100644 src/includes/GdiPlusInit.h delete mode 100644 src/includes/GdiPlusLineCaps.h delete mode 100644 src/includes/GdiPlusMatrix.h delete mode 100644 src/includes/GdiPlusMem.h delete mode 100644 src/includes/GdiPlusMetaFile.h delete mode 100644 src/includes/GdiPlusMetaHeader.h delete mode 100644 src/includes/GdiPlusPath.h delete mode 100644 src/includes/GdiPlusPen.h delete mode 100644 src/includes/GdiPlusPixelFormats.h delete mode 100644 src/includes/GdiPlusRegion.h delete mode 100644 src/includes/GdiPlusStringFormat.h delete mode 100644 src/includes/GdiPlusTypes.h delete mode 100644 src/includes/GdiPlusimageAttributes.h delete mode 100644 src/lib/GdiPlus.lib delete mode 100644 src/lib/libgdiplus.a delete mode 100644 src/lib/libgdiplus64.a diff --git a/src/ege_head.h b/src/ege_head.h index 07015f71..09073d50 100644 --- a/src/ege_head.h +++ b/src/ege_head.h @@ -43,15 +43,7 @@ #define EGE_GDIPLUS // ʹÓÃgdi+º¯ÊýÀ©Õ¹ #ifdef EGE_GDIPLUS -#ifdef _MSC_VER # include -#else -# if __GNUC__ == 3 -# include "gdiplus3/gdiplus.h" -# elif __GNUC__ >= 4 -# include "gdiplus4/gdiplus.h" -# endif -#endif #endif #define QUEUE_LEN 1024 diff --git a/src/gdiplus3/gdiplus.h b/src/gdiplus3/gdiplus.h deleted file mode 100644 index 1d7bb4b3..00000000 --- a/src/gdiplus3/gdiplus.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * gdiplus.h - * - * GDI+ main header - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_H -#define __GDIPLUS_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#ifndef RC_INVOKED - -#include -#include -#include -#include - -#include -typedef _COM_interface IStream IStream; -typedef _COM_interface IDirectDrawSurface7 IDirectDrawSurface7; - -#ifdef __cplusplus -namespace Gdiplus { -#endif - -typedef float REAL; -typedef SHORT INT16; -typedef WORD UINT16; - -#include "gdiplusenums.h" -#include "gdiplustypes.h" -#include "gdiplusgpstubs.h" -#include "gdiplusimaging.h" -#include "gdiplusinit.h" -#include "gdiplusmem.h" -#include "gdiplusmetaheader.h" -#include "gdipluspixelformats.h" -#include "gdipluscolor.h" -#include "gdipluscolormatrix.h" -#include "gdiplusflat.h" -#include "gdipluseffects.h" -#include "gdiplusimagecodec.h" - -#ifdef __cplusplus -#include "gdiplusbase.h" -#include "gdiplusheaders.h" -#include "gdiplusimageattributes.h" -#include "gdiplusmatrix.h" -#include "gdiplusbrush.h" -#include "gdiplusmetafile.h" -#include "gdipluspen.h" -#include "gdiplusstringformat.h" -#include "gdipluspath.h" -#include "gdiplusgraphics.h" -#include "gdipluslinecaps.h" -#include "gdiplusimpl.h" - -} /* namespace Gdiplus */ -#endif /* __cplusplus */ - -#endif /* !RC_INVOKED */ - -#endif /* __GDIPLUS_H */ diff --git a/src/gdiplus3/gdiplusbase.h b/src/gdiplus3/gdiplusbase.h deleted file mode 100644 index e0430d1f..00000000 --- a/src/gdiplus3/gdiplusbase.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * gdiplusbase.h - * - * GDI+ base class - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_BASE_H -#define __GDIPLUS_BASE_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#ifndef __cplusplus -#error "A C++ compiler is required to include gdiplusbase.h." -#endif - -class GdiplusBase -{ -public: - static void* operator new(size_t in_size) - { - return DllExports::GdipAlloc(in_size); - } - static void* operator new[](size_t in_size) - { - return DllExports::GdipAlloc(in_size); - } - static void operator delete(void *in_pVoid) - { - DllExports::GdipFree(in_pVoid); - } - static void operator delete[](void *in_pVoid) - { - DllExports::GdipFree(in_pVoid); - } -}; - -#endif /* __GDIPLUS_BASE_H */ diff --git a/src/gdiplus3/gdiplusbrush.h b/src/gdiplus3/gdiplusbrush.h deleted file mode 100644 index 62837059..00000000 --- a/src/gdiplus3/gdiplusbrush.h +++ /dev/null @@ -1,606 +0,0 @@ -/* - * gdiplusbrush.h - * - * GDI+ brush classes - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_BRUSH_H -#define __GDIPLUS_BRUSH_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#ifndef __cplusplus -#error "A C++ compiler is required to include gdiplusbrush.h." -#endif - -class Brush: public GdiplusBase -{ - friend class HatchBrush; - friend class LinearGradientBrush; - friend class PathGradientBrush; - friend class SolidBrush; - friend class TextureBrush; - friend class Graphics; - friend class Pen; - -public: - virtual ~Brush() - { - DllExports::GdipDeleteBrush(nativeBrush); - } - virtual Brush* Clone() const // each subclass must implement this - { - lastStatus = NotImplemented; - return NULL; - } - - Status GetLastStatus() const - { - Status result = lastStatus; - lastStatus = Ok; - return result; - } - BrushType GetType() const - { - BrushType result = BrushTypeSolidColor; - updateStatus(DllExports::GdipGetBrushType(nativeBrush, &result)); - return result; - } - -private: - Brush(): nativeBrush(NULL), lastStatus(Ok) {} - Brush(GpBrush *brush, Status status): - nativeBrush(brush), lastStatus(status) {} - Brush(const Brush& brush); - Brush& operator=(const Brush&); - - Status updateStatus(Status newStatus) const - { - if (newStatus != Ok) lastStatus = newStatus; - return newStatus; - } - - GpBrush *nativeBrush; - mutable Status lastStatus; -}; - -class HatchBrush: public Brush -{ -public: - HatchBrush(HatchStyle hatchStyle, - const Color& foreColor, - const Color& backColor = Color()) - { - GpHatch *nativeHatch = NULL; - lastStatus = DllExports::GdipCreateHatchBrush(hatchStyle, - foreColor.GetValue(), backColor.GetValue(), - &nativeHatch); - nativeBrush = nativeHatch; - } - virtual HatchBrush* Clone() const - { - GpBrush *cloneBrush = NULL; - Status status = updateStatus(DllExports::GdipCloneBrush( - nativeBrush, &cloneBrush)); - if (status == Ok) { - HatchBrush *result = - new HatchBrush(cloneBrush, lastStatus); - if (!result) { - DllExports::GdipDeleteBrush(cloneBrush); - updateStatus(OutOfMemory); - } - return result; - } else { - return NULL; - } - } - - Status GetBackgroundColor(Color *color) const - { - return updateStatus(DllExports::GdipGetHatchBackgroundColor( - (GpHatch*) nativeBrush, - color ? &color->Value : NULL)); - } - Status GetForegroundColor(Color *color) const - { - return updateStatus(DllExports::GdipGetHatchForegroundColor( - (GpHatch*) nativeBrush, - color ? &color->Value : NULL)); - } - HatchStyle GetHatchStyle() const - { - HatchStyle result; - updateStatus(DllExports::GdipGetHatchStyle( - (GpHatch*) nativeBrush, &result)); - return result; - } - -private: - HatchBrush(GpBrush *brush, Status status): Brush(brush, status) {} - HatchBrush(const HatchBrush& brush); - HatchBrush& operator=(const HatchBrush&); -}; - -class LinearGradientBrush: public Brush -{ -public: - LinearGradientBrush(const PointF& point1, const PointF& point2, - const Color& color1, const Color& color2) - { - GpLineGradient *nativeLineGradient = NULL; - lastStatus = DllExports::GdipCreateLineBrush( - &point1, &point2, - color1.GetValue(), color2.GetValue(), - WrapModeTile, &nativeLineGradient); - nativeBrush = nativeLineGradient; - } - LinearGradientBrush(const Point& point1, const Point& point2, - const Color& color1, const Color& color2) - { - GpLineGradient *nativeLineGradient = NULL; - lastStatus = DllExports::GdipCreateLineBrushI( - &point1, &point2, - color1.GetValue(), color2.GetValue(), - WrapModeTile, &nativeLineGradient); - nativeBrush = nativeLineGradient; - } - LinearGradientBrush(const RectF& rect, const Color& color1, - const Color& color2, LinearGradientMode mode) - { - GpLineGradient *nativeLineGradient = NULL; - lastStatus = DllExports::GdipCreateLineBrushFromRect( - &rect, color1.GetValue(), color2.GetValue(), - mode, WrapModeTile, &nativeLineGradient); - nativeBrush = nativeLineGradient; - } - LinearGradientBrush(const Rect& rect, const Color& color1, - const Color& color2, LinearGradientMode mode) - { - GpLineGradient *nativeLineGradient = NULL; - lastStatus = DllExports::GdipCreateLineBrushFromRectI( - &rect, color1.GetValue(), color2.GetValue(), - mode, WrapModeTile, &nativeLineGradient); - nativeBrush = nativeLineGradient; - } - LinearGradientBrush(const RectF& rect, const Color& color1, - const Color& color2, REAL angle, - BOOL isAngleScalable = FALSE) - { - GpLineGradient *nativeLineGradient = NULL; - lastStatus = DllExports::GdipCreateLineBrushFromRectWithAngle( - &rect, color1.GetValue(), color2.GetValue(), - angle, isAngleScalable, WrapModeTile, - &nativeLineGradient); - nativeBrush = nativeLineGradient; - } - LinearGradientBrush(const Rect& rect, const Color& color1, - const Color& color2, REAL angle, - BOOL isAngleScalable = FALSE) - { - GpLineGradient *nativeLineGradient = NULL; - lastStatus = DllExports::GdipCreateLineBrushFromRectWithAngleI( - &rect, color1.GetValue(), color2.GetValue(), - angle, isAngleScalable, WrapModeTile, - &nativeLineGradient); - nativeBrush = nativeLineGradient; - } - virtual LinearGradientBrush* Clone() const - { - GpBrush *cloneBrush = NULL; - Status status = updateStatus(DllExports::GdipCloneBrush( - nativeBrush, &cloneBrush)); - if (status == Ok) { - LinearGradientBrush *result = - new LinearGradientBrush(cloneBrush, lastStatus); - if (!result) { - DllExports::GdipDeleteBrush(cloneBrush); - updateStatus(OutOfMemory); - } - return result; - } else { - return NULL; - } - } - - Status GetBlend(REAL *blendFactors, REAL *blendPositions, - INT count) const - { - return updateStatus(DllExports::GdipGetLineBlend( - (GpLineGradient*) nativeBrush, - blendFactors, blendPositions, count)); - } - INT GetBlendCount() const - { - INT result = 0; - updateStatus(DllExports::GdipGetLineBlendCount( - (GpLineGradient*) nativeBrush, &result)); - return result; - } - BOOL GetGammaCorrection() const - { - BOOL result = FALSE; - updateStatus(DllExports::GdipGetLineGammaCorrection( - (GpLineGradient*) nativeBrush, &result)); - return result; - } - INT GetInterpolationColorCount() const - { - INT result = 0; - updateStatus(DllExports::GdipGetLinePresetBlendCount( - (GpLineGradient*) nativeBrush, &result)); - return result; - } - Status GetInterpolationColors(Color *presetColors, - REAL *blendPositions, INT count) const - { - if (!presetColors || count <= 0) - return lastStatus = InvalidParameter; - - ARGB *presetArgb = - (ARGB*) DllExports::GdipAlloc(count * sizeof(ARGB)); - if (!presetArgb) - return lastStatus = OutOfMemory; - - Status status = updateStatus(DllExports::GdipGetLinePresetBlend( - (GpLineGradient*) nativeBrush, presetArgb, - blendPositions, count)); - for (INT i = 0; i < count; ++i) { - presetColors[i].SetValue(presetArgb[i]); - } - DllExports::GdipFree((void*) presetArgb); - return status; - } - Status GetLinearColors(Color *colors) const - { - if (!colors) return lastStatus = InvalidParameter; - - ARGB colorsArgb[2]; - Status status = updateStatus(DllExports::GdipGetLineColors( - (GpLineGradient*) nativeBrush, colorsArgb)); - colors[0].SetValue(colorsArgb[0]); - colors[1].SetValue(colorsArgb[1]); - return status; - } - Status GetRectangle(RectF *rect) const - { - return updateStatus(DllExports::GdipGetLineRect( - (GpLineGradient*) nativeBrush, rect)); - } - Status GetRectangle(Rect *rect) const - { - return updateStatus(DllExports::GdipGetLineRectI( - (GpLineGradient*) nativeBrush, rect)); - } - Status GetTransform(Matrix *matrix) const - { - return updateStatus(DllExports::GdipGetLineTransform( - (GpLineGradient*) nativeBrush, - matrix ? matrix->nativeMatrix : NULL)); - } - WrapMode GetWrapMode() const - { - WrapMode wrapMode = WrapModeTile; - updateStatus(DllExports::GdipGetLineWrapMode( - (GpLineGradient*) nativeBrush, &wrapMode)); - return wrapMode; - } - Status MultiplyTransform(const Matrix *matrix, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipMultiplyLineTransform( - (GpLineGradient*) nativeBrush, - matrix ? matrix->nativeMatrix : NULL, order)); - } - Status ResetTransform() - { - return updateStatus(DllExports::GdipResetLineTransform( - (GpLineGradient*) nativeBrush)); - } - Status RotateTranform(REAL angle, MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipRotateLineTransform( - (GpLineGradient*) nativeBrush, angle, order)); - } - Status ScaleTransform(REAL sx, REAL sy, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipScaleLineTransform( - (GpLineGradient*) nativeBrush, sx, sy, order)); - } - Status SetBlend(const REAL *blendFactors, - const REAL *blendPositions, INT count) - { - return updateStatus(DllExports::GdipSetLineBlend( - (GpLineGradient*) nativeBrush, - blendFactors, blendPositions, count)); - } - Status SetBlendBellShape(REAL focus, REAL scale = 1.0f) - { - return updateStatus(DllExports::GdipSetLineSigmaBlend( - (GpLineGradient*) nativeBrush, - focus, scale)); - } - Status SetBlendTriangularShape(REAL focus, REAL scale = 1.0f) - { - return updateStatus(DllExports::GdipSetLineLinearBlend( - (GpLineGradient*) nativeBrush, - focus, scale)); - } - Status SetGammaCorrection(BOOL useGammaCorrection) - { - return updateStatus(DllExports::GdipSetLineGammaCorrection( - (GpLineGradient*) nativeBrush, - useGammaCorrection)); - } - Status SetInterpolationColors(const Color *presetColors, - const REAL *blendPositions, INT count) - { - if (!presetColors || count < 0) - return lastStatus = InvalidParameter; - - ARGB *presetArgb = - (ARGB*) DllExports::GdipAlloc(count * sizeof(ARGB)); - if (!presetArgb) - return lastStatus = OutOfMemory; - for (INT i = 0; i < count; ++i) { - presetArgb[i] = presetColors[i].GetValue(); - } - - Status status = updateStatus(DllExports::GdipSetLinePresetBlend( - (GpLineGradient*) nativeBrush, - presetArgb, blendPositions, count)); - DllExports::GdipFree((void*) presetArgb); - return status; - } - Status SetLinearColors(const Color& color1, const Color& color2) - { - return updateStatus(DllExports::GdipSetLineColors( - (GpLineGradient*) nativeBrush, - color1.GetValue(), color2.GetValue())); - } - Status SetTransform(const Matrix *matrix) - { - return updateStatus(DllExports::GdipSetLineTransform( - (GpLineGradient*) nativeBrush, - matrix ? matrix->nativeMatrix : NULL)); - } - Status SetWrapMode(WrapMode wrapMode) - { - return updateStatus(DllExports::GdipSetLineWrapMode( - (GpLineGradient*) nativeBrush, wrapMode)); - } - Status TranslateTransform(REAL dx, REAL dy, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipTranslateLineTransform( - (GpLineGradient*) nativeBrush, dx, dy, order)); - } - -private: - LinearGradientBrush(GpBrush *brush, Status status): Brush(brush, status) {} - LinearGradientBrush(const LinearGradientBrush& brush); - LinearGradientBrush& operator=(const LinearGradientBrush&); -}; - -class SolidBrush: public Brush -{ -public: - SolidBrush(const Color& color) - { - GpSolidFill *nativeSolidFill = NULL; - lastStatus = DllExports::GdipCreateSolidFill( - color.GetValue(), &nativeSolidFill); - nativeBrush = nativeSolidFill; - } - virtual SolidBrush* Clone() const - { - GpBrush *cloneBrush = NULL; - Status status = updateStatus(DllExports::GdipCloneBrush( - nativeBrush, &cloneBrush)); - if (status == Ok) { - SolidBrush *result = - new SolidBrush(cloneBrush, lastStatus); - if (!result) { - DllExports::GdipDeleteBrush(cloneBrush); - updateStatus(OutOfMemory); - } - return result; - } else { - return NULL; - } - } - - Status GetColor(Color *color) const - { - return updateStatus(DllExports::GdipGetSolidFillColor( - (GpSolidFill*) nativeBrush, - color ? &color->Value : NULL)); - } - Status SetColor(const Color& color) - { - return updateStatus(DllExports::GdipSetSolidFillColor( - (GpSolidFill*) nativeBrush, color.GetValue())); - } - -private: - SolidBrush(GpBrush *brush, Status status): Brush(brush, status) {} - SolidBrush(const SolidBrush&); - SolidBrush& operator=(const SolidBrush&); -}; - -class TextureBrush: public Brush -{ -public: - TextureBrush(Image *image, WrapMode wrapMode = WrapModeTile) - { - GpTexture *nativeTexture = NULL; - lastStatus = DllExports::GdipCreateTexture( - image ? image->nativeImage : NULL, - wrapMode, &nativeTexture); - nativeBrush = nativeTexture; - } - TextureBrush(Image *image, WrapMode wrapMode, - REAL dstX, REAL dstY, REAL dstWidth, REAL dstHeight) - { - GpTexture *nativeTexture = NULL; - lastStatus = DllExports::GdipCreateTexture2( - image ? image->nativeImage : NULL, - wrapMode, dstX, dstY, dstWidth, dstHeight, - &nativeTexture); - nativeBrush = nativeTexture; - } - TextureBrush(Image *image, WrapMode wrapMode, - INT dstX, INT dstY, INT dstWidth, INT dstHeight) - { - GpTexture *nativeTexture = NULL; - lastStatus = DllExports::GdipCreateTexture2I( - image ? image->nativeImage : NULL, - wrapMode, dstX, dstY, dstWidth, dstHeight, - &nativeTexture); - nativeBrush = nativeTexture; - } - TextureBrush(Image *image, WrapMode wrapMode, const RectF& dstRect) - { - GpTexture *nativeTexture = NULL; - lastStatus = DllExports::GdipCreateTexture2( - image ? image->nativeImage : NULL, wrapMode, - dstRect.X, dstRect.Y, - dstRect.Width, dstRect.Height, &nativeTexture); - nativeBrush = nativeTexture; - } - TextureBrush(Image *image, WrapMode wrapMode, const Rect& dstRect) - { - GpTexture *nativeTexture = NULL; - lastStatus = DllExports::GdipCreateTexture2I( - image ? image->nativeImage : NULL, wrapMode, - dstRect.X, dstRect.Y, - dstRect.Width, dstRect.Height, &nativeTexture); - nativeBrush = nativeTexture; - } - TextureBrush(Image *image, const RectF& dstRect, - ImageAttributes *imageAttributes = NULL) - { - GpTexture *nativeTexture = NULL; - lastStatus = DllExports::GdipCreateTextureIA( - image ? image->nativeImage : NULL, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL, - dstRect.X, dstRect.Y, - dstRect.Width, dstRect.Height, &nativeTexture); - nativeBrush = nativeTexture; - } - TextureBrush(Image *image, const Rect& dstRect, - ImageAttributes *imageAttributes = NULL) - { - GpTexture *nativeTexture = NULL; - lastStatus = DllExports::GdipCreateTextureIAI( - image ? image->nativeImage : NULL, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL, - dstRect.X, dstRect.Y, - dstRect.Width, dstRect.Height, &nativeTexture); - nativeBrush = nativeTexture; - } - virtual TextureBrush* Clone() const - { - GpBrush *cloneBrush = NULL; - Status status = updateStatus(DllExports::GdipCloneBrush( - nativeBrush, &cloneBrush)); - if (status == Ok) { - TextureBrush *result = - new TextureBrush(cloneBrush, lastStatus); - if (!result) { - DllExports::GdipDeleteBrush(cloneBrush); - updateStatus(OutOfMemory); - } - return result; - } else { - return NULL; - } - } - - //TODO: implement TextureBrush::GetImage() - //Image *GetImage() const - //{ - // // where is the Image allocated (static,member,new,other)? - // // GdipGetTextureImage just returns a GpImage* - // updateStatus(NotImplemented); - // return NULL; - //} - Status GetTransfrom(Matrix *matrix) const - { - return updateStatus(DllExports::GdipGetTextureTransform( - (GpTexture*) nativeBrush, - matrix ? matrix->nativeMatrix : NULL)); - } - WrapMode GetWrapMode() const - { - WrapMode result = WrapModeTile; - updateStatus(DllExports::GdipGetTextureWrapMode( - (GpTexture*) nativeBrush, &result)); - return result; - } - Status MultiplyTransform(const Matrix *matrix, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipMultiplyTextureTransform( - (GpTexture*) nativeBrush, - matrix ? matrix->nativeMatrix : NULL, order)); - } - Status ResetTransform() - { - return updateStatus(DllExports::GdipResetTextureTransform( - (GpTexture*) nativeBrush)); - } - Status RotateTransform(REAL angle, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipRotateTextureTransform( - (GpTexture*) nativeBrush, angle, order)); - } - Status ScaleTransform(REAL sx, REAL sy, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipScaleTextureTransform( - (GpTexture*) nativeBrush, sx, sy, order)); - } - Status SetTransform(const Matrix *matrix) - { - return updateStatus(DllExports::GdipSetTextureTransform( - (GpTexture*) nativeBrush, - matrix ? matrix->nativeMatrix : NULL)); - } - Status SetWrapMode(WrapMode wrapMode) - { - return updateStatus(DllExports::GdipSetTextureWrapMode( - (GpTexture*) nativeBrush, wrapMode)); - } - Status TranslateTransform(REAL dx, REAL dy, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipTranslateTextureTransform( - (GpTexture*) nativeBrush, dx, dy, order)); - } - -private: - TextureBrush(GpBrush *brush, Status status): Brush(brush, status) {} - TextureBrush(const TextureBrush&); - TextureBrush& operator=(const TextureBrush&); -}; - -#endif /* __GDIPLUS_BRUSH_H */ diff --git a/src/gdiplus3/gdipluscolor.h b/src/gdiplus3/gdipluscolor.h deleted file mode 100644 index 9f39e595..00000000 --- a/src/gdiplus3/gdipluscolor.h +++ /dev/null @@ -1,262 +0,0 @@ -/* - * gdipluscolor.h - * - * GDI+ color - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_COLOR_H -#define __GDIPLUS_COLOR_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -typedef enum ColorChannelFlags { - ColorChannelFlagsC = 0, - ColorChannelFlagsM = 1, - ColorChannelFlagsY = 2, - ColorChannelFlagsK = 3, - ColorChannelFlagsLast = 4 -} ColorChannelFlags; - -typedef struct Color -{ - #ifdef __cplusplus - private: - #endif - ARGB Value; - - #ifdef __cplusplus - public: - friend class Bitmap; - friend class Graphics; - friend class HatchBrush; - friend class PathGradientBrush; - friend class Pen; - friend class SolidBrush; - - static ARGB MakeARGB(BYTE a, BYTE r, BYTE g, BYTE b) - { - return (ARGB) ((((DWORD) a) << 24) | (((DWORD) r) << 16) - | (((DWORD) g) << 8) | ((DWORD) b)); - } - - static const ARGB AlphaMask = 0xFF000000UL; - - static const ARGB AliceBlue = 0xFFF0F8FFUL; - static const ARGB AntiqueWhite = 0xFFFAEBD7UL; - static const ARGB Aqua = 0xFF00FFFFUL; - static const ARGB Aquamarine = 0xFF7FFFD4UL; - static const ARGB Azure = 0xFFF0FFFFUL; - static const ARGB Beige = 0xFFF5F5DCUL; - static const ARGB Bisque = 0xFFFFE4C4UL; - static const ARGB Black = 0xFF000000UL; - static const ARGB BlanchedAlmond = 0xFFFFEBCDUL; - static const ARGB Blue = 0xFF0000FFUL; - static const ARGB BlueViolet = 0xFF8A2BE2UL; - static const ARGB Brown = 0xFFA52A2AUL; - static const ARGB BurlyWood = 0xFFDEB887UL; - static const ARGB CadetBlue = 0xFF5F9EA0UL; - static const ARGB Chartreuse = 0xFF7FFF00UL; - static const ARGB Chocolate = 0xFFD2691EUL; - static const ARGB Coral = 0xFFFF7F50UL; - static const ARGB CornflowerBlue = 0xFF6495EDUL; - static const ARGB Cornsilk = 0xFFFFF8DCUL; - static const ARGB Crimson = 0xFFDC143CUL; - static const ARGB Cyan = 0xFF00FFFFUL; - static const ARGB DarkBlue = 0xFF00008BUL; - static const ARGB DarkCyan = 0xFF008B8BUL; - static const ARGB DarkGoldenrod = 0xFFB8860BUL; - static const ARGB DarkGray = 0xFFA9A9A9UL; - static const ARGB DarkGreen = 0xFF006400UL; - static const ARGB DarkKhaki = 0xFFBDB76BUL; - static const ARGB DarkMagenta = 0xFF8B008BUL; - static const ARGB DarkOliveGreen = 0xFF556B2FUL; - static const ARGB DarkOrange = 0xFFFF8C00UL; - static const ARGB DarkOrchid = 0xFF9932CCUL; - static const ARGB DarkRed = 0xFF8B0000UL; - static const ARGB DarkSalmon = 0xFFE9967AUL; - static const ARGB DarkSeaGreen = 0xFF8FBC8FUL; - static const ARGB DarkSlateBlue = 0xFF483D8BUL; - static const ARGB DarkSlateGray = 0xFF2F4F4FUL; - static const ARGB DarkTurquoise = 0xFF00CED1UL; - static const ARGB DarkViolet = 0xFF9400D3UL; - static const ARGB DeepPink = 0xFFFF1493UL; - static const ARGB DeepSkyBlue = 0xFF00BFFFUL; - static const ARGB DimGray = 0xFF696969UL; - static const ARGB DodgerBlue = 0xFF1E90FFUL; - static const ARGB Firebrick = 0xFFB22222UL; - static const ARGB FloralWhite = 0xFFFFFAF0UL; - static const ARGB ForestGreen = 0xFF228B22UL; - static const ARGB Fuchsia = 0xFFFF00FFUL; - static const ARGB Gainsboro = 0xFFDCDCDCUL; - static const ARGB GhostWhite = 0xFFF8F8FFUL; - static const ARGB Gold = 0xFFFFD700UL; - static const ARGB Goldenrod = 0xFFDAA520UL; - static const ARGB Gray = 0xFF808080UL; - static const ARGB Green = 0xFF008000UL; - static const ARGB GreenYellow = 0xFFADFF2FUL; - static const ARGB Honeydew = 0xFFF0FFF0UL; - static const ARGB HotPink = 0xFFFF69B4UL; - static const ARGB IndianRed = 0xFFCD5C5CUL; - static const ARGB Indigo = 0xFF4B0082UL; - static const ARGB Ivory = 0xFFFFFFF0UL; - static const ARGB Khaki = 0xFFF0E68CUL; - static const ARGB Lavender = 0xFFE6E6FAUL; - static const ARGB LavenderBlush = 0xFFFFF0F5UL; - static const ARGB LawnGreen = 0xFF7CFC00UL; - static const ARGB LemonChiffon = 0xFFFFFACDUL; - static const ARGB LightBlue = 0xFFADD8E6UL; - static const ARGB LightCoral = 0xFFF08080UL; - static const ARGB LightCyan = 0xFFE0FFFFUL; - static const ARGB LightGoldenrodYellow = 0xFFFAFAD2UL; - static const ARGB LightGray = 0xFFD3D3D3UL; - static const ARGB LightGreen = 0xFF90EE90UL; - static const ARGB LightPink = 0xFFFFB6C1UL; - static const ARGB LightSalmon = 0xFFFFA07AUL; - static const ARGB LightSeaGreen = 0xFF20B2AAUL; - static const ARGB LightSkyBlue = 0xFF87CEFAUL; - static const ARGB LightSlateGray = 0xFF778899UL; - static const ARGB LightSteelBlue = 0xFFB0C4DEUL; - static const ARGB LightYellow = 0xFFFFFFE0UL; - static const ARGB Lime = 0xFF00FF00UL; - static const ARGB LimeGreen = 0xFF32CD32UL; - static const ARGB Linen = 0xFFFAF0E6UL; - static const ARGB Magenta = 0xFFFF00FFUL; - static const ARGB Maroon = 0xFF800000UL; - static const ARGB MediumAquamarine = 0xFF66CDAAUL; - static const ARGB MediumBlue = 0xFF0000CDUL; - static const ARGB MediumOrchid = 0xFFBA55D3UL; - static const ARGB MediumPurple = 0xFF9370DBUL; - static const ARGB MediumSeaGreen = 0xFF3CB371UL; - static const ARGB MediumSlateBlue = 0xFF7B68EEUL; - static const ARGB MediumSpringGreen = 0xFF00FA9AUL; - static const ARGB MediumTurquoise = 0xFF48D1CCUL; - static const ARGB MediumVioletRed = 0xFFC71585UL; - static const ARGB MidnightBlue = 0xFF191970UL; - static const ARGB MintCream = 0xFFF5FFFAUL; - static const ARGB MistyRose = 0xFFFFE4E1UL; - static const ARGB Moccasin = 0xFFFFE4B5UL; - static const ARGB NavajoWhite = 0xFFFFDEADUL; - static const ARGB Navy = 0xFF000080UL; - static const ARGB OldLace = 0xFFFDF5E6UL; - static const ARGB Olive = 0xFF808000UL; - static const ARGB OliveDrab = 0xFF6B8E23UL; - static const ARGB Orange = 0xFFFFA500UL; - static const ARGB OrangeRed = 0xFFFF4500UL; - static const ARGB Orchid = 0xFFDA70D6UL; - static const ARGB PaleGoldenrod = 0xFFEEE8AAUL; - static const ARGB PaleGreen = 0xFF98FB98UL; - static const ARGB PaleTurquoise = 0xFFAFEEEEUL; - static const ARGB PaleVioletRed = 0xFFDB7093UL; - static const ARGB PapayaWhip = 0xFFFFEFD5UL; - static const ARGB PeachPuff = 0xFFFFDAB9UL; - static const ARGB Peru = 0xFFCD853FUL; - static const ARGB Pink = 0xFFFFC0CBUL; - static const ARGB Plum = 0xFFDDA0DDUL; - static const ARGB PowderBlue = 0xFFB0E0E6UL; - static const ARGB Purple = 0xFF800080UL; - static const ARGB Red = 0xFFFF0000UL; - static const ARGB RosyBrown = 0xFFBC8F8FUL; - static const ARGB RoyalBlue = 0xFF4169E1UL; - static const ARGB SaddleBrown = 0xFF8B4513UL; - static const ARGB Salmon = 0xFFFA8072UL; - static const ARGB SandyBrown = 0xFFF4A460UL; - static const ARGB SeaGreen = 0xFF2E8B57UL; - static const ARGB SeaShell = 0xFFFFF5EEUL; - static const ARGB Sienna = 0xFFA0522DUL; - static const ARGB Silver = 0xFFC0C0C0UL; - static const ARGB SkyBlue = 0xFF87CEEBUL; - static const ARGB SlateBlue = 0xFF6A5ACDUL; - static const ARGB SlateGray = 0xFF708090UL; - static const ARGB Snow = 0xFFFFFAFAUL; - static const ARGB SpringGreen = 0xFF00FF7FUL; - static const ARGB SteelBlue = 0xFF4682B4UL; - static const ARGB Tan = 0xFFD2B48CUL; - static const ARGB Teal = 0xFF008080UL; - static const ARGB Thistle = 0xFFD8BFD8UL; - static const ARGB Tomato = 0xFFFF6347UL; - static const ARGB Transparent = 0x00FFFFFFUL; - static const ARGB Turquoise = 0xFF40E0D0UL; - static const ARGB Violet = 0xFFEE82EEUL; - static const ARGB Wheat = 0xFFF5DEB3UL; - static const ARGB White = 0xFFFFFFFFUL; - static const ARGB WhiteSmoke = 0xFFF5F5F5UL; - static const ARGB Yellow = 0xFFFFFF00UL; - static const ARGB YellowGreen = 0xFF9ACD32UL; - - Color(): Value(0xFF000000) {} - Color(ARGB argb): Value(argb) {} - Color(BYTE r, BYTE g, BYTE b): Value(MakeARGB(0xFF, r, g, b)) {} - Color(BYTE a, BYTE r, BYTE g, BYTE b): Value(MakeARGB(a, r, g, b)) {} - - BYTE GetA() const - { - return (BYTE) (Value >> 24); - } - BYTE GetAlpha() const - { - return (BYTE) (Value >> 24); - } - BYTE GetB() const - { - return (BYTE) Value; - } - BYTE GetBlue() const - { - return (BYTE) Value; - } - BYTE GetG() const - { - return (BYTE) (Value >> 8); - } - BYTE GetGreen() const - { - return (BYTE) (Value >> 8); - } - BYTE GetR() const - { - return (BYTE) (Value >> 16); - } - BYTE GetRed() const - { - return (BYTE) (Value >> 16); - } - ARGB GetValue() const - { - return Value; - } - VOID SetFromCOLORREF(COLORREF rgb) - { - BYTE r = (BYTE) rgb; - BYTE g = (BYTE) (rgb >> 8); - BYTE b = (BYTE) (rgb >> 16); - Value = MakeARGB(0xFF, r, g, b); - } - VOID SetValue(ARGB argb) - { - Value = argb; - } - COLORREF ToCOLORREF() const - { - return RGB(GetRed(), GetGreen(), GetBlue()); - } - #endif /* __cplusplus */ -} Color; - -#endif /* __GDIPLUS_COLOR_H */ diff --git a/src/gdiplus3/gdipluscolormatrix.h b/src/gdiplus3/gdipluscolormatrix.h deleted file mode 100644 index c01113dc..00000000 --- a/src/gdiplus3/gdipluscolormatrix.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * gdipluscolormatrix.h - * - * GDI+ color mappings - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_COLORMATRIX_H -#define __GDIPLUS_COLORMATRIX_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -typedef enum ColorAdjustType { - ColorAdjustTypeDefault = 0, - ColorAdjustTypeBitmap = 1, - ColorAdjustTypeBrush = 2, - ColorAdjustTypePen = 3, - ColorAdjustTypeText = 4, - ColorAdjustTypeCount = 5, - ColorAdjustTypeAny = 6 -} ColorAdjustType; - -typedef enum ColorMatrixFlags { - ColorMatrixFlagsDefault = 0, - ColorMatrixFlagsSkipGrays = 1, - ColorMatrixFlagsAltGray = 2 -} ColorMatrixFlags; - -typedef enum HistogramFormat { - HistogramFormatARGB = 0, - HistogramFormatPARGB = 1, - HistogramFormatRGB = 2, - HistogramFormatGray = 3, - HistogramFormatB = 4, - HistogramFormatG = 5, - HistogramFormatR = 6, - HistogramFormatA = 7 -} HistogramFormat; - -typedef struct ColorMap { - Color oldColor; - Color newColor; -} ColorMap; - -typedef struct ColorMatrix { - REAL m[5][5]; -} ColorMatrix; - -typedef BYTE ColorChannelLUT[256]; - -#endif /* __GDIPLUS_COLORMATRIX_H */ diff --git a/src/gdiplus3/gdipluseffects.h b/src/gdiplus3/gdipluseffects.h deleted file mode 100644 index 7f51aea8..00000000 --- a/src/gdiplus3/gdipluseffects.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - * gdipluseffects.h - * - * GDI+ filters and effects - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_EFFECTS_H -#define __GDIPLUS_EFFECTS_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -typedef enum CurveAdjustments { - AdjustExposure = 0, - AdjustDensity = 1, - AdjustContrast = 2, - AdjustHighlight = 3, - AdjustShadow = 4, - AdjustMidtone = 5, - AdjustWhiteSaturation = 6, - AdjustBlackSaturation = 7 -} CurveAdjustments; - -typedef enum CurveChannel { - CurveChannelAll = 0, - CurveChannelRed = 1, - CurveChannelGreen = 2, - CurveChannelBlue = 3 -} CurveChannel; - -typedef struct BlurParams { - REAL radius; - BOOL expandEdge; -} BlurParams; - -typedef struct BrightnessContrastParams { - INT brightnessLevel; - INT contrastLevel; -} BrightnessContrastParams; - -typedef struct ColorBalanceParams { - INT cyanRed; - INT magentaGreen; - INT yellowBlue; -} ColorBalanceParams; - -typedef struct ColorCurveParams { - CurveAdjustments adjustment; - CurveChannel channel; - INT adjustValue; -} ColorCurveParams; - -typedef struct ColorLUTParams { - ColorChannelLUT lutB; - ColorChannelLUT lutG; - ColorChannelLUT lutR; - ColorChannelLUT lutA; -} ColorLUTParams; - -typedef struct HueSaturationLightnessParams { - INT hueLevel; - INT saturationLevel; - INT lightnessLevel; -} HueSaturationLightnessParams; - -typedef struct LevelsParams { - INT highlight; - INT midtone; - INT shadow; -} LevelsParams; - -typedef struct RedEyeCorrectionParams { - UINT numberOfAreas; - RECT *areas; -} RedEyeCorrectionParams; - -typedef struct SharpenParams { - REAL radius; - REAL amount; -} SharpenParams; - -typedef struct TintParams { - INT hue; - INT amount; -} TintParams; - -extern const GUID BlurEffectGuid; /* ? */ -extern const GUID BrightnessContrastEffectGuid; /* ? */ -extern const GUID ColorBalanceEffectGuid; /* ? */ -extern const GUID ColorCurveEffectGuid; /* ? */ -extern const GUID ColorLUTEffectGuid; /* ? */ -extern const GUID ColorMatrixEffectGuid; /* ? */ -extern const GUID HueSaturationLightnessEffectGuid; /* ? */ -extern const GUID LevelsEffectGuid; /* ? */ -extern const GUID RedEyeCorrectionEffectGuid; /* ? */ -extern const GUID SharpenEffectGuid; /* ? */ -extern const GUID TintEffectGuid; /* ? */ - - -#endif /* __GDIPLUS_EFFECTS_H */ diff --git a/src/gdiplus3/gdiplusenums.h b/src/gdiplus3/gdiplusenums.h deleted file mode 100644 index e4e16563..00000000 --- a/src/gdiplus3/gdiplusenums.h +++ /dev/null @@ -1,755 +0,0 @@ -/* - * gdiplusenums.h - * - * GDI+ enumerations - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_ENUMS_H -#define __GDIPLUS_ENUMS_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -typedef enum BrushType { - BrushTypeSolidColor = 0, - BrushTypeHatchFill = 1, - BrushTypeTextureFill = 2, - BrushTypePathGradient = 3, - BrushTypeLinearGradient = 4 -} BrushType; - -typedef enum CombineMode { - CombineModeReplace = 0, - CombineModeIntersect = 1, - CombineModeUnion = 2, - CombineModeXor = 3, - CombineModeExclude = 4, - CombineModeComplement = 5 -} CombineMode; - -typedef enum CompositingMode { - CompositingModeSourceOver = 0, - CompositingModeSourceCopy = 1 -} CompositingMode; - -typedef enum CompositingQuality { - CompositingQualityDefault = 0, - CompositingQualityHighSpeed = 1, - CompositingQualityHighQuality = 2, - CompositingQualityGammaCorrected = 3, - CompositingQualityAssumeLinear = 4 -} CompositingQuality; - -typedef enum CoordinateSpace { - CoordinateSpaceWorld = 0, - CoordinateSpacePage = 1, - CoordinateSpaceDevice = 2 -} CoordinateSpace; - -typedef enum CustomLineCapType { - CustomLineCapTypeDefault = 0, - CustomLineCapTypeAdjustableArrow = 1 -} CustomLineCapType; - -typedef enum DashCap { - DashCapFlat = 0, - DashCapRound = 2, - DashCapTriangle = 3 -} DashCap; - -typedef enum DashStyle { - DashStyleSolid = 0, - DashStyleDash = 1, - DashStyleDot = 2, - DashStyleDashDot = 3, - DashStyleDashDotDot = 4, - DashStyleCustom = 5 -} DashStyle; - -typedef enum DitherType { - DitherTypeNone = 0, - DitherTypeSolid = 1, - DitherTypeOrdered4x4 = 2, - DitherTypeOrdered8x8 = 3, - DitherTypeOrdered16x16 = 4, - DitherTypeOrdered91x91 = 5, - DitherTypeSpiral4x4 = 6, - DitherTypeSpiral8x8 = 7, - DitherTypeDualSpiral4x4 = 8, - DitherTypeDualSpiral8x8 = 9, - DitherTypeErrorDiffusion = 10 -} DitherType; - -typedef enum DriverStringOptions { - DriverStringOptionsCmapLookup = 1, - DriverStringOptionsVertical = 2, - DriverStringOptionsRealizedAdvance = 4, - DriverStringOptionsLimitSubpixel = 8 -} DriverStringOptions; - -#define GDIP_WMF_RECORD_TO_EMFPLUS(meta) ((meta) | 0x10000) -#define GDIP_EMFPLUS_RECORD_BASE (0x4000) -typedef enum EmfPlusRecordType { - WmfRecordTypeSetBkColor = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETBKCOLOR), - WmfRecordTypeSetBkMode = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETBKMODE), - WmfRecordTypeSetMapMode = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETMAPMODE), - WmfRecordTypeSetROP2 = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETROP2), - WmfRecordTypeSetRelAbs = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETRELABS), - WmfRecordTypeSetPolyFillMode = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETPOLYFILLMODE), - WmfRecordTypeSetStretchBltMode = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETSTRETCHBLTMODE), - WmfRecordTypeSetTextCharExtra = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETTEXTCHAREXTRA), - WmfRecordTypeSetTextColor = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETTEXTCOLOR), - WmfRecordTypeSetTextJustification = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETTEXTJUSTIFICATION), - WmfRecordTypeSetWindowOrg = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETWINDOWORG), - WmfRecordTypeSetWindowExt = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETWINDOWEXT), - WmfRecordTypeSetViewportOrg = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETVIEWPORTORG), - WmfRecordTypeSetViewportExt = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETVIEWPORTEXT), - WmfRecordTypeOffsetWindowOrg = GDIP_WMF_RECORD_TO_EMFPLUS(META_OFFSETWINDOWORG), - WmfRecordTypeScaleWindowExt = GDIP_WMF_RECORD_TO_EMFPLUS(META_SCALEWINDOWEXT), - WmfRecordTypeOffsetViewportOrg = GDIP_WMF_RECORD_TO_EMFPLUS(META_OFFSETVIEWPORTORG), - WmfRecordTypeScaleViewportExt = GDIP_WMF_RECORD_TO_EMFPLUS(META_SCALEVIEWPORTEXT), - WmfRecordTypeLineTo = GDIP_WMF_RECORD_TO_EMFPLUS(META_LINETO), - WmfRecordTypeMoveTo = GDIP_WMF_RECORD_TO_EMFPLUS(META_MOVETO), - WmfRecordTypeExcludeClipRect = GDIP_WMF_RECORD_TO_EMFPLUS(META_EXCLUDECLIPRECT), - WmfRecordTypeIntersectClipRect = GDIP_WMF_RECORD_TO_EMFPLUS(META_INTERSECTCLIPRECT), - WmfRecordTypeArc = GDIP_WMF_RECORD_TO_EMFPLUS(META_ARC), - WmfRecordTypeEllipse = GDIP_WMF_RECORD_TO_EMFPLUS(META_ELLIPSE), - WmfRecordTypeFloodFill = GDIP_WMF_RECORD_TO_EMFPLUS(META_FLOODFILL), - WmfRecordTypePie = GDIP_WMF_RECORD_TO_EMFPLUS(META_PIE), - WmfRecordTypeRectangle = GDIP_WMF_RECORD_TO_EMFPLUS(META_RECTANGLE), - WmfRecordTypeRoundRect = GDIP_WMF_RECORD_TO_EMFPLUS(META_ROUNDRECT), - WmfRecordTypePatBlt = GDIP_WMF_RECORD_TO_EMFPLUS(META_PATBLT), - WmfRecordTypeSaveDC = GDIP_WMF_RECORD_TO_EMFPLUS(META_SAVEDC), - WmfRecordTypeSetPixel = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETPIXEL), - WmfRecordTypeOffsetClipRgn = GDIP_WMF_RECORD_TO_EMFPLUS(META_OFFSETCLIPRGN), - WmfRecordTypeTextOut = GDIP_WMF_RECORD_TO_EMFPLUS(META_TEXTOUT), - WmfRecordTypeBitBlt = GDIP_WMF_RECORD_TO_EMFPLUS(META_BITBLT), - WmfRecordTypeStretchBlt = GDIP_WMF_RECORD_TO_EMFPLUS(META_STRETCHBLT), - WmfRecordTypePolygon = GDIP_WMF_RECORD_TO_EMFPLUS(META_POLYGON), - WmfRecordTypePolyline = GDIP_WMF_RECORD_TO_EMFPLUS(META_POLYLINE), - WmfRecordTypeEscape = GDIP_WMF_RECORD_TO_EMFPLUS(META_ESCAPE), - WmfRecordTypeRestoreDC = GDIP_WMF_RECORD_TO_EMFPLUS(META_RESTOREDC), - WmfRecordTypeFillRegion = GDIP_WMF_RECORD_TO_EMFPLUS(META_FILLREGION), - WmfRecordTypeFrameRegion = GDIP_WMF_RECORD_TO_EMFPLUS(META_FRAMEREGION), - WmfRecordTypeInvertRegion = GDIP_WMF_RECORD_TO_EMFPLUS(META_INVERTREGION), - WmfRecordTypePaintRegion = GDIP_WMF_RECORD_TO_EMFPLUS(META_PAINTREGION), - WmfRecordTypeSelectClipRegion = GDIP_WMF_RECORD_TO_EMFPLUS(META_SELECTCLIPREGION), - WmfRecordTypeSelectObject = GDIP_WMF_RECORD_TO_EMFPLUS(META_SELECTOBJECT), - WmfRecordTypeSetTextAlign = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETTEXTALIGN), - WmfRecordTypeDrawText = GDIP_WMF_RECORD_TO_EMFPLUS(0x062F), - WmfRecordTypeChord = GDIP_WMF_RECORD_TO_EMFPLUS(META_CHORD), - WmfRecordTypeSetMapperFlags = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETMAPPERFLAGS), - WmfRecordTypeExtTextOut = GDIP_WMF_RECORD_TO_EMFPLUS(META_EXTTEXTOUT), - WmfRecordTypeSetDIBToDev = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETDIBTODEV), - WmfRecordTypeSelectPalette = GDIP_WMF_RECORD_TO_EMFPLUS(META_SELECTPALETTE), - WmfRecordTypeRealizePalette = GDIP_WMF_RECORD_TO_EMFPLUS(META_REALIZEPALETTE), - WmfRecordTypeAnimatePalette = GDIP_WMF_RECORD_TO_EMFPLUS(META_ANIMATEPALETTE), - WmfRecordTypeSetPalEntries = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETPALENTRIES), - WmfRecordTypePolyPolygon = GDIP_WMF_RECORD_TO_EMFPLUS(META_POLYPOLYGON), - WmfRecordTypeResizePalette = GDIP_WMF_RECORD_TO_EMFPLUS(META_RESIZEPALETTE), - WmfRecordTypeDIBBitBlt = GDIP_WMF_RECORD_TO_EMFPLUS(META_DIBBITBLT), - WmfRecordTypeDIBStretchBlt = GDIP_WMF_RECORD_TO_EMFPLUS(META_DIBSTRETCHBLT), - WmfRecordTypeDIBCreatePatternBrush = GDIP_WMF_RECORD_TO_EMFPLUS(META_DIBCREATEPATTERNBRUSH), - WmfRecordTypeStretchDIB = GDIP_WMF_RECORD_TO_EMFPLUS(META_STRETCHDIB), - WmfRecordTypeExtFloodFill = GDIP_WMF_RECORD_TO_EMFPLUS(META_EXTFLOODFILL), - WmfRecordTypeSetLayout = GDIP_WMF_RECORD_TO_EMFPLUS(0x0149), - WmfRecordTypeResetDC = GDIP_WMF_RECORD_TO_EMFPLUS(0x014C), - WmfRecordTypeStartDoc = GDIP_WMF_RECORD_TO_EMFPLUS(0x014D), - WmfRecordTypeStartPage = GDIP_WMF_RECORD_TO_EMFPLUS(0x004F), - WmfRecordTypeEndPage = GDIP_WMF_RECORD_TO_EMFPLUS(0x0050), - WmfRecordTypeAbortDoc = GDIP_WMF_RECORD_TO_EMFPLUS(0x0052), - WmfRecordTypeEndDoc = GDIP_WMF_RECORD_TO_EMFPLUS(0x005E), - WmfRecordTypeDeleteObject = GDIP_WMF_RECORD_TO_EMFPLUS(META_DELETEOBJECT), - WmfRecordTypeCreatePalette = GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEPALETTE), - WmfRecordTypeCreateBrush = GDIP_WMF_RECORD_TO_EMFPLUS(0x00F8), - WmfRecordTypeCreatePatternBrush = GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEPATTERNBRUSH), - WmfRecordTypeCreatePenIndirect = GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEPENINDIRECT), - WmfRecordTypeCreateFontIndirect = GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEFONTINDIRECT), - WmfRecordTypeCreateBrushIndirect = GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEBRUSHINDIRECT), - WmfRecordTypeCreateBitmapIndirect = GDIP_WMF_RECORD_TO_EMFPLUS(0x02FD), - WmfRecordTypeCreateBitmap = GDIP_WMF_RECORD_TO_EMFPLUS(0x06FE), - WmfRecordTypeCreateRegion = GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEREGION), - EmfRecordTypeHeader = EMR_HEADER, - EmfRecordTypePolyBezier = EMR_POLYBEZIER, - EmfRecordTypePolygon = EMR_POLYGON, - EmfRecordTypePolyline = EMR_POLYLINE, - EmfRecordTypePolyBezierTo = EMR_POLYBEZIERTO, - EmfRecordTypePolyLineTo = EMR_POLYLINETO, - EmfRecordTypePolyPolyline = EMR_POLYPOLYLINE, - EmfRecordTypePolyPolygon = EMR_POLYPOLYGON, - EmfRecordTypeSetWindowExtEx = EMR_SETWINDOWEXTEX, - EmfRecordTypeSetWindowOrgEx = EMR_SETWINDOWORGEX, - EmfRecordTypeSetViewportExtEx = EMR_SETVIEWPORTEXTEX, - EmfRecordTypeSetViewportOrgEx = EMR_SETVIEWPORTORGEX, - EmfRecordTypeSetBrushOrgEx = EMR_SETBRUSHORGEX, - EmfRecordTypeEOF = EMR_EOF, - EmfRecordTypeSetPixelV = EMR_SETPIXELV, - EmfRecordTypeSetMapperFlags = EMR_SETMAPPERFLAGS, - EmfRecordTypeSetMapMode = EMR_SETMAPMODE, - EmfRecordTypeSetBkMode = EMR_SETBKMODE, - EmfRecordTypeSetPolyFillMode = EMR_SETPOLYFILLMODE, - EmfRecordTypeSetROP2 = EMR_SETROP2, - EmfRecordTypeSetStretchBltMode = EMR_SETSTRETCHBLTMODE, - EmfRecordTypeSetTextAlign = EMR_SETTEXTALIGN, - EmfRecordTypeSetColorAdjustment = EMR_SETCOLORADJUSTMENT, - EmfRecordTypeSetTextColor = EMR_SETTEXTCOLOR, - EmfRecordTypeSetBkColor = EMR_SETBKCOLOR, - EmfRecordTypeOffsetClipRgn = EMR_OFFSETCLIPRGN, - EmfRecordTypeMoveToEx = EMR_MOVETOEX, - EmfRecordTypeSetMetaRgn = EMR_SETMETARGN, - EmfRecordTypeExcludeClipRect = EMR_EXCLUDECLIPRECT, - EmfRecordTypeIntersectClipRect = EMR_INTERSECTCLIPRECT, - EmfRecordTypeScaleViewportExtEx = EMR_SCALEVIEWPORTEXTEX, - EmfRecordTypeScaleWindowExtEx = EMR_SCALEWINDOWEXTEX, - EmfRecordTypeSaveDC = EMR_SAVEDC, - EmfRecordTypeRestoreDC = EMR_RESTOREDC, - EmfRecordTypeSetWorldTransform = EMR_SETWORLDTRANSFORM, - EmfRecordTypeModifyWorldTransform = EMR_MODIFYWORLDTRANSFORM, - EmfRecordTypeSelectObject = EMR_SELECTOBJECT, - EmfRecordTypeCreatePen = EMR_CREATEPEN, - EmfRecordTypeCreateBrushIndirect = EMR_CREATEBRUSHINDIRECT, - EmfRecordTypeDeleteObject = EMR_DELETEOBJECT, - EmfRecordTypeAngleArc = EMR_ANGLEARC, - EmfRecordTypeEllipse = EMR_ELLIPSE, - EmfRecordTypeRectangle = EMR_RECTANGLE, - EmfRecordTypeRoundRect = EMR_ROUNDRECT, - EmfRecordTypeArc = EMR_ARC, - EmfRecordTypeChord = EMR_CHORD, - EmfRecordTypePie = EMR_PIE, - EmfRecordTypeSelectPalette = EMR_SELECTPALETTE, - EmfRecordTypeCreatePalette = EMR_CREATEPALETTE, - EmfRecordTypeSetPaletteEntries = EMR_SETPALETTEENTRIES, - EmfRecordTypeResizePalette = EMR_RESIZEPALETTE, - EmfRecordTypeRealizePalette = EMR_REALIZEPALETTE, - EmfRecordTypeExtFloodFill = EMR_EXTFLOODFILL, - EmfRecordTypeLineTo = EMR_LINETO, - EmfRecordTypeArcTo = EMR_ARCTO, - EmfRecordTypePolyDraw = EMR_POLYDRAW, - EmfRecordTypeSetArcDirection = EMR_SETARCDIRECTION, - EmfRecordTypeSetMiterLimit = EMR_SETMITERLIMIT, - EmfRecordTypeBeginPath = EMR_BEGINPATH, - EmfRecordTypeEndPath = EMR_ENDPATH, - EmfRecordTypeCloseFigure = EMR_CLOSEFIGURE, - EmfRecordTypeFillPath = EMR_FILLPATH, - EmfRecordTypeStrokeAndFillPath = EMR_STROKEANDFILLPATH, - EmfRecordTypeStrokePath = EMR_STROKEPATH, - EmfRecordTypeFlattenPath = EMR_FLATTENPATH, - EmfRecordTypeWidenPath = EMR_WIDENPATH, - EmfRecordTypeSelectClipPath = EMR_SELECTCLIPPATH, - EmfRecordTypeAbortPath = EMR_ABORTPATH, - EmfRecordTypeReserved_069 = 69, - EmfRecordTypeGdiComment = EMR_GDICOMMENT, - EmfRecordTypeFillRgn = EMR_FILLRGN, - EmfRecordTypeFrameRgn = EMR_FRAMERGN, - EmfRecordTypeInvertRgn = EMR_INVERTRGN, - EmfRecordTypePaintRgn = EMR_PAINTRGN, - EmfRecordTypeExtSelectClipRgn = EMR_EXTSELECTCLIPRGN, - EmfRecordTypeBitBlt = EMR_BITBLT, - EmfRecordTypeStretchBlt = EMR_STRETCHBLT, - EmfRecordTypeMaskBlt = EMR_MASKBLT, - EmfRecordTypePlgBlt = EMR_PLGBLT, - EmfRecordTypeSetDIBitsToDevice = EMR_SETDIBITSTODEVICE, - EmfRecordTypeStretchDIBits = EMR_STRETCHDIBITS, - EmfRecordTypeExtCreateFontIndirect = EMR_EXTCREATEFONTINDIRECTW, - EmfRecordTypeExtTextOutA = EMR_EXTTEXTOUTA, - EmfRecordTypeExtTextOutW = EMR_EXTTEXTOUTW, - EmfRecordTypePolyBezier16 = EMR_POLYBEZIER16, - EmfRecordTypePolygon16 = EMR_POLYGON16, - EmfRecordTypePolyline16 = EMR_POLYLINE16, - EmfRecordTypePolyBezierTo16 = EMR_POLYBEZIERTO16, - EmfRecordTypePolylineTo16 = EMR_POLYLINETO16, - EmfRecordTypePolyPolyline16 = EMR_POLYPOLYLINE16, - EmfRecordTypePolyPolygon16 = EMR_POLYPOLYGON16, - EmfRecordTypePolyDraw16 = EMR_POLYDRAW16, - EmfRecordTypeCreateMonoBrush = EMR_CREATEMONOBRUSH, - EmfRecordTypeCreateDIBPatternBrushPt = EMR_CREATEDIBPATTERNBRUSHPT, - EmfRecordTypeExtCreatePen = EMR_EXTCREATEPEN, - EmfRecordTypePolyTextOutA = EMR_POLYTEXTOUTA, - EmfRecordTypePolyTextOutW = EMR_POLYTEXTOUTW, - EmfRecordTypeSetICMMode = 98, - EmfRecordTypeCreateColorSpace = 99, - EmfRecordTypeSetColorSpace = 100, - EmfRecordTypeDeleteColorSpace = 101, - EmfRecordTypeGLSRecord = 102, - EmfRecordTypeGLSBoundedRecord = 103, - EmfRecordTypePixelFormat = 104, - EmfRecordTypeDrawEscape = 105, - EmfRecordTypeExtEscape = 106, - EmfRecordTypeStartDoc = 107, - EmfRecordTypeSmallTextOut = 108, - EmfRecordTypeForceUFIMapping = 109, - EmfRecordTypeNamedEscape = 110, - EmfRecordTypeColorCorrectPalette = 111, - EmfRecordTypeSetICMProfileA = 112, - EmfRecordTypeSetICMProfileW = 113, - EmfRecordTypeAlphaBlend = 114, - EmfRecordTypeSetLayout = 115, - EmfRecordTypeTransparentBlt = 116, - EmfRecordTypeReserved_117 = 117, - EmfRecordTypeGradientFill = 118, - EmfRecordTypeSetLinkedUFIs = 119, - EmfRecordTypeSetTextJustification = 120, - EmfRecordTypeColorMatchToTargetW = 121, - EmfRecordTypeCreateColorSpaceW = 122, - EmfRecordTypeMax = 122, - EmfRecordTypeMin = 1, - EmfPlusRecordTypeInvalid = GDIP_EMFPLUS_RECORD_BASE, - EmfPlusRecordTypeHeader, - EmfPlusRecordTypeEndOfFile, - EmfPlusRecordTypeComment, - EmfPlusRecordTypeGetDC, - EmfPlusRecordTypeMultiFormatStart, - EmfPlusRecordTypeMultiFormatSection, - EmfPlusRecordTypeMultiFormatEnd, - EmfPlusRecordTypeObject, - EmfPlusRecordTypeClear, - EmfPlusRecordTypeFillRects, - EmfPlusRecordTypeDrawRects, - EmfPlusRecordTypeFillPolygon, - EmfPlusRecordTypeDrawLines, - EmfPlusRecordTypeFillEllipse, - EmfPlusRecordTypeDrawEllipse, - EmfPlusRecordTypeFillPie, - EmfPlusRecordTypeDrawPie, - EmfPlusRecordTypeDrawArc, - EmfPlusRecordTypeFillRegion, - EmfPlusRecordTypeFillPath, - EmfPlusRecordTypeDrawPath, - EmfPlusRecordTypeFillClosedCurve, - EmfPlusRecordTypeDrawClosedCurve, - EmfPlusRecordTypeDrawCurve, - EmfPlusRecordTypeDrawBeziers, - EmfPlusRecordTypeDrawImage, - EmfPlusRecordTypeDrawImagePoints, - EmfPlusRecordTypeDrawString, - EmfPlusRecordTypeSetRenderingOrigin, - EmfPlusRecordTypeSetAntiAliasMode, - EmfPlusRecordTypeSetTextRenderingHint, - EmfPlusRecordTypeSetTextContrast, - EmfPlusRecordTypeSetGammaValue, - EmfPlusRecordTypeSetInterpolationMode, - EmfPlusRecordTypeSetPixelOffsetMode, - EmfPlusRecordTypeSetCompositingMode, - EmfPlusRecordTypeSetCompositingQuality, - EmfPlusRecordTypeSave, - EmfPlusRecordTypeRestore, - EmfPlusRecordTypeBeginContainer, - EmfPlusRecordTypeBeginContainerNoParams, - EmfPlusRecordTypeEndContainer, - EmfPlusRecordTypeSetWorldTransform, - EmfPlusRecordTypeResetWorldTransform, - EmfPlusRecordTypeMultiplyWorldTransform, - EmfPlusRecordTypeTranslateWorldTransform, - EmfPlusRecordTypeScaleWorldTransform, - EmfPlusRecordTypeRotateWorldTransform, - EmfPlusRecordTypeSetPageTransform, - EmfPlusRecordTypeResetClip, - EmfPlusRecordTypeSetClipRect, - EmfPlusRecordTypeSetClipPath, - EmfPlusRecordTypeSetClipRegion, - EmfPlusRecordTypeOffsetClip, - EmfPlusRecordTypeDrawDriverString, - EmfPlusRecordTypeStrokeFillPath, - EmfPlusRecordTypeSerializableObject, - EmfPlusRecordTypeSetTSGraphics, - EmfPlusRecordTypeSetTSClip, - EmfPlusRecordTotal, - EmfPlusRecordTypeMax = EmfPlusRecordTotal-1, - EmfPlusRecordTypeMin = EmfPlusRecordTypeHeader -} EmfPlusRecordType; - -typedef enum EmfToWmfBitsFlags { - EmfToWmfBitsFlagsDefault = 0, - EmfToWmfBitsFlagsEmbedEmf = 1, - EmfToWmfBitsFlagsIncludePlaceable = 2, - EmfToWmfBitsFlagsNoXORClip = 4 -} EmfToWmfBitsFlags; - -typedef enum EmfType { - EmfTypeEmfOnly = 3, - EmfTypeEmfPlusOnly = 4, - EmfTypeEmfPlusDual = 5 -} EmfType; - -typedef enum EncoderParameterValueType { - EncoderParameterValueTypeByte = 1, - EncoderParameterValueTypeASCII = 2, - EncoderParameterValueTypeShort = 3, - EncoderParameterValueTypeLong = 4, - EncoderParameterValueTypeRational = 5, - EncoderParameterValueTypeLongRange = 6, - EncoderParameterValueTypeUndefined = 7, - EncoderParameterValueTypeRationalRange = 8, - EncoderParameterValueTypePointer = 9 -} EncoderParameterValueType; - -typedef enum EncoderValue { - EncoderValueColorTypeCMYK = 0, - EncoderValueColorTypeYCCK = 1, - EncoderValueCompressionLZW = 2, - EncoderValueCompressionCCITT3 = 3, - EncoderValueCompressionCCITT4 = 4, - EncoderValueCompressionRle = 5, - EncoderValueCompressionNone = 6, - EncoderValueScanMethodInterlaced = 7, - EncoderValueScanMethodNonInterlaced = 8, - EncoderValueVersionGif87 = 9, - EncoderValueVersionGif89 = 10, - EncoderValueRenderProgressive = 11, - EncoderValueRenderNonProgressive = 12, - EncoderValueTransformRotate90 = 13, - EncoderValueTransformRotate180 = 14, - EncoderValueTransformRotate270 = 15, - EncoderValueTransformFlipHorizontal = 16, - EncoderValueTransformFlipVertical = 17, - EncoderValueMultiFrame = 18, - EncoderValueLastFrame = 19, - EncoderValueFlush = 20, - EncoderValueFrameDimensionTime = 21, - EncoderValueFrameDimensionResolution = 22, - EncoderValueFrameDimensionPage = 23 -} EncoderValue; - -typedef enum FillMode { - FillModeAlternate = 0, - FillModeWinding = 1 -} FillMode; - -typedef enum FlushIntention { - FlushIntentionFlush = 0, - FlushIntentionSync = 1 -} FlushIntention; - -typedef enum FontStyle { - FontStyleRegular = 0, - FontStyleBold = 1, - FontStyleItalic = 2, - FontStyleBoldItalic = 3, - FontStyleUnderline = 4, - FontStyleStrikeout = 8 -} FontStyle; - -typedef enum HatchStyle { - HatchStyleHorizontal = 0, - HatchStyleVertical = 1, - HatchStyleForwardDiagonal = 2, - HatchStyleBackwardDiagonal = 3, - HatchStyleCross = 4, - HatchStyleLargeGrid = 4, - HatchStyleDiagonalCross = 5, - HatchStyle05Percent = 6, - HatchStyle10Percent = 7, - HatchStyle20Percent = 8, - HatchStyle25Percent = 9, - HatchStyle30Percent = 10, - HatchStyle40Percent = 11, - HatchStyle50Percent = 12, - HatchStyle60Percent = 13, - HatchStyle70Percent = 14, - HatchStyle75Percent = 15, - HatchStyle80Percent = 16, - HatchStyle90Percent = 17, - HatchStyleLightDownwardDiagonal = 18, - HatchStyleLightUpwardDiagonal = 19, - HatchStyleDarkDownwardDiagonal = 20, - HatchStyleDarkUpwardDiagonal = 21, - HatchStyleWideDownwardDiagonal = 22, - HatchStyleWideUpwardDiagonal = 23, - HatchStyleLightVertical = 24, - HatchStyleLightHorizontal = 25, - HatchStyleNarrowVertical = 26, - HatchStyleNarrowHorizontal = 27, - HatchStyleDarkVertical = 28, - HatchStyleDarkHorizontal = 29, - HatchStyleDashedDownwardDiagonal = 30, - HatchStyleDashedUpwardDiagonal = 31, - HatchStyleDashedHorizontal = 32, - HatchStyleDashedVertical = 33, - HatchStyleSmallConfetti = 34, - HatchStyleLargeConfetti = 35, - HatchStyleZigZag = 36, - HatchStyleWave = 37, - HatchStyleDiagonalBrick = 38, - HatchStyleHorizontalBrick = 39, - HatchStyleWeave = 40, - HatchStylePlaid = 41, - HatchStyleDivot = 42, - HatchStyleDottedGrid = 43, - HatchStyleDottedDiamond = 44, - HatchStyleShingle = 45, - HatchStyleTrellis = 46, - HatchStyleSphere = 47, - HatchStyleSmallGrid = 48, - HatchStyleSmallCheckerBoard = 49, - HatchStyleLargeCheckerBoard = 50, - HatchStyleOutlinedDiamond = 51, - HatchStyleSolidDiamond = 52, - HatchStyleTotal = 53, - HatchStyleMin = HatchStyleHorizontal, - HatchStyleMax = HatchStyleTotal - 1 -} HatchStyle; - -typedef enum HotkeyPrefix { - HotkeyPrefixNone = 0, - HotkeyPrefixShow = 1, - HotkeyPrefixHide = 2 -} HotkeyPrefix; - -typedef enum ImageType { - ImageTypeUnknown = 0, - ImageTypeBitmap = 1, - ImageTypeMetafile = 2 -} ImageType; - -/* TODO: InterpolationMode */ -typedef enum InterpolationMode { - /*InterpolationModeInvalid = QualityModeInvalid,*/ - InterpolationModeDefault = 0, - InterpolationModeLowQuality = 1, - InterpolationModeHighQuality = 2, - InterpolationModeBilinear = 3, - InterpolationModeBicubic = 4, - InterpolationModeNearestNeighbor = 5, - InterpolationModeHighQualityBilinear = 6, - InterpolationModeHighQualityBicubic = 7 -} InterpolationMode; - -typedef enum LinearGradientMode { - LinearGradientModeHorizontal = 0, - LinearGradientModeVertical = 1, - LinearGradientModeForwardDiagonal = 2, - LinearGradientModeBackwardDiagonal = 3 -} LinearGradientMode; - -typedef enum LineCap { - LineCapFlat = 0, - LineCapSquare = 1, - LineCapRound = 2, - LineCapTriangle = 3, - LineCapNoAnchor = 16, - LineCapSquareAnchor = 17, - LineCapRoundAnchor = 18, - LineCapDiamondAnchor = 19, - LineCapArrowAnchor = 20, - LineCapCustom = 255 -} LineCap; - -typedef enum LineJoin { - LineJoinMiter = 0, - LineJoinBevel = 1, - LineJoinRound = 2, - LineJoinMiterClipped = 3 -} LineJoin; - -typedef enum MatrixOrder { - MatrixOrderPrepend = 0, - MatrixOrderAppend = 1 -} MatrixOrder; - -typedef enum MetafileFrameUnit { - MetafileFrameUnitPixel = 2, - MetafileFrameUnitPoint = 3, - MetafileFrameUnitInch = 4, - MetafileFrameUnitDocument = 5, - MetafileFrameUnitMillimeter = 6, - MetafileFrameUnitGdi = 7 -} MetafileFrameUnit; - -typedef enum MetafileType { - MetafileTypeInvalid = 0, - MetafileTypeWmf = 1, - MetafileTypeWmfPlaceable = 2, - MetafileTypeEmf = 3, - MetafileTypeEmfPlusOnly = 4, - MetafileTypeEmfPlusDual = 5 -} MetafileType; - -typedef enum ObjectType { - ObjectTypeInvalid = 0, - ObjectTypeBrush = 1, - ObjectTypePen = 2, - ObjectTypePath = 3, - ObjectTypeRegion = 4, - ObjectTypeFont = 5, - ObjectTypeStringFormat = 6, - ObjectTypeImageAttributes = 7, - ObjectTypeCustomLineCap = 8, - ObjectTypeGraphics = 9, - ObjectTypeMin = ObjectTypeBrush, - ObjectTypeMax = ObjectTypeGraphics -} ObjectType; - -typedef enum PathPointType { - PathPointTypeStart = 0x00, - PathPointTypeLine = 0x01, - PathPointTypeBezier = 0x03, - PathPointTypeBezier3 = 0x03, - PathPointTypePathTypeMask = 0x07, - PathPointTypePathDashMode = 0x10, - PathPointTypePathMarker = 0x20, - PathPointTypeCloseSubpath = 0x80 -} PathPointType; - -typedef enum PenAlignment { - PenAlignmentCenter = 0, - PenAlignmentInset = 1 -} PenAlignment; - -typedef enum PenType { - PenTypeUnknown = -1, - PenTypeSolidColor = 0, - PenTypeHatchFill = 1, - PenTypeTextureFill = 2, - PenTypePathGradient = 3, - PenTypeLinearGradient = 4 -} PenType; - -/* TODO: PixelOffsetMode */ -typedef enum PixelOffsetMode { - /*PixelOffsetModeInvalid = QualityModeInvalid,*/ - PixelOffsetModeDefault = 0, - PixelOffsetModeHighSpeed = 1, - PixelOffsetModeHighQuality = 2, - PixelOffsetModeNone = 3, - PixelOffsetModeHalf = 4 -} PixelOffsetMode; - -/* TODO: QualityMode */ -typedef enum QualityMode { - /*QualityModeInvalid = ?,*/ - QualityModeDefault = 0, - QualityModeLow = 1, - QualityModeHigh = 2 -} QualityMode; - -/* TODO: SmoothingMode */ -typedef enum SmoothingMode { - /*SmoothingModeInvalid = QualityModeInvalid,*/ - SmoothingModeDefault = 0, - SmoothingModeHighSpeed = 1, - SmoothingModeHighQuality = 2, - SmoothingModeNone = 3, - SmoothingModeAntiAlias8x4 = 4, - SmoothingModeAntiAlias = 4, - SmoothingModeAntiAlias8x8 = 5 -} SmoothingMode; - -typedef enum StringAlignment { - StringAlignmentNear = 0, - StringAlignmentCenter = 1, - StringAlignmentFar = 2 -} StringAlignment; - -typedef enum StringDigitSubstitute { - StringDigitSubstituteUser = 0, - StringDigitSubstituteNone = 1, - StringDigitSubstituteNational = 2, - StringDigitSubstituteTraditional = 3 -} StringDigitSubstitute; - -typedef enum StringFormatFlags { - StringFormatFlagsDirectionRightToLeft = 0x00000001, - StringFormatFlagsDirectionVertical = 0x00000002, - StringFormatFlagsNoFitBlackBox = 0x00000004, - StringFormatFlagsDisplayFormatControl = 0x00000020, - StringFormatFlagsNoFontFallback = 0x00000400, - StringFormatFlagsMeasureTrailingSpaces = 0x00000800, - StringFormatFlagsNoWrap = 0x00001000, - StringFormatFlagsLineLimit = 0x00002000, - StringFormatFlagsNoClip = 0x00004000 -} StringFormatFlags; - -typedef enum StringTrimming { - StringTrimmingNone = 0, - StringTrimmingCharacter = 1, - StringTrimmingWord = 2, - StringTrimmingEllipsisCharacter = 3, - StringTrimmingEllipsisWord = 4, - StringTrimmingEllipsisPath = 5 -} StringTrimming; - -typedef enum TextRenderingHint { - TextRenderingHintSystemDefault = 0, - TextRenderingHintSingleBitPerPixelGridFit = 1, - TextRenderingHintSingleBitPerPixel = 2, - TextRenderingHintAntiAliasGridFit = 3, - TextRenderingHintAntiAlias = 4, - TextRenderingHintClearTypeGridFit = 5 -} TextRenderingHint; - -typedef enum Unit { - UnitWorld = 0, - UnitDisplay = 1, - UnitPixel = 2, - UnitPoint = 3, - UnitInch = 4, - UnitDocument = 5, - UnitMillimeter = 6 -} Unit; - -typedef enum WarpMode { - WarpModePerspective = 0, - WarpModeBilinear = 1 -} WarpMode; - -typedef enum WrapMode { - WrapModeTile = 0, - WrapModeTileFlipX = 1, - WrapModeTileFlipY = 2, - WrapModeTileFlipXY = 3, - WrapModeClamp = 4 -} WrapMode; - -typedef enum GpTestControlEnum { - TestControlForceBilinear = 0, - TestControlForceNoICM = 1, - TestControlGetBuildNumber = 2 -} GpTestControlEnum; - -/* Opaque handles to information blocks on an internal GDI+ stack. */ -typedef DWORD GraphicsContainer; -typedef DWORD GraphicsState; - -/* Default flatness for GraphicsPath methods Flatten, Outline, Warp, Widen */ -/* FIXME: Is FlatnessDefault = 0.25f correct? */ -#ifdef __cplusplus -const REAL FlatnessDefault = 0.25f; -#else -#define FlatnessDefault ((REAL) 0.25f) -#endif - -static __inline__ BOOL ObjectTypeIsValid(ObjectType type) -{ - switch (type) { - case ObjectTypeBrush: - case ObjectTypePen: - case ObjectTypePath: - case ObjectTypeRegion: - case ObjectTypeFont: - case ObjectTypeStringFormat: - case ObjectTypeImageAttributes: - case ObjectTypeCustomLineCap: - case ObjectTypeGraphics: - return TRUE; - default: - return FALSE; - } -} - -#endif /* __GDIPLUS_ENUMS_H */ diff --git a/src/gdiplus3/gdiplusflat.h b/src/gdiplus3/gdiplusflat.h deleted file mode 100644 index 57478340..00000000 --- a/src/gdiplus3/gdiplusflat.h +++ /dev/null @@ -1,722 +0,0 @@ -/* - * gdiplusflat.h - * - * GDI+ Flat API - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_FLAT_H -#define __GDIPLUS_FLAT_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#ifdef __cplusplus -namespace DllExports { -extern "C" { -#endif - -/* AdjustableArrowCap functions */ -GpStatus WINGDIPAPI GdipCreateAdjustableArrowCap(REAL,REAL,BOOL,GpAdjustableArrowCap**); -GpStatus WINGDIPAPI GdipSetAdjustableArrowCapHeight(GpAdjustableArrowCap*,REAL); -GpStatus WINGDIPAPI GdipGetAdjustableArrowCapHeight(GpAdjustableArrowCap*,REAL*); -GpStatus WINGDIPAPI GdipSetAdjustableArrowCapWidth(GpAdjustableArrowCap*,REAL); -GpStatus WINGDIPAPI GdipGetAdjustableArrowCapWidth(GpAdjustableArrowCap*,REAL*); -GpStatus WINGDIPAPI GdipSetAdjustableArrowCapMiddleInset(GpAdjustableArrowCap*,REAL); -GpStatus WINGDIPAPI GdipGetAdjustableArrowCapMiddleInset(GpAdjustableArrowCap*,REAL*); -GpStatus WINGDIPAPI GdipSetAdjustableArrowCapFillState(GpAdjustableArrowCap*,BOOL); -GpStatus WINGDIPAPI GdipGetAdjustableArrowCapFillState(GpAdjustableArrowCap*,BOOL*); - -/* Bitmap functions */ -GpStatus WINGDIPAPI GdipCreateBitmapFromStream(IStream*,GpBitmap**); -GpStatus WINGDIPAPI GdipCreateBitmapFromFile(GDIPCONST WCHAR*,GpBitmap**); -GpStatus WINGDIPAPI GdipCreateBitmapFromStreamICM(IStream*,GpBitmap**); -GpStatus WINGDIPAPI GdipCreateBitmapFromFileICM(GDIPCONST WCHAR*,GpBitmap**); -GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT,INT,INT,PixelFormat,BYTE*,GpBitmap**); -GpStatus WINGDIPAPI GdipCreateBitmapFromGraphics(INT,INT,GpGraphics*,GpBitmap**); -GpStatus WINGDIPAPI GdipCreateBitmapFromDirectDrawSurface(IDirectDrawSurface7*,GpBitmap**); -GpStatus WINGDIPAPI GdipCreateBitmapFromGdiDib(GDIPCONST BITMAPINFO*,VOID*,GpBitmap**); -GpStatus WINGDIPAPI GdipCreateBitmapFromHBITMAP(HBITMAP,HPALETTE,GpBitmap**); -GpStatus WINGDIPAPI GdipCreateHBITMAPFromBitmap(GpBitmap*,HBITMAP*,ARGB); -GpStatus WINGDIPAPI GdipCreateBitmapFromHICON(HICON,GpBitmap**); -GpStatus WINGDIPAPI GdipCreateHICONFromBitmap(GpBitmap*,HICON*); -GpStatus WINGDIPAPI GdipCreateBitmapFromResource(HINSTANCE,GDIPCONST WCHAR*,GpBitmap**); -GpStatus WINGDIPAPI GdipCloneBitmapArea(REAL,REAL,REAL,REAL,PixelFormat,GpBitmap*,GpBitmap**); -GpStatus WINGDIPAPI GdipCloneBitmapAreaI(INT,INT,INT,INT,PixelFormat,GpBitmap*,GpBitmap**); -GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap*,GDIPCONST GpRect*,UINT,PixelFormat,BitmapData*); -GpStatus WINGDIPAPI GdipBitmapUnlockBits(GpBitmap*,BitmapData*); -GpStatus WINGDIPAPI GdipBitmapGetPixel(GpBitmap*,INT,INT,ARGB*); -GpStatus WINGDIPAPI GdipBitmapSetPixel(GpBitmap*,INT,INT,ARGB); -GpStatus WINGDIPAPI GdipBitmapSetResolution(GpBitmap*,REAL,REAL); -GpStatus WINGDIPAPI GdipBitmapConvertFormat(GpBitmap*,PixelFormat,DitherType,PaletteType,ColorPalette*,REAL); -GpStatus WINGDIPAPI GdipInitializePalette(ColorPalette*,PaletteType,INT,BOOL,GpBitmap*); -GpStatus WINGDIPAPI GdipBitmapApplyEffect(GpBitmap*,CGpEffect*,RECT*,BOOL,VOID**,INT*); -GpStatus WINGDIPAPI GdipBitmapCreateApplyEffect(GpBitmap**,INT,CGpEffect*,RECT*,RECT*,GpBitmap**,BOOL,VOID**,INT*); -GpStatus WINGDIPAPI GdipBitmapGetHistogram(GpBitmap*,HistogramFormat,UINT,UINT*,UINT*,UINT*,UINT*); -GpStatus WINGDIPAPI GdipBitmapGetHistogramSize(HistogramFormat,UINT*); - -/* Brush functions */ -GpStatus WINGDIPAPI GdipCloneBrush(GpBrush*,GpBrush**); -GpStatus WINGDIPAPI GdipDeleteBrush(GpBrush*); -GpStatus WINGDIPAPI GdipGetBrushType(GpBrush*,GpBrushType*); - -/* CachedBitmap functions */ -GpStatus WINGDIPAPI GdipCreateCachedBitmap(GpBitmap*,GpGraphics*,GpCachedBitmap**); -GpStatus WINGDIPAPI GdipDeleteCachedBitmap(GpCachedBitmap*); -GpStatus WINGDIPAPI GdipDrawCachedBitmap(GpGraphics*,GpCachedBitmap*,INT,INT); - -/* CustomLineCap functions */ -GpStatus WINGDIPAPI GdipCreateCustomLineCap(GpPath*,GpPath*,GpLineCap,REAL,GpCustomLineCap**); -GpStatus WINGDIPAPI GdipDeleteCustomLineCap(GpCustomLineCap*); -GpStatus WINGDIPAPI GdipCloneCustomLineCap(GpCustomLineCap*,GpCustomLineCap**); -GpStatus WINGDIPAPI GdipGetCustomLineCapType(GpCustomLineCap*,CustomLineCapType*); -GpStatus WINGDIPAPI GdipSetCustomLineCapStrokeCaps(GpCustomLineCap*,GpLineCap,GpLineCap); -GpStatus WINGDIPAPI GdipGetCustomLineCapStrokeCaps(GpCustomLineCap*,GpLineCap*,GpLineCap*); -GpStatus WINGDIPAPI GdipSetCustomLineCapStrokeJoin(GpCustomLineCap*,GpLineJoin); -GpStatus WINGDIPAPI GdipGetCustomLineCapStrokeJoin(GpCustomLineCap*,GpLineJoin*); -GpStatus WINGDIPAPI GdipSetCustomLineCapBaseCap(GpCustomLineCap*,GpLineCap); -GpStatus WINGDIPAPI GdipGetCustomLineCapBaseCap(GpCustomLineCap*,GpLineCap*); -GpStatus WINGDIPAPI GdipSetCustomLineCapBaseInset(GpCustomLineCap*,REAL); -GpStatus WINGDIPAPI GdipGetCustomLineCapBaseInset(GpCustomLineCap*,REAL*); -GpStatus WINGDIPAPI GdipSetCustomLineCapWidthScale(GpCustomLineCap*,REAL); -GpStatus WINGDIPAPI GdipGetCustomLineCapWidthScale(GpCustomLineCap*,REAL*); - -/* Effect functions */ -GpStatus WINGDIPAPI GdipCreateEffect(GDIPCONST GUID,CGpEffect**); -GpStatus WINGDIPAPI GdipDeleteEffect(CGpEffect*); -GpStatus WINGDIPAPI GdipGetEffectParameterSize(CGpEffect*,UINT*); -GpStatus WINGDIPAPI GdipSetEffectParameters(CGpEffect*,GDIPCONST VOID*,UINT); -GpStatus WINGDIPAPI GdipGetEffectParameters(CGpEffect*,UINT*,VOID*); - -/* Font functions */ -GpStatus WINGDIPAPI GdipCreateFontFromDC(HDC,GpFont**); -GpStatus WINGDIPAPI GdipCreateFontFromLogfontA(HDC,GDIPCONST LOGFONTA*,GpFont**); -GpStatus WINGDIPAPI GdipCreateFontFromLogfontW(HDC,GDIPCONST LOGFONTW*,GpFont**); -GpStatus WINGDIPAPI GdipCreateFont(GDIPCONST GpFontFamily*,REAL,INT,Unit,GpFont**); -GpStatus WINGDIPAPI GdipCloneFont(GpFont*,GpFont**); -GpStatus WINGDIPAPI GdipDeleteFont(GpFont*); -GpStatus WINGDIPAPI GdipGetFamily(GpFont*,GpFontFamily**); -GpStatus WINGDIPAPI GdipGetFontStyle(GpFont*,INT*); -GpStatus WINGDIPAPI GdipGetFontSize(GpFont*,REAL*); -GpStatus WINGDIPAPI GdipGetFontUnit(GpFont*,Unit*); -GpStatus WINGDIPAPI GdipGetFontHeight(GDIPCONST GpFont*,GDIPCONST GpGraphics*,REAL*); -GpStatus WINGDIPAPI GdipGetFontHeightGivenDPI(GDIPCONST GpFont*,REAL,REAL*); -GpStatus WINGDIPAPI GdipGetLogFontA(GpFont*,GpGraphics*,LOGFONTA*); -GpStatus WINGDIPAPI GdipGetLogFontW(GpFont*,GpGraphics*,LOGFONTW*); -GpStatus WINGDIPAPI GdipNewInstalledFontCollection(GpFontCollection**); -GpStatus WINGDIPAPI GdipNewPrivateFontCollection(GpFontCollection**); -GpStatus WINGDIPAPI GdipDeletePrivateFontCollection(GpFontCollection**); -GpStatus WINGDIPAPI GdipGetFontCollectionFamilyCount(GpFontCollection*,INT*); -GpStatus WINGDIPAPI GdipGetFontCollectionFamilyList(GpFontCollection*,INT,GpFontFamily**,INT*); -GpStatus WINGDIPAPI GdipPrivateAddFontFile(GpFontCollection*,GDIPCONST WCHAR*); -GpStatus WINGDIPAPI GdipPrivateAddMemoryFont(GpFontCollection*,GDIPCONST void*,INT); - -/* FontFamily functions */ -GpStatus WINGDIPAPI GdipCreateFontFamilyFromName(GDIPCONST WCHAR*,GpFontCollection*,GpFontFamily**); -GpStatus WINGDIPAPI GdipDeleteFontFamily(GpFontFamily*); -GpStatus WINGDIPAPI GdipCloneFontFamily(GpFontFamily*,GpFontFamily**); -GpStatus WINGDIPAPI GdipGetGenericFontFamilySansSerif(GpFontFamily**); -GpStatus WINGDIPAPI GdipGetGenericFontFamilySerif(GpFontFamily**); -GpStatus WINGDIPAPI GdipGetGenericFontFamilyMonospace(GpFontFamily**); -GpStatus WINGDIPAPI GdipGetFamilyName(GDIPCONST GpFontFamily*,WCHAR[LF_FACESIZE],LANGID); -GpStatus WINGDIPAPI GdipIsStyleAvailable(GDIPCONST GpFontFamily*,INT,BOOL*); -GpStatus WINGDIPAPI GdipFontCollectionEnumerable(GpFontCollection*,GpGraphics*,INT*); -GpStatus WINGDIPAPI GdipFontCollectionEnumerate(GpFontCollection*,INT,GpFontFamily**,INT*,GpGraphics*); -GpStatus WINGDIPAPI GdipGetEmHeight(GDIPCONST GpFontFamily*,INT,UINT16*); -GpStatus WINGDIPAPI GdipGetCellAscent(GDIPCONST GpFontFamily*,INT,UINT16*); -GpStatus WINGDIPAPI GdipGetCellDescent(GDIPCONST GpFontFamily*,INT,UINT16*); -GpStatus WINGDIPAPI GdipGetLineSpacing(GDIPCONST GpFontFamily*,INT,UINT16*); - -/* Graphics functions */ -GpStatus WINGDIPAPI GdipFlush(GpGraphics*,GpFlushIntention); -GpStatus WINGDIPAPI GdipCreateFromHDC(HDC,GpGraphics**); -GpStatus WINGDIPAPI GdipCreateFromHDC2(HDC,HANDLE,GpGraphics**); -GpStatus WINGDIPAPI GdipCreateFromHWND(HWND,GpGraphics**); -GpStatus WINGDIPAPI GdipCreateFromHWNDICM(HWND,GpGraphics**); -GpStatus WINGDIPAPI GdipDeleteGraphics(GpGraphics*); -GpStatus WINGDIPAPI GdipGetDC(GpGraphics*,HDC*); -GpStatus WINGDIPAPI GdipReleaseDC(GpGraphics*,HDC); -GpStatus WINGDIPAPI GdipSetCompositingMode(GpGraphics*,CompositingMode); -GpStatus WINGDIPAPI GdipGetCompositingMode(GpGraphics*,CompositingMode*); -GpStatus WINGDIPAPI GdipSetRenderingOrigin(GpGraphics*,INT,INT); -GpStatus WINGDIPAPI GdipGetRenderingOrigin(GpGraphics*,INT*,INT*); -GpStatus WINGDIPAPI GdipSetCompositingQuality(GpGraphics*,CompositingQuality); -GpStatus WINGDIPAPI GdipGetCompositingQuality(GpGraphics*,CompositingQuality*); -GpStatus WINGDIPAPI GdipSetSmoothingMode(GpGraphics*,SmoothingMode); -GpStatus WINGDIPAPI GdipGetSmoothingMode(GpGraphics*,SmoothingMode*); -GpStatus WINGDIPAPI GdipSetPixelOffsetMode(GpGraphics*,PixelOffsetMode); -GpStatus WINGDIPAPI GdipGetPixelOffsetMode(GpGraphics*,PixelOffsetMode*); -GpStatus WINGDIPAPI GdipSetTextRenderingHint(GpGraphics*,TextRenderingHint); -GpStatus WINGDIPAPI GdipGetTextRenderingHint(GpGraphics*,TextRenderingHint*); -GpStatus WINGDIPAPI GdipSetTextContrast(GpGraphics*,UINT); -GpStatus WINGDIPAPI GdipGetTextContrast(GpGraphics*,UINT*); -GpStatus WINGDIPAPI GdipSetInterpolationMode(GpGraphics*,InterpolationMode); -GpStatus WINGDIPAPI GdipGraphicsSetAbort(GpGraphics*,GdiplusAbort*); -GpStatus WINGDIPAPI GdipGetInterpolationMode(GpGraphics*,InterpolationMode*); -GpStatus WINGDIPAPI GdipSetWorldTransform(GpGraphics*,GpMatrix*); -GpStatus WINGDIPAPI GdipResetWorldTransform(GpGraphics*); -GpStatus WINGDIPAPI GdipMultiplyWorldTransform(GpGraphics*,GDIPCONST GpMatrix*,GpMatrixOrder); -GpStatus WINGDIPAPI GdipTranslateWorldTransform(GpGraphics*,REAL,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipScaleWorldTransform(GpGraphics*,REAL,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipRotateWorldTransform(GpGraphics*,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipGetWorldTransform(GpGraphics*,GpMatrix*); -GpStatus WINGDIPAPI GdipResetPageTransform(GpGraphics*); -GpStatus WINGDIPAPI GdipGetPageUnit(GpGraphics*,GpUnit*); -GpStatus WINGDIPAPI GdipGetPageScale(GpGraphics*,REAL*); -GpStatus WINGDIPAPI GdipSetPageUnit(GpGraphics*,GpUnit); -GpStatus WINGDIPAPI GdipSetPageScale(GpGraphics*,REAL); -GpStatus WINGDIPAPI GdipGetDpiX(GpGraphics*,REAL*); -GpStatus WINGDIPAPI GdipGetDpiY(GpGraphics*,REAL*); -GpStatus WINGDIPAPI GdipTransformPoints(GpGraphics*,GpCoordinateSpace,GpCoordinateSpace,GpPointF*,INT); -GpStatus WINGDIPAPI GdipTransformPointsI(GpGraphics*,GpCoordinateSpace,GpCoordinateSpace,GpPoint*,INT); -GpStatus WINGDIPAPI GdipGetNearestColor(GpGraphics*,ARGB*); -HPALETTE WINGDIPAPI GdipCreateHalftonePalette(void); -GpStatus WINGDIPAPI GdipDrawLine(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipDrawLineI(GpGraphics*,GpPen*,INT,INT,INT,INT); -GpStatus WINGDIPAPI GdipDrawLines(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT); -GpStatus WINGDIPAPI GdipDrawLinesI(GpGraphics*,GpPen*,GDIPCONST GpPoint*,INT); -GpStatus WINGDIPAPI GdipDrawArc(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipDrawArcI(GpGraphics*,GpPen*,INT,INT,INT,INT,REAL,REAL); -GpStatus WINGDIPAPI GdipDrawBezier(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipDrawBezierI(GpGraphics*,GpPen*,INT,INT,INT,INT,INT,INT,INT,INT); -GpStatus WINGDIPAPI GdipDrawBeziers(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT); -GpStatus WINGDIPAPI GdipDrawBeziersI(GpGraphics*,GpPen*,GDIPCONST GpPoint*,INT); -GpStatus WINGDIPAPI GdipDrawRectangle(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipDrawRectangleI(GpGraphics*,GpPen*,INT,INT,INT,INT); -GpStatus WINGDIPAPI GdipDrawRectangles(GpGraphics*,GpPen*,GDIPCONST GpRectF*,INT); -GpStatus WINGDIPAPI GdipDrawRectanglesI(GpGraphics*,GpPen*,GDIPCONST GpRect*,INT); -GpStatus WINGDIPAPI GdipDrawEllipse(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipDrawEllipseI(GpGraphics*,GpPen*,INT,INT,INT,INT); -GpStatus WINGDIPAPI GdipDrawPie(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipDrawPieI(GpGraphics*,GpPen*,INT,INT,INT,INT,REAL,REAL); -GpStatus WINGDIPAPI GdipDrawPolygon(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT); -GpStatus WINGDIPAPI GdipDrawPolygonI(GpGraphics*,GpPen*,GDIPCONST GpPoint*,INT); -GpStatus WINGDIPAPI GdipDrawPath(GpGraphics*,GpPen*,GpPath*); -GpStatus WINGDIPAPI GdipDrawCurve(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT); -GpStatus WINGDIPAPI GdipDrawCurveI(GpGraphics*,GpPen*,GDIPCONST GpPoint*,INT); -GpStatus WINGDIPAPI GdipDrawCurve2(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT,REAL); -GpStatus WINGDIPAPI GdipDrawCurve2I(GpGraphics*,GpPen*,GDIPCONST GpPoint*,INT,REAL); -GpStatus WINGDIPAPI GdipDrawCurve3(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT,INT,INT,REAL); -GpStatus WINGDIPAPI GdipDrawCurve3I(GpGraphics*,GpPen*,GDIPCONST GpPoint*,INT,INT,INT,REAL); -GpStatus WINGDIPAPI GdipDrawClosedCurve(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT); -GpStatus WINGDIPAPI GdipDrawClosedCurveI(GpGraphics*,GpPen*,GDIPCONST GpPoint*,INT); -GpStatus WINGDIPAPI GdipDrawClosedCurve2(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT,REAL); -GpStatus WINGDIPAPI GdipDrawClosedCurve2I(GpGraphics*,GpPen*,GDIPCONST GpPoint*,INT,REAL); -GpStatus WINGDIPAPI GdipGraphicsClear(GpGraphics*,ARGB); -GpStatus WINGDIPAPI GdipFillRectangle(GpGraphics*,GpBrush*,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipFillRectangleI(GpGraphics*,GpBrush*,INT,INT,INT,INT); -GpStatus WINGDIPAPI GdipFillRectangles(GpGraphics*,GpBrush*,GDIPCONST GpRectF*,INT); -GpStatus WINGDIPAPI GdipFillRectanglesI(GpGraphics*,GpBrush*,GDIPCONST GpRect*,INT); -GpStatus WINGDIPAPI GdipFillPolygon(GpGraphics*,GpBrush*,GDIPCONST GpPointF*,INT,GpFillMode); -GpStatus WINGDIPAPI GdipFillPolygonI(GpGraphics*,GpBrush*,GDIPCONST GpPoint*,INT,GpFillMode); -GpStatus WINGDIPAPI GdipFillPolygon2(GpGraphics*,GpBrush*,GDIPCONST GpPointF*,INT); -GpStatus WINGDIPAPI GdipFillPolygon2I(GpGraphics*,GpBrush*,GDIPCONST GpPoint*,INT); -GpStatus WINGDIPAPI GdipFillEllipse(GpGraphics*,GpBrush*,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipFillEllipseI(GpGraphics*,GpBrush*,INT,INT,INT,INT); -GpStatus WINGDIPAPI GdipFillPie(GpGraphics*,GpBrush*,REAL,REAL,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipFillPieI(GpGraphics*,GpBrush*,INT,INT,INT,INT,REAL,REAL); -GpStatus WINGDIPAPI GdipFillPath(GpGraphics*,GpBrush*,GpPath*); -GpStatus WINGDIPAPI GdipFillClosedCurve(GpGraphics*,GpBrush*,GDIPCONST GpPointF*,INT); -GpStatus WINGDIPAPI GdipFillClosedCurveI(GpGraphics*,GpBrush*,GDIPCONST GpPoint*,INT); -GpStatus WINGDIPAPI GdipFillClosedCurve2(GpGraphics*,GpBrush*,GDIPCONST GpPointF*,INT,REAL,GpFillMode); -GpStatus WINGDIPAPI GdipFillClosedCurve2I(GpGraphics*,GpBrush*,GDIPCONST GpPoint*,INT,REAL,GpFillMode); -GpStatus WINGDIPAPI GdipFillRegion(GpGraphics*,GpBrush*,GpRegion*); -GpStatus WINGDIPAPI GdipDrawImage(GpGraphics*,GpImage*,REAL,REAL); -GpStatus WINGDIPAPI GdipDrawImageI(GpGraphics*,GpImage*,INT,INT); -GpStatus WINGDIPAPI GdipDrawImageRect(GpGraphics*,GpImage*,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipDrawImageRectI(GpGraphics*,GpImage*,INT,INT,INT,INT); -GpStatus WINGDIPAPI GdipDrawImagePoints(GpGraphics*,GpImage*,GDIPCONST GpPointF*,INT); -GpStatus WINGDIPAPI GdipDrawImagePointsI(GpGraphics*,GpImage*,GDIPCONST GpPoint*,INT); -GpStatus WINGDIPAPI GdipDrawImagePointRect(GpGraphics*,GpImage*,REAL,REAL,REAL,REAL,REAL,REAL,GpUnit); -GpStatus WINGDIPAPI GdipDrawImagePointRectI(GpGraphics*,GpImage*,INT,INT,INT,INT,INT,INT,GpUnit); -GpStatus WINGDIPAPI GdipDrawImageRectRect(GpGraphics*,GpImage*,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL,GpUnit,GDIPCONST GpImageAttributes*,DrawImageAbort,VOID*); -GpStatus WINGDIPAPI GdipDrawImageRectRectI(GpGraphics*,GpImage*,INT,INT,INT,INT,INT,INT,INT,INT,GpUnit,GDIPCONST GpImageAttributes*,DrawImageAbort,VOID*); -GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics*,GpImage*,GDIPCONST GpPointF*,INT,REAL,REAL,REAL,REAL,GpUnit,GDIPCONST GpImageAttributes*,DrawImageAbort,VOID*); -GpStatus WINGDIPAPI GdipDrawImagePointsRectI(GpGraphics*,GpImage*,GDIPCONST GpPoint*,INT,INT,INT,INT,INT,GpUnit,GDIPCONST GpImageAttributes*,DrawImageAbort,VOID*); -GpStatus WINGDIPAPI GdipDrawImageFX(GpGraphics*,GpImage*,GpRectF*,GpMatrix*,CGpEffect*,GpImageAttributes*,GpUnit); -#ifdef __cplusplus -GpStatus WINGDIPAPI GdipEnumerateMetafileDestPoint(GpGraphics*,GDIPCONST GpMetafile*,GDIPCONST PointF&,EnumerateMetafileProc,VOID*,GDIPCONST GpImageAttributes*); -GpStatus WINGDIPAPI GdipEnumerateMetafileDestPointI(GpGraphics*,GDIPCONST GpMetafile*,GDIPCONST Point&,EnumerateMetafileProc,VOID*,GDIPCONST GpImageAttributes*); -GpStatus WINGDIPAPI GdipEnumerateMetafileDestRect(GpGraphics*,GDIPCONST GpMetafile*,GDIPCONST RectF&,EnumerateMetafileProc,VOID*,GDIPCONST GpImageAttributes*); -GpStatus WINGDIPAPI GdipEnumerateMetafileDestRectI(GpGraphics*,GDIPCONST GpMetafile*,GDIPCONST Rect&,EnumerateMetafileProc,VOID*,GDIPCONST GpImageAttributes*); -#endif -GpStatus WINGDIPAPI GdipEnumerateMetafileDestPoints(GpGraphics*,GDIPCONST GpMetafile*,GDIPCONST PointF*,INT,EnumerateMetafileProc,VOID*,GDIPCONST GpImageAttributes*); -GpStatus WINGDIPAPI GdipEnumerateMetafileDestPointsI(GpGraphics*,GDIPCONST GpMetafile*,GDIPCONST Point*,INT,EnumerateMetafileProc,VOID*,GDIPCONST GpImageAttributes*); -#ifdef __cplusplus -GpStatus WINGDIPAPI GdipEnumerateMetafileSrcRectDestPoint(GpGraphics*,GDIPCONST GpMetafile*,GDIPCONST PointF&,GDIPCONST RectF&,Unit,EnumerateMetafileProc,VOID*,GDIPCONST GpImageAttributes*); -GpStatus WINGDIPAPI GdipEnumerateMetafileSrcRectDestPointI(GpGraphics*,GDIPCONST GpMetafile*,GDIPCONST Point&,GDIPCONST Rect&,Unit,EnumerateMetafileProc,VOID*,GDIPCONST GpImageAttributes*); -GpStatus WINGDIPAPI GdipEnumerateMetafileSrcRectDestRect(GpGraphics*,GDIPCONST GpMetafile*,GDIPCONST RectF&,GDIPCONST RectF&,Unit,EnumerateMetafileProc,VOID*,GDIPCONST GpImageAttributes*); -GpStatus WINGDIPAPI GdipEnumerateMetafileSrcRectDestRectI(GpGraphics*,GDIPCONST GpMetafile*,GDIPCONST Rect&,GDIPCONST Rect&,Unit,EnumerateMetafileProc,VOID*,GDIPCONST GpImageAttributes*); -GpStatus WINGDIPAPI GdipEnumerateMetafileSrcRectDestPoints(GpGraphics*,GDIPCONST GpMetafile*,GDIPCONST PointF*,INT,GDIPCONST RectF&,Unit,EnumerateMetafileProc,VOID*,GDIPCONST GpImageAttributes*); -GpStatus WINGDIPAPI GdipEnumerateMetafileSrcRectDestPointsI(GpGraphics*,GDIPCONST GpMetafile*,GDIPCONST Point*,INT,GDIPCONST Rect&,Unit,EnumerateMetafileProc,VOID*,GDIPCONST GpImageAttributes*); -#endif -GpStatus WINGDIPAPI GdipSetClipGraphics(GpGraphics*,GpGraphics*,CombineMode); -GpStatus WINGDIPAPI GdipSetClipRect(GpGraphics*,REAL,REAL,REAL,REAL,CombineMode); -GpStatus WINGDIPAPI GdipSetClipRectI(GpGraphics*,INT,INT,INT,INT,CombineMode); -GpStatus WINGDIPAPI GdipSetClipPath(GpGraphics*,GpPath*,CombineMode); -GpStatus WINGDIPAPI GdipSetClipRegion(GpGraphics*,GpRegion*,CombineMode); -GpStatus WINGDIPAPI GdipSetClipHrgn(GpGraphics*,HRGN,CombineMode); -GpStatus WINGDIPAPI GdipResetClip(GpGraphics*); -GpStatus WINGDIPAPI GdipTranslateClip(GpGraphics*,REAL,REAL); -GpStatus WINGDIPAPI GdipTranslateClipI(GpGraphics*,INT,INT); -GpStatus WINGDIPAPI GdipGetClip(GpGraphics*,GpRegion*); -GpStatus WINGDIPAPI GdipGetClipBounds(GpGraphics*,GpRectF*); -GpStatus WINGDIPAPI GdipGetClipBoundsI(GpGraphics*,GpRect*); -GpStatus WINGDIPAPI GdipIsClipEmpty(GpGraphics*,BOOL*); -GpStatus WINGDIPAPI GdipGetVisibleClipBounds(GpGraphics*,GpRectF*); -GpStatus WINGDIPAPI GdipGetVisibleClipBoundsI(GpGraphics*,GpRect*); -GpStatus WINGDIPAPI GdipIsVisibleClipEmpty(GpGraphics*,BOOL*); -GpStatus WINGDIPAPI GdipIsVisiblePoint(GpGraphics*,REAL,REAL,BOOL*); -GpStatus WINGDIPAPI GdipIsVisiblePointI(GpGraphics*,INT,INT,BOOL*); -GpStatus WINGDIPAPI GdipIsVisibleRect(GpGraphics*,REAL,REAL,REAL,REAL,BOOL*); -GpStatus WINGDIPAPI GdipIsVisibleRectI(GpGraphics*,INT,INT,INT,INT,BOOL*); -GpStatus WINGDIPAPI GdipSaveGraphics(GpGraphics*,GraphicsState*); -GpStatus WINGDIPAPI GdipRestoreGraphics(GpGraphics*,GraphicsState); -GpStatus WINGDIPAPI GdipBeginContainer(GpGraphics*,GDIPCONST GpRectF*,GDIPCONST GpRectF*,GpUnit,GraphicsContainer*); -GpStatus WINGDIPAPI GdipBeginContainerI(GpGraphics*,GDIPCONST GpRect*,GDIPCONST GpRect*,GpUnit,GraphicsContainer*); -GpStatus WINGDIPAPI GdipBeginContainer2(GpGraphics*,GraphicsContainer*); -GpStatus WINGDIPAPI GdipEndContainer(GpGraphics*,GraphicsContainer); -GpStatus WINGDIPAPI GdipComment(GpGraphics*,UINT,GDIPCONST BYTE*); - -/* GraphicsPath functions */ -GpStatus WINGDIPAPI GdipCreatePath(GpFillMode,GpPath**); -GpStatus WINGDIPAPI GdipCreatePath2(GDIPCONST GpPointF*,GDIPCONST BYTE*,INT,GpFillMode,GpPath**); -GpStatus WINGDIPAPI GdipCreatePath2I(GDIPCONST GpPoint*,GDIPCONST BYTE*,INT,GpFillMode,GpPath**); -GpStatus WINGDIPAPI GdipClonePath(GpPath*,GpPath**); -GpStatus WINGDIPAPI GdipDeletePath(GpPath*); -GpStatus WINGDIPAPI GdipResetPath(GpPath*); -GpStatus WINGDIPAPI GdipGetPointCount(GpPath*,INT*); -GpStatus WINGDIPAPI GdipGetPathTypes(GpPath*,BYTE*,INT); -GpStatus WINGDIPAPI GdipGetPathPoints(GpPath*,GpPointF*,INT); -GpStatus WINGDIPAPI GdipGetPathPointsI(GpPath*,GpPoint*,INT); -GpStatus WINGDIPAPI GdipGetPathFillMode(GpPath*,GpFillMode*); -GpStatus WINGDIPAPI GdipSetPathFillMode(GpPath*,GpFillMode); -GpStatus WINGDIPAPI GdipGetPathData(GpPath*,GpPathData*); -GpStatus WINGDIPAPI GdipStartPathFigure(GpPath*); -GpStatus WINGDIPAPI GdipClosePathFigure(GpPath*); -GpStatus WINGDIPAPI GdipClosePathFigures(GpPath*); -GpStatus WINGDIPAPI GdipSetPathMarker(GpPath*); -GpStatus WINGDIPAPI GdipClearPathMarkers(GpPath*); -GpStatus WINGDIPAPI GdipReversePath(GpPath*); -GpStatus WINGDIPAPI GdipGetPathLastPoint(GpPath*,GpPointF*); -GpStatus WINGDIPAPI GdipAddPathLine(GpPath*,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipAddPathLine2(GpPath*,GDIPCONST GpPointF*,INT); -GpStatus WINGDIPAPI GdipAddPathArc(GpPath*,REAL,REAL,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipAddPathBezier(GpPath*,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipAddPathBeziers(GpPath*,GDIPCONST GpPointF*,INT); -GpStatus WINGDIPAPI GdipAddPathCurve(GpPath*,GDIPCONST GpPointF*,INT); -GpStatus WINGDIPAPI GdipAddPathCurve2(GpPath*,GDIPCONST GpPointF*,INT,REAL); -GpStatus WINGDIPAPI GdipAddPathCurve3(GpPath*,GDIPCONST GpPointF*,INT,INT,INT,REAL); -GpStatus WINGDIPAPI GdipAddPathClosedCurve(GpPath*,GDIPCONST GpPointF*,INT); -GpStatus WINGDIPAPI GdipAddPathClosedCurve2(GpPath*,GDIPCONST GpPointF*,INT,REAL); -GpStatus WINGDIPAPI GdipAddPathRectangle(GpPath*,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipAddPathRectangles(GpPath*,GDIPCONST GpRectF*,INT); -GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath*,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipAddPathPie(GpPath*,REAL,REAL,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipAddPathPolygon(GpPath*,GDIPCONST GpPointF*,INT); -GpStatus WINGDIPAPI GdipAddPathPath(GpPath*,GDIPCONST GpPath*,BOOL); -GpStatus WINGDIPAPI GdipAddPathString(GpPath*,GDIPCONST WCHAR*,INT,GDIPCONST GpFontFamily*,INT,REAL,GDIPCONST RectF*,GDIPCONST GpStringFormat*); -GpStatus WINGDIPAPI GdipAddPathStringI(GpPath*,GDIPCONST WCHAR*,INT,GDIPCONST GpFontFamily*,INT,REAL,GDIPCONST Rect*,GDIPCONST GpStringFormat*); -GpStatus WINGDIPAPI GdipAddPathLineI(GpPath*,INT,INT,INT,INT); -GpStatus WINGDIPAPI GdipAddPathLine2I(GpPath*,GDIPCONST GpPoint*,INT); -GpStatus WINGDIPAPI GdipAddPathArcI(GpPath*,INT,INT,INT,INT,REAL,REAL); -GpStatus WINGDIPAPI GdipAddPathBezierI(GpPath*,INT,INT,INT,INT,INT,INT,INT,INT); -GpStatus WINGDIPAPI GdipAddPathBeziersI(GpPath*,GDIPCONST GpPoint*,INT); -GpStatus WINGDIPAPI GdipAddPathCurveI(GpPath*,GDIPCONST GpPoint*,INT); -GpStatus WINGDIPAPI GdipAddPathCurve2I(GpPath*,GDIPCONST GpPoint*,INT,REAL); -GpStatus WINGDIPAPI GdipAddPathCurve3I(GpPath*,GDIPCONST GpPoint*,INT,INT,INT,REAL); -GpStatus WINGDIPAPI GdipAddPathClosedCurveI(GpPath*,GDIPCONST GpPoint*,INT); -GpStatus WINGDIPAPI GdipAddPathClosedCurve2I(GpPath*,GDIPCONST GpPoint*,INT,REAL); -GpStatus WINGDIPAPI GdipAddPathRectangleI(GpPath*,INT,INT,INT,INT); -GpStatus WINGDIPAPI GdipAddPathRectanglesI(GpPath*,GDIPCONST GpRect*,INT); -GpStatus WINGDIPAPI GdipAddPathEllipseI(GpPath*,INT,INT,INT,INT); -GpStatus WINGDIPAPI GdipAddPathPieI(GpPath*,INT,INT,INT,INT,REAL,REAL); -GpStatus WINGDIPAPI GdipAddPathPolygonI(GpPath*,GDIPCONST GpPoint*,INT); -GpStatus WINGDIPAPI GdipFlattenPath(GpPath*,GpMatrix*,REAL); -GpStatus WINGDIPAPI GdipWindingModeOutline(GpPath*,GpMatrix*,REAL); -GpStatus WINGDIPAPI GdipWidenPath(GpPath*,GpPen*,GpMatrix*,REAL); -GpStatus WINGDIPAPI GdipWarpPath(GpPath*,GpMatrix*,GDIPCONST GpPointF*,INT,REAL,REAL,REAL,REAL,WarpMode,REAL); -GpStatus WINGDIPAPI GdipTransformPath(GpPath*,GpMatrix*); -GpStatus WINGDIPAPI GdipGetPathWorldBounds(GpPath*,GpRectF*,GDIPCONST GpMatrix*,GDIPCONST GpPen*); -GpStatus WINGDIPAPI GdipGetPathWorldBoundsI(GpPath*,GpRect*,GDIPCONST GpMatrix*,GDIPCONST GpPen*); -GpStatus WINGDIPAPI GdipIsVisiblePathPoint(GpPath*,REAL,REAL,GpGraphics*,BOOL*); -GpStatus WINGDIPAPI GdipIsVisiblePathPointI(GpPath*,INT,INT,GpGraphics*,BOOL*); -GpStatus WINGDIPAPI GdipIsOutlineVisiblePathPoint(GpPath*,REAL,REAL,GpPen*,GpGraphics*,BOOL*); -GpStatus WINGDIPAPI GdipIsOutlineVisiblePathPointI(GpPath*,INT,INT,GpPen*,GpGraphics*,BOOL*); - -/* HatchBrush functions */ -GpStatus WINGDIPAPI GdipCreateHatchBrush(GpHatchStyle,ARGB,ARGB,GpHatch**); -GpStatus WINGDIPAPI GdipGetHatchStyle(GpHatch*,GpHatchStyle*); -GpStatus WINGDIPAPI GdipGetHatchForegroundColor(GpHatch*,ARGB*); -GpStatus WINGDIPAPI GdipGetHatchBackgroundColor(GpHatch*,ARGB*); - -/* Image functions */ -GpStatus WINGDIPAPI GdipLoadImageFromStream(IStream*,GpImage**); -GpStatus WINGDIPAPI GdipLoadImageFromFile(GDIPCONST WCHAR*,GpImage**); -GpStatus WINGDIPAPI GdipLoadImageFromStreamICM(IStream*,GpImage**); -GpStatus WINGDIPAPI GdipLoadImageFromFileICM(GDIPCONST WCHAR*,GpImage**); -GpStatus WINGDIPAPI GdipCloneImage(GpImage*,GpImage**); -GpStatus WINGDIPAPI GdipDisposeImage(GpImage*); -GpStatus WINGDIPAPI GdipSaveImageToFile(GpImage*,GDIPCONST WCHAR*,GDIPCONST CLSID*,GDIPCONST EncoderParameters*); -GpStatus WINGDIPAPI GdipSaveImageToStream(GpImage*,IStream*,GDIPCONST CLSID*,GDIPCONST EncoderParameters*); -GpStatus WINGDIPAPI GdipSaveAdd(GpImage*,GDIPCONST EncoderParameters*); -GpStatus WINGDIPAPI GdipSaveAddImage(GpImage*,GpImage*,GDIPCONST EncoderParameters*); -GpStatus WINGDIPAPI GdipGetImageGraphicsContext(GpImage*,GpGraphics**); -GpStatus WINGDIPAPI GdipGetImageBounds(GpImage*,GpRectF*,GpUnit*); -GpStatus WINGDIPAPI GdipGetImageDimension(GpImage*,REAL*,REAL*); -GpStatus WINGDIPAPI GdipGetImageType(GpImage*,ImageType*); -GpStatus WINGDIPAPI GdipGetImageWidth(GpImage*,UINT*); -GpStatus WINGDIPAPI GdipGetImageHeight(GpImage*,UINT*); -GpStatus WINGDIPAPI GdipGetImageHorizontalResolution(GpImage*,REAL*); -GpStatus WINGDIPAPI GdipGetImageVerticalResolution(GpImage*,REAL*); -GpStatus WINGDIPAPI GdipGetImageFlags(GpImage*,UINT*); -GpStatus WINGDIPAPI GdipGetImageRawFormat(GpImage*,GUID*); -GpStatus WINGDIPAPI GdipGetImagePixelFormat(GpImage*,PixelFormat*); -GpStatus WINGDIPAPI GdipGetImageThumbnail(GpImage*,UINT,UINT,GpImage**,GetThumbnailImageAbort,VOID*); -GpStatus WINGDIPAPI GdipGetEncoderParameterListSize(GpImage*,GDIPCONST CLSID*,UINT*); -GpStatus WINGDIPAPI GdipGetEncoderParameterList(GpImage*,GDIPCONST CLSID*,UINT,EncoderParameters*); -GpStatus WINGDIPAPI GdipImageGetFrameDimensionsCount(GpImage*,UINT*); -GpStatus WINGDIPAPI GdipImageGetFrameDimensionsList(GpImage*,GUID*,UINT); -GpStatus WINGDIPAPI GdipImageGetFrameCount(GpImage*,GDIPCONST GUID*,UINT*); -GpStatus WINGDIPAPI GdipImageSelectActiveFrame(GpImage*,GDIPCONST GUID*,UINT); -GpStatus WINGDIPAPI GdipImageRotateFlip(GpImage*,RotateFlipType); -GpStatus WINGDIPAPI GdipGetImagePalette(GpImage*,ColorPalette*,INT); -GpStatus WINGDIPAPI GdipSetImagePalette(GpImage*,GDIPCONST ColorPalette*); -GpStatus WINGDIPAPI GdipGetImagePaletteSize(GpImage*,INT*); -GpStatus WINGDIPAPI GdipGetPropertyCount(GpImage*,UINT*); -GpStatus WINGDIPAPI GdipGetPropertyIdList(GpImage*,UINT,PROPID*); -GpStatus WINGDIPAPI GdipGetPropertyItemSize(GpImage*,PROPID,UINT*); -GpStatus WINGDIPAPI GdipGetPropertyItem(GpImage*,PROPID,UINT,PropertyItem*); -GpStatus WINGDIPAPI GdipGetPropertySize(GpImage*,UINT*,UINT*); -GpStatus WINGDIPAPI GdipGetAllPropertyItems(GpImage*,UINT,UINT,PropertyItem*); -GpStatus WINGDIPAPI GdipRemovePropertyItem(GpImage*,PROPID); -GpStatus WINGDIPAPI GdipSetPropertyItem(GpImage*,GDIPCONST PropertyItem*); -GpStatus WINGDIPAPI GdipFindFirstImageItem(GpImage*,ImageItemData*); -GpStatus WINGDIPAPI GdipFindNextImageItem(GpImage*,ImageItemData*); -GpStatus WINGDIPAPI GdipGetImageItemData(GpImage*,ImageItemData*); -GpStatus WINGDIPAPI GdipImageSetAbort(GpImage*,GdiplusAbort*); -GpStatus WINGDIPAPI GdipImageForceValidation(GpImage*); - -/* Image codec functions */ -GpStatus WINGDIPAPI GdipGetImageDecodersSize(UINT*,UINT*); -GpStatus WINGDIPAPI GdipGetImageDecoders(UINT,UINT,ImageCodecInfo*); -GpStatus WINGDIPAPI GdipGetImageEncodersSize(UINT*,UINT*); -GpStatus WINGDIPAPI GdipGetImageEncoders(UINT,UINT,ImageCodecInfo*); - -/* ImageAttributes functions */ -GpStatus WINGDIPAPI GdipCreateImageAttributes(GpImageAttributes**); -GpStatus WINGDIPAPI GdipCloneImageAttributes(GDIPCONST GpImageAttributes*,GpImageAttributes**); -GpStatus WINGDIPAPI GdipDisposeImageAttributes(GpImageAttributes*); -GpStatus WINGDIPAPI GdipSetImageAttributesToIdentity(GpImageAttributes*,ColorAdjustType); -GpStatus WINGDIPAPI GdipResetImageAttributes(GpImageAttributes*,ColorAdjustType); -GpStatus WINGDIPAPI GdipSetImageAttributesColorMatrix(GpImageAttributes*,ColorAdjustType,BOOL,GDIPCONST ColorMatrix*,GDIPCONST ColorMatrix*,ColorMatrixFlags); -GpStatus WINGDIPAPI GdipSetImageAttributesThreshold(GpImageAttributes*,ColorAdjustType,BOOL,REAL); -GpStatus WINGDIPAPI GdipSetImageAttributesGamma(GpImageAttributes*,ColorAdjustType,BOOL,REAL); -GpStatus WINGDIPAPI GdipSetImageAttributesNoOp(GpImageAttributes*,ColorAdjustType,BOOL); -GpStatus WINGDIPAPI GdipSetImageAttributesColorKeys(GpImageAttributes*,ColorAdjustType,BOOL,ARGB,ARGB); -GpStatus WINGDIPAPI GdipSetImageAttributesOutputChannel(GpImageAttributes*,ColorAdjustType,BOOL,ColorChannelFlags); -GpStatus WINGDIPAPI GdipSetImageAttributesOutputChannelColorProfile(GpImageAttributes*,ColorAdjustType,BOOL,GDIPCONST WCHAR*); -GpStatus WINGDIPAPI GdipSetImageAttributesRemapTable(GpImageAttributes*,ColorAdjustType,BOOL,UINT,GDIPCONST ColorMap*); -GpStatus WINGDIPAPI GdipSetImageAttributesWrapMode(GpImageAttributes*,WrapMode,ARGB,BOOL); -GpStatus WINGDIPAPI GdipSetImageAttributesICMMode(GpImageAttributes*,BOOL); -GpStatus WINGDIPAPI GdipGetImageAttributesAdjustedPalette(GpImageAttributes*,ColorPalette*,ColorAdjustType); -GpStatus WINGDIPAPI GdipSetImageAttributesCachedBackground(GpImageAttributes*,BOOL); - -/* LinearGradientBrush functions */ -GpStatus WINGDIPAPI GdipCreateLineBrush(GDIPCONST GpPointF*,GDIPCONST GpPointF*,ARGB,ARGB,GpWrapMode,GpLineGradient**); -GpStatus WINGDIPAPI GdipCreateLineBrushI(GDIPCONST GpPoint*,GDIPCONST GpPoint*,ARGB,ARGB,GpWrapMode,GpLineGradient**); -GpStatus WINGDIPAPI GdipCreateLineBrushFromRect(GDIPCONST GpRectF*,ARGB,ARGB,LinearGradientMode,GpWrapMode,GpLineGradient**); -GpStatus WINGDIPAPI GdipCreateLineBrushFromRectI(GDIPCONST GpRect*,ARGB,ARGB,LinearGradientMode,GpWrapMode,GpLineGradient**); -GpStatus WINGDIPAPI GdipCreateLineBrushFromRectWithAngle(GDIPCONST GpRectF*,ARGB,ARGB,REAL,BOOL,GpWrapMode,GpLineGradient**); -GpStatus WINGDIPAPI GdipCreateLineBrushFromRectWithAngleI(GDIPCONST GpRect*,ARGB,ARGB,REAL,BOOL,GpWrapMode,GpLineGradient**); -GpStatus WINGDIPAPI GdipSetLineColors(GpLineGradient*,ARGB,ARGB); -GpStatus WINGDIPAPI GdipGetLineColors(GpLineGradient*,ARGB*); -GpStatus WINGDIPAPI GdipGetLineRect(GpLineGradient*,GpRectF*); -GpStatus WINGDIPAPI GdipGetLineRectI(GpLineGradient*,GpRect*); -GpStatus WINGDIPAPI GdipSetLineGammaCorrection(GpLineGradient*,BOOL); -GpStatus WINGDIPAPI GdipGetLineGammaCorrection(GpLineGradient*,BOOL*); -GpStatus WINGDIPAPI GdipGetLineBlendCount(GpLineGradient*,INT*); -GpStatus WINGDIPAPI GdipGetLineBlend(GpLineGradient*,REAL*,REAL*,INT); -GpStatus WINGDIPAPI GdipSetLineBlend(GpLineGradient*,GDIPCONST REAL*,GDIPCONST REAL*,INT); -GpStatus WINGDIPAPI GdipGetLinePresetBlendCount(GpLineGradient*,INT*); -GpStatus WINGDIPAPI GdipGetLinePresetBlend(GpLineGradient*,ARGB*,REAL*,INT); -GpStatus WINGDIPAPI GdipSetLinePresetBlend(GpLineGradient*,GDIPCONST ARGB*,GDIPCONST REAL*,INT); -GpStatus WINGDIPAPI GdipSetLineSigmaBlend(GpLineGradient*,REAL,REAL); -GpStatus WINGDIPAPI GdipSetLineLinearBlend(GpLineGradient*,REAL,REAL); -GpStatus WINGDIPAPI GdipSetLineWrapMode(GpLineGradient*,GpWrapMode); -GpStatus WINGDIPAPI GdipGetLineWrapMode(GpLineGradient*,GpWrapMode*); -GpStatus WINGDIPAPI GdipGetLineTransform(GpLineGradient*,GpMatrix*); -GpStatus WINGDIPAPI GdipSetLineTransform(GpLineGradient*,GDIPCONST GpMatrix*); -GpStatus WINGDIPAPI GdipResetLineTransform(GpLineGradient*); -GpStatus WINGDIPAPI GdipMultiplyLineTransform(GpLineGradient*,GDIPCONST GpMatrix*,GpMatrixOrder); -GpStatus WINGDIPAPI GdipTranslateLineTransform(GpLineGradient*,REAL,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipScaleLineTransform(GpLineGradient*,REAL,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipRotateLineTransform(GpLineGradient*,REAL,GpMatrixOrder); - -/* Matrix functions */ -GpStatus WINGDIPAPI GdipCreateMatrix(GpMatrix**); -GpStatus WINGDIPAPI GdipCreateMatrix2(REAL,REAL,REAL,REAL,REAL,REAL,GpMatrix**); -GpStatus WINGDIPAPI GdipCreateMatrix3(GDIPCONST GpRectF*,GDIPCONST GpPointF*,GpMatrix**); -GpStatus WINGDIPAPI GdipCreateMatrix3I(GDIPCONST GpRect*,GDIPCONST GpPoint*,GpMatrix**); -GpStatus WINGDIPAPI GdipCloneMatrix(GpMatrix*,GpMatrix**); -GpStatus WINGDIPAPI GdipDeleteMatrix(GpMatrix*); -GpStatus WINGDIPAPI GdipSetMatrixElements(GpMatrix*,REAL,REAL,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipMultiplyMatrix(GpMatrix*,GpMatrix*,GpMatrixOrder); -GpStatus WINGDIPAPI GdipTranslateMatrix(GpMatrix*,REAL,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipScaleMatrix(GpMatrix*,REAL,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipRotateMatrix(GpMatrix*,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipShearMatrix(GpMatrix*,REAL,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipInvertMatrix(GpMatrix*); -GpStatus WINGDIPAPI GdipTransformMatrixPoints(GpMatrix*,GpPointF*,INT); -GpStatus WINGDIPAPI GdipTransformMatrixPointsI(GpMatrix*,GpPoint*,INT); -GpStatus WINGDIPAPI GdipVectorTransformMatrixPoints(GpMatrix*,GpPointF*,INT); -GpStatus WINGDIPAPI GdipVectorTransformMatrixPointsI(GpMatrix*,GpPoint*,INT); -GpStatus WINGDIPAPI GdipGetMatrixElements(GDIPCONST GpMatrix*,REAL*); -GpStatus WINGDIPAPI GdipIsMatrixInvertible(GDIPCONST GpMatrix*,BOOL*); -GpStatus WINGDIPAPI GdipIsMatrixIdentity(GDIPCONST GpMatrix*,BOOL*); -GpStatus WINGDIPAPI GdipIsMatrixEqual(GDIPCONST GpMatrix*,GDIPCONST GpMatrix*,BOOL*); - -/* Metafile functions */ -GpStatus WINGDIPAPI GdipGetMetafileHeaderFromEmf(HENHMETAFILE,MetafileHeader*); -GpStatus WINGDIPAPI GdipGetMetafileHeaderFromFile(GDIPCONST WCHAR*,MetafileHeader*); -GpStatus WINGDIPAPI GdipGetMetafileHeaderFromStream(IStream*,MetafileHeader*); -GpStatus WINGDIPAPI GdipGetMetafileHeaderFromMetafile(GpMetafile*,MetafileHeader*); -GpStatus WINGDIPAPI GdipGetHemfFromMetafile(GpMetafile*,HENHMETAFILE*); -GpStatus WINGDIPAPI GdipCreateStreamOnFile(GDIPCONST WCHAR*,UINT,IStream**); -GpStatus WINGDIPAPI GdipCreateMetafileFromWmf(HMETAFILE,BOOL,GDIPCONST WmfPlaceableFileHeader*,GpMetafile**); -GpStatus WINGDIPAPI GdipCreateMetafileFromEmf(HENHMETAFILE,BOOL,GpMetafile**); -GpStatus WINGDIPAPI GdipCreateMetafileFromFile(GDIPCONST WCHAR*,GpMetafile**); -GpStatus WINGDIPAPI GdipCreateMetafileFromWmfFile(GDIPCONST WCHAR*,GDIPCONST WmfPlaceableFileHeader*,GpMetafile**); -GpStatus WINGDIPAPI GdipCreateMetafileFromStream(IStream*,GpMetafile**); -GpStatus WINGDIPAPI GdipRecordMetafile(HDC,EmfType,GDIPCONST GpRectF*,MetafileFrameUnit,GDIPCONST WCHAR*,GpMetafile**); -GpStatus WINGDIPAPI GdipRecordMetafileI(HDC,EmfType,GDIPCONST GpRect*,MetafileFrameUnit,GDIPCONST WCHAR*,GpMetafile**); -GpStatus WINGDIPAPI GdipRecordMetafileFileName(GDIPCONST WCHAR*,HDC,EmfType,GDIPCONST GpRectF*,MetafileFrameUnit,GDIPCONST WCHAR*,GpMetafile**); -GpStatus WINGDIPAPI GdipRecordMetafileFileNameI(GDIPCONST WCHAR*,HDC,EmfType,GDIPCONST GpRect*,MetafileFrameUnit,GDIPCONST WCHAR*,GpMetafile**); -GpStatus WINGDIPAPI GdipRecordMetafileStream(IStream*,HDC,EmfType,GDIPCONST GpRectF*,MetafileFrameUnit,GDIPCONST WCHAR*,GpMetafile**); -GpStatus WINGDIPAPI GdipRecordMetafileStreamI(IStream*,HDC,EmfType,GDIPCONST GpRect*,MetafileFrameUnit,GDIPCONST WCHAR*,GpMetafile**); -GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile*,EmfPlusRecordType,UINT,UINT,GDIPCONST BYTE*); -GpStatus WINGDIPAPI GdipSetMetafileDownLevelRasterizationLimit(GpMetafile*,UINT); -GpStatus WINGDIPAPI GdipGetMetafileDownLevelRasterizationLimit(GDIPCONST GpMetafile*,UINT*); -GpStatus WINGDIPAPI GdipConvertToEmfPlus(GDIPCONST GpGraphics*,GpMetafile*,BOOL*,EmfType,GDIPCONST WCHAR*,GpMetafile**); -GpStatus WINGDIPAPI GdipConvertToEmfPlusToFile(GDIPCONST GpGraphics*,GpMetafile*,BOOL*,GDIPCONST WCHAR*,EmfType,GDIPCONST WCHAR*,GpMetafile**); -GpStatus WINGDIPAPI GdipConvertToEmfPlusToStream(GDIPCONST GpGraphics*,GpMetafile*,BOOL*,IStream*,EmfType,GDIPCONST WCHAR*,GpMetafile**); -UINT WINGDIPAPI GdipEmfToWmfBits(HENHMETAFILE,UINT,LPBYTE,INT,INT); - -/* PathGradientBrush functions */ -GpStatus WINGDIPAPI GdipCreatePathGradient(GDIPCONST GpPointF*,INT,GpWrapMode,GpPathGradient**); -GpStatus WINGDIPAPI GdipCreatePathGradientI(GDIPCONST GpPoint*,INT,GpWrapMode,GpPathGradient**); -GpStatus WINGDIPAPI GdipCreatePathGradientFromPath(GDIPCONST GpPath*,GpPathGradient**); -GpStatus WINGDIPAPI GdipGetPathGradientCenterColor(GpPathGradient*,ARGB*); -GpStatus WINGDIPAPI GdipSetPathGradientCenterColor(GpPathGradient*,ARGB); -GpStatus WINGDIPAPI GdipGetPathGradientSurroundColorsWithCount(GpPathGradient*,ARGB*,INT*); -GpStatus WINGDIPAPI GdipSetPathGradientSurroundColorsWithCount(GpPathGradient*,GDIPCONST ARGB*,INT*); -GpStatus WINGDIPAPI GdipGetPathGradientPath(GpPathGradient*,GpPath*); -GpStatus WINGDIPAPI GdipSetPathGradientPath(GpPathGradient*,GDIPCONST GpPath*); -GpStatus WINGDIPAPI GdipGetPathGradientCenterPoint(GpPathGradient*,GpPointF*); -GpStatus WINGDIPAPI GdipGetPathGradientCenterPointI(GpPathGradient*,GpPoint*); -GpStatus WINGDIPAPI GdipSetPathGradientCenterPoint(GpPathGradient*,GDIPCONST GpPointF*); -GpStatus WINGDIPAPI GdipSetPathGradientCenterPointI(GpPathGradient*,GDIPCONST GpPoint*); -GpStatus WINGDIPAPI GdipGetPathGradientRect(GpPathGradient*,GpRectF*); -GpStatus WINGDIPAPI GdipGetPathGradientRectI(GpPathGradient*,GpRect*); -GpStatus WINGDIPAPI GdipGetPathGradientPointCount(GpPathGradient*,INT*); -GpStatus WINGDIPAPI GdipGetPathGradientSurroundColorCount(GpPathGradient*,INT*); -GpStatus WINGDIPAPI GdipSetPathGradientGammaCorrection(GpPathGradient*,BOOL); -GpStatus WINGDIPAPI GdipGetPathGradientGammaCorrection(GpPathGradient*,BOOL*); -GpStatus WINGDIPAPI GdipGetPathGradientBlendCount(GpPathGradient*,INT*); -GpStatus WINGDIPAPI GdipGetPathGradientBlend(GpPathGradient*,REAL*,REAL*,INT); -GpStatus WINGDIPAPI GdipSetPathGradientBlend(GpPathGradient*,GDIPCONST REAL*,GDIPCONST REAL*,INT); -GpStatus WINGDIPAPI GdipGetPathGradientPresetBlendCount(GpPathGradient*,INT*); -GpStatus WINGDIPAPI GdipGetPathGradientPresetBlend(GpPathGradient*,ARGB*,REAL*,INT); -GpStatus WINGDIPAPI GdipSetPathGradientPresetBlend(GpPathGradient*,GDIPCONST ARGB*,GDIPCONST REAL*,INT); -GpStatus WINGDIPAPI GdipSetPathGradientSigmaBlend(GpPathGradient*,REAL,REAL); -GpStatus WINGDIPAPI GdipSetPathGradientLinearBlend(GpPathGradient*,REAL,REAL); -GpStatus WINGDIPAPI GdipGetPathGradientWrapMode(GpPathGradient*,GpWrapMode*); -GpStatus WINGDIPAPI GdipSetPathGradientWrapMode(GpPathGradient*,GpWrapMode); -GpStatus WINGDIPAPI GdipGetPathGradientTransform(GpPathGradient*,GpMatrix*); -GpStatus WINGDIPAPI GdipSetPathGradientTransform(GpPathGradient*,GpMatrix*); -GpStatus WINGDIPAPI GdipResetPathGradientTransform(GpPathGradient*); -GpStatus WINGDIPAPI GdipMultiplyPathGradientTransform(GpPathGradient*,GDIPCONST GpMatrix*,GpMatrixOrder); -GpStatus WINGDIPAPI GdipTranslatePathGradientTransform(GpPathGradient*,REAL,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipScalePathGradientTransform(GpPathGradient*,REAL,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipRotatePathGradientTransform(GpPathGradient*,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipGetPathGradientFocusScales(GpPathGradient*,REAL*,REAL*); -GpStatus WINGDIPAPI GdipSetPathGradientFocusScales(GpPathGradient*,REAL,REAL); - -/* PathIterator functions */ -GpStatus WINGDIPAPI GdipCreatePathIter(GpPathIterator**,GpPath*); -GpStatus WINGDIPAPI GdipDeletePathIter(GpPathIterator*); -GpStatus WINGDIPAPI GdipPathIterNextSubpath(GpPathIterator*,INT*,INT*,INT*,BOOL*); -GpStatus WINGDIPAPI GdipPathIterNextSubpathPath(GpPathIterator*,INT*,GpPath*,BOOL*); -GpStatus WINGDIPAPI GdipPathIterNextPathType(GpPathIterator*,INT*,BYTE*,INT*,INT*); -GpStatus WINGDIPAPI GdipPathIterNextMarker(GpPathIterator*,INT*,INT*,INT*); -GpStatus WINGDIPAPI GdipPathIterNextMarkerPath(GpPathIterator*,INT*,GpPath*); -GpStatus WINGDIPAPI GdipPathIterGetCount(GpPathIterator*,INT*); -GpStatus WINGDIPAPI GdipPathIterGetSubpathCount(GpPathIterator*,INT*); -GpStatus WINGDIPAPI GdipPathIterIsValid(GpPathIterator*,BOOL*); -GpStatus WINGDIPAPI GdipPathIterHasCurve(GpPathIterator*,BOOL*); -GpStatus WINGDIPAPI GdipPathIterRewind(GpPathIterator*); -GpStatus WINGDIPAPI GdipPathIterEnumerate(GpPathIterator*,INT*,GpPointF*,BYTE*,INT); -GpStatus WINGDIPAPI GdipPathIterCopyData(GpPathIterator*,INT*,GpPointF*,BYTE*,INT,INT); - -/* Pen functions */ -GpStatus WINGDIPAPI GdipCreatePen1(ARGB,REAL,GpUnit,GpPen**); -GpStatus WINGDIPAPI GdipCreatePen2(GpBrush*,REAL,GpUnit,GpPen**); -GpStatus WINGDIPAPI GdipClonePen(GpPen*,GpPen**); -GpStatus WINGDIPAPI GdipDeletePen(GpPen*); -GpStatus WINGDIPAPI GdipSetPenWidth(GpPen*,REAL); -GpStatus WINGDIPAPI GdipGetPenWidth(GpPen*,REAL*); -GpStatus WINGDIPAPI GdipSetPenUnit(GpPen*,GpUnit); -GpStatus WINGDIPAPI GdipGetPenUnit(GpPen*,GpUnit*); -GpStatus WINGDIPAPI GdipSetPenLineCap197819(GpPen*,GpLineCap,GpLineCap,GpDashCap); -GpStatus WINGDIPAPI GdipSetPenStartCap(GpPen*,GpLineCap); -GpStatus WINGDIPAPI GdipSetPenEndCap(GpPen*,GpLineCap); -GpStatus WINGDIPAPI GdipSetPenDashCap197819(GpPen*,GpDashCap); -GpStatus WINGDIPAPI GdipGetPenStartCap(GpPen*,GpLineCap*); -GpStatus WINGDIPAPI GdipGetPenEndCap(GpPen*,GpLineCap*); -GpStatus WINGDIPAPI GdipGetPenDashCap197819(GpPen*,GpDashCap*); -GpStatus WINGDIPAPI GdipSetPenLineJoin(GpPen*,GpLineJoin); -GpStatus WINGDIPAPI GdipGetPenLineJoin(GpPen*,GpLineJoin*); -GpStatus WINGDIPAPI GdipSetPenCustomStartCap(GpPen*,GpCustomLineCap*); -GpStatus WINGDIPAPI GdipGetPenCustomStartCap(GpPen*,GpCustomLineCap**); -GpStatus WINGDIPAPI GdipSetPenCustomEndCap(GpPen*,GpCustomLineCap*); -GpStatus WINGDIPAPI GdipGetPenCustomEndCap(GpPen*,GpCustomLineCap**); -GpStatus WINGDIPAPI GdipSetPenMiterLimit(GpPen*,REAL); -GpStatus WINGDIPAPI GdipGetPenMiterLimit(GpPen*,REAL*); -GpStatus WINGDIPAPI GdipSetPenMode(GpPen*,GpPenAlignment); -GpStatus WINGDIPAPI GdipGetPenMode(GpPen*,GpPenAlignment*); -GpStatus WINGDIPAPI GdipSetPenTransform(GpPen*,GpMatrix*); -GpStatus WINGDIPAPI GdipGetPenTransform(GpPen*,GpMatrix*); -GpStatus WINGDIPAPI GdipResetPenTransform(GpPen*); -GpStatus WINGDIPAPI GdipMultiplyPenTransform(GpPen*,GDIPCONST GpMatrix*,GpMatrixOrder); -GpStatus WINGDIPAPI GdipTranslatePenTransform(GpPen*,REAL,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipScalePenTransform(GpPen*,REAL,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipRotatePenTransform(GpPen*,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipSetPenColor(GpPen*,ARGB); -GpStatus WINGDIPAPI GdipGetPenColor(GpPen*,ARGB*); -GpStatus WINGDIPAPI GdipSetPenBrushFill(GpPen*,GpBrush*); -GpStatus WINGDIPAPI GdipGetPenBrushFill(GpPen*,GpBrush**); -GpStatus WINGDIPAPI GdipGetPenFillType(GpPen*,GpPenType*); -GpStatus WINGDIPAPI GdipGetPenDashStyle(GpPen*,GpDashStyle*); -GpStatus WINGDIPAPI GdipSetPenDashStyle(GpPen*,GpDashStyle); -GpStatus WINGDIPAPI GdipGetPenDashOffset(GpPen*,REAL*); -GpStatus WINGDIPAPI GdipSetPenDashOffset(GpPen*,REAL); -GpStatus WINGDIPAPI GdipGetPenDashCount(GpPen*,INT*); -GpStatus WINGDIPAPI GdipSetPenDashArray(GpPen*,GDIPCONST REAL*,INT); -GpStatus WINGDIPAPI GdipGetPenDashArray(GpPen*,REAL*,INT); -GpStatus WINGDIPAPI GdipGetPenCompoundCount(GpPen*,INT*); -GpStatus WINGDIPAPI GdipSetPenCompoundArray(GpPen*,GDIPCONST REAL*,INT); -GpStatus WINGDIPAPI GdipGetPenCompoundArray(GpPen*,REAL*,INT); - -/* Region functions */ -GpStatus WINGDIPAPI GdipCreateRegion(GpRegion**); -GpStatus WINGDIPAPI GdipCreateRegionRect(GDIPCONST GpRectF*,GpRegion**); -GpStatus WINGDIPAPI GdipCreateRegionRectI(GDIPCONST GpRect*,GpRegion**); -GpStatus WINGDIPAPI GdipCreateRegionPath(GpPath*,GpRegion**); -GpStatus WINGDIPAPI GdipCreateRegionRgnData(GDIPCONST BYTE*,INT,GpRegion**); -GpStatus WINGDIPAPI GdipCreateRegionHrgn(HRGN,GpRegion**); -GpStatus WINGDIPAPI GdipCloneRegion(GpRegion*,GpRegion**); -GpStatus WINGDIPAPI GdipDeleteRegion(GpRegion*); -GpStatus WINGDIPAPI GdipSetInfinite(GpRegion*); -GpStatus WINGDIPAPI GdipSetEmpty(GpRegion*); -GpStatus WINGDIPAPI GdipCombineRegionRect(GpRegion*,GDIPCONST GpRectF*,CombineMode); -GpStatus WINGDIPAPI GdipCombineRegionRectI(GpRegion*,GDIPCONST GpRect*,CombineMode); -GpStatus WINGDIPAPI GdipCombineRegionPath(GpRegion*,GpPath*,CombineMode); -GpStatus WINGDIPAPI GdipCombineRegionRegion(GpRegion*,GpRegion*,CombineMode); -GpStatus WINGDIPAPI GdipTranslateRegion(GpRegion*,REAL,REAL); -GpStatus WINGDIPAPI GdipTranslateRegionI(GpRegion*,INT,INT); -GpStatus WINGDIPAPI GdipTransformRegion(GpRegion*,GpMatrix*); -GpStatus WINGDIPAPI GdipGetRegionBounds(GpRegion*,GpGraphics*,GpRectF*); -GpStatus WINGDIPAPI GdipGetRegionBoundsI(GpRegion*,GpGraphics*,GpRect*); -GpStatus WINGDIPAPI GdipGetRegionHRgn(GpRegion*,GpGraphics*,HRGN*); -GpStatus WINGDIPAPI GdipIsEmptyRegion(GpRegion*,GpGraphics*,BOOL*); -GpStatus WINGDIPAPI GdipIsInfiniteRegion(GpRegion*,GpGraphics*,BOOL*); -GpStatus WINGDIPAPI GdipIsEqualRegion(GpRegion*,GpRegion*,GpGraphics*,BOOL*); -GpStatus WINGDIPAPI GdipGetRegionDataSize(GpRegion*,UINT*); -GpStatus WINGDIPAPI GdipGetRegionData(GpRegion*,BYTE*,UINT,UINT*); -GpStatus WINGDIPAPI GdipIsVisibleRegionPoint(GpRegion*,REAL,REAL,GpGraphics*,BOOL*); -GpStatus WINGDIPAPI GdipIsVisibleRegionPointI(GpRegion*,INT,INT,GpGraphics*,BOOL*); -GpStatus WINGDIPAPI GdipIsVisibleRegionRect(GpRegion*,REAL,REAL,REAL,REAL,GpGraphics*,BOOL*); -GpStatus WINGDIPAPI GdipIsVisibleRegionRectI(GpRegion*,INT,INT,INT,INT,GpGraphics*,BOOL*); -GpStatus WINGDIPAPI GdipGetRegionScansCount(GpRegion*,UINT*,GpMatrix*); -GpStatus WINGDIPAPI GdipGetRegionScans(GpRegion*,GpRectF*,INT*,GpMatrix*); -GpStatus WINGDIPAPI GdipGetRegionScansI(GpRegion*,GpRect*,INT*,GpMatrix*); - -/* SolidBrush functions */ -GpStatus WINGDIPAPI GdipCreateSolidFill(ARGB,GpSolidFill**); -GpStatus WINGDIPAPI GdipSetSolidFillColor(GpSolidFill*,ARGB); -GpStatus WINGDIPAPI GdipGetSolidFillColor(GpSolidFill*,ARGB*); - -/* StringFormat functions */ -GpStatus WINGDIPAPI GdipCreateStringFormat(INT,LANGID,GpStringFormat**); -GpStatus WINGDIPAPI GdipStringFormatGetGenericDefault(GpStringFormat**); -GpStatus WINGDIPAPI GdipStringFormatGetGenericTypographic(GpStringFormat**); -GpStatus WINGDIPAPI GdipDeleteStringFormat(GpStringFormat*); -GpStatus WINGDIPAPI GdipCloneStringFormat(GDIPCONST GpStringFormat*,GpStringFormat**); -GpStatus WINGDIPAPI GdipSetStringFormatFlags(GpStringFormat*,INT); -GpStatus WINGDIPAPI GdipGetStringFormatFlags(GDIPCONST GpStringFormat*,INT*); -GpStatus WINGDIPAPI GdipSetStringFormatAlign(GpStringFormat*,StringAlignment); -GpStatus WINGDIPAPI GdipGetStringFormatAlign(GDIPCONST GpStringFormat*,StringAlignment*); -GpStatus WINGDIPAPI GdipSetStringFormatLineAlign(GpStringFormat*,StringAlignment); -GpStatus WINGDIPAPI GdipGetStringFormatLineAlign(GDIPCONST GpStringFormat*,StringAlignment*); -GpStatus WINGDIPAPI GdipSetStringFormatTrimming(GpStringFormat*,StringTrimming); -GpStatus WINGDIPAPI GdipGetStringFormatTrimming(GDIPCONST GpStringFormat*,StringTrimming*); -GpStatus WINGDIPAPI GdipSetStringFormatHotkeyPrefix(GpStringFormat*,INT); -GpStatus WINGDIPAPI GdipGetStringFormatHotkeyPrefix(GDIPCONST GpStringFormat*,INT*); -GpStatus WINGDIPAPI GdipSetStringFormatTabStops(GpStringFormat*,REAL,INT,GDIPCONST REAL*); -GpStatus WINGDIPAPI GdipGetStringFormatTabStops(GDIPCONST GpStringFormat*,INT,REAL*,REAL*); -GpStatus WINGDIPAPI GdipGetStringFormatTabStopCount(GDIPCONST GpStringFormat*,INT*); -GpStatus WINGDIPAPI GdipSetStringFormatDigitSubstitution(GpStringFormat*,LANGID,StringDigitSubstitute); -GpStatus WINGDIPAPI GdipGetStringFormatDigitSubstitution(GDIPCONST GpStringFormat*,LANGID*,StringDigitSubstitute*); -GpStatus WINGDIPAPI GdipGetStringFormatMeasurableCharacterRangeCount(GDIPCONST GpStringFormat*,INT*); -GpStatus WINGDIPAPI GdipSetStringFormatMeasurableCharacterRanges(GpStringFormat*,INT,GDIPCONST CharacterRange*); - -/* Text functions */ -GpStatus WINGDIPAPI GdipDrawString(GpGraphics*,GDIPCONST WCHAR*,INT,GDIPCONST GpFont*,GDIPCONST RectF*,GDIPCONST GpStringFormat*,GDIPCONST GpBrush*); -GpStatus WINGDIPAPI GdipMeasureString(GpGraphics*,GDIPCONST WCHAR*,INT,GDIPCONST GpFont*,GDIPCONST RectF*,GDIPCONST GpStringFormat*,RectF*,INT*,INT*); -#ifdef __cplusplus -GpStatus WINGDIPAPI GdipMeasureCharacterRanges(GpGraphics*,GDIPCONST WCHAR*,INT,GDIPCONST GpFont*,GDIPCONST RectF&,GDIPCONST GpStringFormat*,INT,GpRegion**); -#endif -GpStatus WINGDIPAPI GdipDrawDriverString(GpGraphics*,GDIPCONST UINT16*,INT,GDIPCONST GpFont*,GDIPCONST GpBrush*,GDIPCONST PointF*,INT,GDIPCONST GpMatrix*); -GpStatus WINGDIPAPI GdipMeasureDriverString(GpGraphics*,GDIPCONST UINT16*,INT,GDIPCONST GpFont*,GDIPCONST PointF*,INT,GDIPCONST GpMatrix*,RectF*); - -/* TextureBrush functions */ -GpStatus WINGDIPAPI GdipCreateTexture(GpImage*,GpWrapMode,GpTexture**); -GpStatus WINGDIPAPI GdipCreateTexture2(GpImage*,GpWrapMode,REAL,REAL,REAL,REAL,GpTexture**); -GpStatus WINGDIPAPI GdipCreateTexture2I(GpImage*,GpWrapMode,INT,INT,INT,INT,GpTexture**); -GpStatus WINGDIPAPI GdipCreateTextureIA(GpImage*,GDIPCONST GpImageAttributes*,REAL,REAL,REAL,REAL,GpTexture**); -GpStatus WINGDIPAPI GdipCreateTextureIAI(GpImage*,GDIPCONST GpImageAttributes*,INT,INT,INT,INT,GpTexture**); -GpStatus WINGDIPAPI GdipGetTextureTransform(GpTexture*,GpMatrix*); -GpStatus WINGDIPAPI GdipSetTextureTransform(GpTexture*,GDIPCONST GpMatrix*); -GpStatus WINGDIPAPI GdipResetTextureTransform(GpTexture*); -GpStatus WINGDIPAPI GdipMultiplyTextureTransform(GpTexture*,GDIPCONST GpMatrix*,GpMatrixOrder); -GpStatus WINGDIPAPI GdipTranslateTextureTransform(GpTexture*,REAL,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipScaleTextureTransform(GpTexture*,REAL,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipRotateTextureTransform(GpTexture*,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipSetTextureWrapMode(GpTexture*,GpWrapMode); -GpStatus WINGDIPAPI GdipGetTextureWrapMode(GpTexture*,GpWrapMode*); -GpStatus WINGDIPAPI GdipGetTextureImage(GpTexture*,GpImage**); - -/* uncategorized functions */ -GpStatus WINGDIPAPI GdipTestControl(GpTestControlEnum,void*); - -#ifdef __cplusplus -} /* extern "C" */ -} /* namespace DllExports */ -#endif - -#endif /* __GDIPLUS_FLAT_H */ diff --git a/src/gdiplus3/gdiplusgpstubs.h b/src/gdiplus3/gdiplusgpstubs.h deleted file mode 100644 index b11d4163..00000000 --- a/src/gdiplus3/gdiplusgpstubs.h +++ /dev/null @@ -1,139 +0,0 @@ -/* - * gdiplusgpstubs.h - * - * GDI+ Gp* type declarations - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_GPSTUBS_H -#define __GDIPLUS_GPSTUBS_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -typedef Point GpPoint; -typedef PointF GpPointF; -typedef Rect GpRect; -typedef RectF GpRectF; -typedef Size GpSize; -typedef SizeF GpSizeF; - -typedef enum BrushType GpBrushType; -typedef enum CombineMode GpCombineMode; -typedef enum CompositingMode GpCompositingMode; -typedef enum CompositingQuality GpCompositingQuality; -typedef enum CoordinateSpace GpCoordinateSpace; -typedef enum CustomLineCapType GpCustomLineCapType; -typedef enum DashCap GpDashCap; -typedef enum DashStyle GpDashStyle; -typedef enum DitherType GpDitherType; -typedef enum DriverStringOptions GpDriverStringOptions; -typedef enum EmfPlusRecordType GpEmfPlusRecordType; -typedef enum EmfToWmfBitsFlags GpEmfToWmfBitsFlags; -typedef enum EmfType GpEmfType; -typedef enum EncoderParameterValueType GpEncoderParameterValueType; -typedef enum EncoderValue GpEncoderValue; -typedef enum FillMode GpFillMode; -typedef enum FlushIntention GpFlushIntention; -typedef enum FontStyle GpFontStyle; -typedef enum HatchStyle GpHatchStyle; -typedef enum HotkeyPrefix GpHotkeyPrefix; -typedef enum ImageType GpImageType; -typedef enum InterpolationMode GpInterpolationMode; -typedef enum LinearGradientMode GpLinearGradientMode; -typedef enum LineCap GpLineCap; -typedef enum LineJoin GpLineJoin; -typedef enum MatrixOrder GpMatrixOrder; -typedef enum MetafileFrameUnit GpMetafileFrameUnit; -typedef enum MetafileType GpMetafileType; -typedef enum ObjectType GpObjectType; -typedef enum PathPointType GpPathPointType; -typedef enum PenAlignment GpPenAlignment; -typedef enum PenType GpPenType; -typedef enum PixelOffsetMode GpPixelOffsetMode; -typedef enum QualityMode GpQualityMode; -typedef enum SmoothingMode GpSmoothingMode; -typedef enum StringAlignment GpStringAlignment; -typedef enum StringDigitSubstitute GpStringDigitSubstitute; -typedef enum StringFormatFlags GpStringFormatFlags; -typedef enum StringTrimming GpStringTrimming; -typedef enum TextRenderingHint GpTextRenderingHint; -typedef enum Unit GpUnit; -typedef enum WarpMode GpWarpMode; -typedef enum WrapMode GpWrapMode; - -#ifdef __cplusplus - -class CGpEffect {}; -class GpCustomLineCap {}; -class GpImage {}; - -class GpAdjustableArrowCap: public GpCustomLineCap {}; -class GpBitmap: public GpImage {}; -class GpBrush {}; -class GpCachedBitmap {}; -class GpFont {}; -class GpFontCollection {}; -class GpFontFamily {}; -class GpGraphics {}; -class GpHatch: public GpBrush {}; /* HatchBrush */ -class GpImageAttributes {}; -class GpLineGradient: public GpBrush {}; /* LinearGradientBrush */ -class GpMatrix {}; -class GpMetafile: public GpImage {}; -class GpPath {}; /* GraphicsPath */ -class GpPathData {}; -class GpPathGradient: public GpBrush {}; /* PathGradientBrush */ -class GpPathIterator {}; /* GraphicsPathIterator */ -class GpPen {}; -class GpRegion {}; -class GpSolidFill: public GpBrush {}; /* SolidBrush */ -class GpStringFormat {}; -class GpTexture: public GpBrush {}; /* TextureBrush */ - -#else /* !__cplusplus */ - -typedef void CGpEffect; -typedef void GpAdjustableArrowCap; -typedef void GpBitmap; -typedef void GpBrush; -typedef void GpCachedBitmap; -typedef void GpCustomLineCap; -typedef void GpFont; -typedef void GpFontFamily; -typedef void GpFontCollection; -typedef void GpGraphics; -typedef void GpHatch; -typedef void GpImage; -typedef void GpImageAttributes; -typedef void GpLineGradient; -typedef void GpMatrix; -typedef void GpMetafile; -typedef void GpPath; -typedef void GpPathData; -typedef void GpPathGradient; -typedef void GpPathIterator; -typedef void GpPen; -typedef void GpRegion; -typedef void GpSolidFill; -typedef void GpStringFormat; -typedef void GpTexture; - -#endif /* !__cplusplus */ - -#endif /* __GDIPLUS_GPSTUBS_H */ diff --git a/src/gdiplus3/gdiplusgraphics.h b/src/gdiplus3/gdiplusgraphics.h deleted file mode 100644 index 360c897e..00000000 --- a/src/gdiplus3/gdiplusgraphics.h +++ /dev/null @@ -1,1540 +0,0 @@ -/* - * gdiplusgraphics.h - * - * GDI+ Graphics class - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_GRAPHICS_H -#define __GDIPLUS_GRAPHICS_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#ifndef __cplusplus -#error "A C++ compiler is required to include gdiplusgraphics.h." -#endif - -class Graphics: public GdiplusBase -{ - friend class Bitmap; - friend class CachedBitmap; - friend class Font; - friend class GraphicsPath; - friend class Metafile; - friend class Region; - -public: - static Graphics* FromHDC(HDC hdc) - { - return new Graphics(hdc); - } - static Graphics* FromHDC(HDC hdc, HANDLE hdevice) - { - return new Graphics(hdc, hdevice); - } - static Graphics* FromHWND(HWND hwnd, BOOL icm = FALSE) - { - return new Graphics(hwnd, icm); - } - static Graphics* FromImage(Image *image) - { - return new Graphics(image); - } - static HPALETTE GetHalftonePalette() - { - return DllExports::GdipCreateHalftonePalette(); - } - - Graphics(Image *image): nativeGraphics(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipGetImageGraphicsContext( - image ? image->nativeImage : NULL, - &nativeGraphics); - } - Graphics(HDC hdc): nativeGraphics(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipCreateFromHDC( - hdc, &nativeGraphics); - } - Graphics(HDC hdc, HANDLE hdevice): nativeGraphics(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipCreateFromHDC2( - hdc, hdevice, &nativeGraphics); - } - Graphics(HWND hwnd, BOOL icm = FALSE): - nativeGraphics(NULL), lastStatus(Ok) - { - if (icm) { - lastStatus = DllExports::GdipCreateFromHWNDICM( - hwnd, &nativeGraphics); - } else { - lastStatus = DllExports::GdipCreateFromHWND( - hwnd, &nativeGraphics); - } - } - ~Graphics() - { - DllExports::GdipDeleteGraphics(nativeGraphics); - } - - Status AddMetafileComment(const BYTE *data, UINT sizeData) - { - return updateStatus(DllExports::GdipComment( - nativeGraphics, sizeData, data)); - } - GraphicsContainer BeginContainer() - { - GraphicsContainer result = 0; - updateStatus(DllExports::GdipBeginContainer2( - nativeGraphics, &result)); - return result; - } - GraphicsContainer BeginContainer(const RectF& dstrect, - const RectF& srcrect, Unit unit) - { - GraphicsContainer result = 0; - updateStatus(DllExports::GdipBeginContainer( - nativeGraphics, &dstrect, &srcrect, unit, - &result)); - return result; - } - GraphicsContainer BeginContainer(const Rect& dstrect, - const Rect& srcrect, Unit unit) - { - GraphicsContainer result = 0; - updateStatus(DllExports::GdipBeginContainerI( - nativeGraphics, &dstrect, &srcrect, unit, - &result)); - return result; - } - Status Clear(const Color& color) - { - return updateStatus(DllExports::GdipGraphicsClear( - nativeGraphics, color.GetValue())); - } - Status DrawArc(const Pen *pen, REAL x, REAL y, REAL width, REAL height, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipDrawArc( - nativeGraphics, pen ? pen->nativePen : NULL, - x, y, width, height, startAngle, sweepAngle)); - } - Status DrawArc(const Pen *pen, INT x, INT y, INT width, INT height, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipDrawArcI( - nativeGraphics, pen ? pen->nativePen : NULL, - x, y, width, height, startAngle, sweepAngle)); - } - Status DrawArc(const Pen *pen, const RectF& rect, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipDrawArc( - nativeGraphics, pen ? pen->nativePen : NULL, - rect.X, rect.Y, rect.Width, rect.Height, - startAngle, sweepAngle)); - } - Status DrawArc(const Pen *pen, const Rect& rect, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipDrawArcI( - nativeGraphics, pen ? pen->nativePen : NULL, - rect.X, rect.Y, rect.Width, rect.Height, - startAngle, sweepAngle)); - } - Status DrawBezier(const Pen *pen, - REAL x1, REAL y1, REAL x2, REAL y2, - REAL x3, REAL y3, REAL x4, REAL y4) - { - return updateStatus(DllExports::GdipDrawBezier( - nativeGraphics, pen ? pen->nativePen : NULL, - x1, y1, x2, y2, x3, y3, x4, y4)); - } - Status DrawBezier(const Pen *pen, - INT x1, INT y1, INT x2, INT y2, - INT x3, INT y3, INT x4, INT y4) - { - return updateStatus(DllExports::GdipDrawBezierI( - nativeGraphics, pen ? pen->nativePen : NULL, - x1, y1, x2, y2, x3, y3, x4, y4)); - } - Status DrawBezier(const Pen *pen, - const PointF& pt1, const PointF& pt2, - const PointF& pt3, const PointF& pt4) - { - return updateStatus(DllExports::GdipDrawBezier( - nativeGraphics, pen ? pen->nativePen : NULL, - pt1.X, pt1.Y, pt2.X, pt2.Y, - pt3.X, pt3.Y, pt4.X, pt4.Y)); - } - Status DrawBezier(const Pen *pen, - const Point& pt1, const Point& pt2, - const Point& pt3, const Point& pt4) - { - return updateStatus(DllExports::GdipDrawBezierI( - nativeGraphics, pen ? pen->nativePen : NULL, - pt1.X, pt1.Y, pt2.X, pt2.Y, - pt3.X, pt3.Y, pt4.X, pt4.Y)); - } - Status DrawBeziers(const Pen *pen, const PointF *points, INT count) - { - return updateStatus(DllExports::GdipDrawBeziers( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count)); - } - Status DrawBeziers(const Pen *pen, const Point *points, INT count) - { - return updateStatus(DllExports::GdipDrawBeziersI( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count)); - } - Status DrawCachedBitmap(CachedBitmap *cb, INT x, INT y) - { - return updateStatus(DllExports::GdipDrawCachedBitmap( - nativeGraphics, - cb ? cb->nativeCachedBitmap : NULL, - x, y)); - } - Status DrawClosedCurve(const Pen *pen, const PointF *points, INT count) - { - return updateStatus(DllExports::GdipDrawClosedCurve( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count)); - } - Status DrawClosedCurve(const Pen *pen, const Point *points, INT count) - { - return updateStatus(DllExports::GdipDrawClosedCurveI( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count)); - } - Status DrawClosedCurve(const Pen *pen, const PointF *points, INT count, - REAL tension) - { - return updateStatus(DllExports::GdipDrawClosedCurve2( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count, tension)); - } - Status DrawClosedCurve(const Pen *pen, const Point *points, INT count, - REAL tension) - { - return updateStatus(DllExports::GdipDrawClosedCurve2I( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count, tension)); - } - Status DrawCurve(const Pen *pen, const PointF *points, INT count) - { - return updateStatus(DllExports::GdipDrawCurve( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count)); - } - Status DrawCurve(const Pen *pen, const Point *points, INT count) - { - return updateStatus(DllExports::GdipDrawCurveI( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count)); - } - Status DrawCurve(const Pen *pen, const PointF *points, INT count, - REAL tension) - { - return updateStatus(DllExports::GdipDrawCurve2( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count, tension)); - } - Status DrawCurve(const Pen *pen, const Point *points, INT count, - REAL tension) - { - return updateStatus(DllExports::GdipDrawCurve2I( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count, tension)); - } - Status DrawCurve(const Pen *pen, const PointF *points, INT count, - INT offset, INT numberOfSegments, REAL tension) - { - return updateStatus(DllExports::GdipDrawCurve3( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count, offset, - numberOfSegments, tension)); - } - Status DrawCurve(const Pen *pen, const Point *points, INT count, - INT offset, INT numberOfSegments, REAL tension) - { - return updateStatus(DllExports::GdipDrawCurve3I( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count, offset, - numberOfSegments, tension)); - } - Status DrawDriverString(const UINT16 *text, INT length, - const Font *font, const Brush *brush, - const PointF *positions, INT flags, - const Matrix *matrix) - { - return updateStatus(DllExports::GdipDrawDriverString( - nativeGraphics, text, length, - font ? font->nativeFont : NULL, - brush ? brush->nativeBrush : NULL, - positions, flags, - matrix ? matrix->nativeMatrix : NULL)); - } - Status DrawEllipse(const Pen *pen, - REAL x, REAL y, REAL width, REAL height) - { - return updateStatus(DllExports::GdipDrawEllipse( - nativeGraphics, pen ? pen->nativePen : NULL, - x, y, width, height)); - } - Status DrawEllipse(const Pen *pen, INT x, INT y, INT width, INT height) - { - return updateStatus(DllExports::GdipDrawEllipseI( - nativeGraphics, pen ? pen->nativePen : NULL, - x, y, width, height)); - } - Status DrawEllipse(const Pen *pen, const RectF& rect) - { - return updateStatus(DllExports::GdipDrawEllipse( - nativeGraphics, pen ? pen->nativePen : NULL, - rect.X, rect.Y, rect.Width, rect.Height)); - } - Status DrawEllipse(const Pen *pen, const Rect& rect) - { - return updateStatus(DllExports::GdipDrawEllipseI( - nativeGraphics, pen ? pen->nativePen : NULL, - rect.X, rect.Y, rect.Width, rect.Height)); - } - Status DrawImage(Image *image, REAL x, REAL y) - { - return updateStatus(DllExports::GdipDrawImage( - nativeGraphics, - image ? image->nativeImage : NULL, - x, y)); - } - Status DrawImage(Image *image, INT x, INT y) - { - return updateStatus(DllExports::GdipDrawImageI( - nativeGraphics, - image ? image->nativeImage : NULL, - x, y)); - } - Status DrawImage(Image *image, const PointF& point) - { - return updateStatus(DllExports::GdipDrawImage( - nativeGraphics, - image ? image->nativeImage : NULL, - point.X, point.Y)); - } - Status DrawImage(Image *image, const Point& point) - { - return updateStatus(DllExports::GdipDrawImageI( - nativeGraphics, - image ? image->nativeImage : NULL, - point.X, point.Y)); - } - Status DrawImage(Image *image, REAL x, REAL y, REAL width, REAL height) - { - return updateStatus(DllExports::GdipDrawImageRect( - nativeGraphics, - image ? image->nativeImage : NULL, - x, y, width, height)); - } - Status DrawImage(Image *image, INT x, INT y, INT width, INT height) - { - return updateStatus(DllExports::GdipDrawImageRectI( - nativeGraphics, - image ? image->nativeImage : NULL, - x, y, width, height)); - } - Status DrawImage(Image *image, const RectF& rect) - { - return updateStatus(DllExports::GdipDrawImageRect( - nativeGraphics, - image ? image->nativeImage : NULL, - rect.X, rect.Y, rect.Width, rect.Height)); - } - Status DrawImage(Image *image, const Rect& rect) - { - return updateStatus(DllExports::GdipDrawImageRectI( - nativeGraphics, - image ? image->nativeImage : NULL, - rect.X, rect.Y, rect.Width, rect.Height)); - } - Status DrawImage(Image *image, const PointF *destPoints, INT count) - { - return updateStatus(DllExports::GdipDrawImagePoints( - nativeGraphics, - image ? image->nativeImage : NULL, - destPoints, count)); - } - Status DrawImage(Image *image, const Point *destPoints, INT count) - { - return updateStatus(DllExports::GdipDrawImagePointsI( - nativeGraphics, - image ? image->nativeImage : NULL, - destPoints, count)); - } - Status DrawImage(Image *image, REAL x, REAL y, REAL srcx, REAL srcy, - REAL srcwidth, REAL srcheight, Unit srcUnit) - { - return updateStatus(DllExports::GdipDrawImagePointRect( - nativeGraphics, - image ? image->nativeImage : NULL, - x, y, srcx, srcy, srcwidth, srcheight, - srcUnit)); - } - Status DrawImage(Image *image, INT x, INT y, INT srcx, INT srcy, - INT srcwidth, INT srcheight, Unit srcUnit) - { - return updateStatus(DllExports::GdipDrawImagePointRectI( - nativeGraphics, - image ? image->nativeImage : NULL, - x, y, srcx, srcy, srcwidth, srcheight, - srcUnit)); - } - Status DrawImage(Image *image, const RectF& destRect, - REAL srcx, REAL srcy, REAL srcwidth, REAL srcheight, - Unit srcUnit, - const ImageAttributes *imageAttributes = NULL, - DrawImageAbort callback = NULL, - VOID *callbackData = NULL) - { - return updateStatus(DllExports::GdipDrawImageRectRect( - nativeGraphics, - image ? image->nativeImage : NULL, - destRect.X, destRect.Y, - destRect.Width, destRect.Height, - srcx, srcy, srcwidth, srcheight, srcUnit, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL, - callback, callbackData)); - } - Status DrawImage(Image *image, const Rect& destRect, - INT srcx, INT srcy, INT srcwidth, INT srcheight, - Unit srcUnit, - const ImageAttributes *imageAttributes = NULL, - DrawImageAbort callback = NULL, - VOID *callbackData = NULL) - { - return updateStatus(DllExports::GdipDrawImageRectRectI( - nativeGraphics, - image ? image->nativeImage : NULL, - destRect.X, destRect.Y, - destRect.Width, destRect.Height, - srcx, srcy, srcwidth, srcheight, srcUnit, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL, - callback, callbackData)); - } - Status DrawImage(Image *image, const RectF& destRect, - const RectF& sourceRect, Unit srcUnit, - const ImageAttributes *imageAttributes = NULL) - { - return updateStatus(DllExports::GdipDrawImageRectRectI( - nativeGraphics, - image ? image->nativeImage : NULL, - destRect.X, destRect.Y, - destRect.Width, destRect.Height, - sourceRect.X, sourceRect.Y, - sourceRect.Width, sourceRect.Height, srcUnit, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL, - NULL, NULL)); - } - Status DrawImage(Image *image, const PointF *destPoints, INT count, - REAL srcx, REAL srcy, REAL srcwidth, REAL srcheight, - Unit srcUnit, - const ImageAttributes *imageAttributes = NULL, - DrawImageAbort callback = NULL, - VOID *callbackData = NULL) - { - return updateStatus(DllExports::GdipDrawImagePointsRect( - nativeGraphics, - image ? image->nativeImage : NULL, - destPoints, count, - srcx, srcy, srcwidth, srcheight, srcUnit, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL, - callback, callbackData)); - } - Status DrawImage(Image *image, const Point *destPoints, INT count, - INT srcx, INT srcy, INT srcwidth, INT srcheight, - Unit srcUnit, - const ImageAttributes *imageAttributes = NULL, - DrawImageAbort callback = NULL, - VOID *callbackData = NULL) - { - return updateStatus(DllExports::GdipDrawImagePointsRectI( - nativeGraphics, - image ? image->nativeImage : NULL, - destPoints, count, - srcx, srcy, srcwidth, srcheight, srcUnit, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL, - callback, callbackData)); - } - // TODO: [GDI+ 1.1] Graphics::DrawImage(..Effect..) - //Status DrawImage(Image *image, RectF *sourceRect, Matrix *matrix, - // Effect *effect, ImageAttributes *imageAttributes, - // Unit srcUnit) - //{ - // return updateStatus(DllExports::GdipDrawImageFX( - // nativeGraphics, - // image ? image->nativeImage : NULL, - // sourceRect, - // matrix ? matrix->nativeMatrix : NULL, - // effect ? effect->nativeEffect : NULL, - // imageAttributes ? imageAttributes->nativeImageAttributes : NULL, - // srcUnit)); - //} - Status DrawLine(const Pen *pen, REAL x1, REAL y1, REAL x2, REAL y2) - { - return updateStatus(DllExports::GdipDrawLine( - nativeGraphics, pen ? pen->nativePen : NULL, - x1, y1, x2, y2)); - } - Status DrawLine(const Pen *pen, INT x1, INT y1, INT x2, INT y2) - { - return updateStatus(DllExports::GdipDrawLineI( - nativeGraphics, pen ? pen->nativePen : NULL, - x1, y1, x2, y2)); - } - Status DrawLine(const Pen *pen, const PointF& pt1, const PointF& pt2) - { - return updateStatus(DllExports::GdipDrawLine( - nativeGraphics, pen ? pen->nativePen : NULL, - pt1.X, pt1.Y, pt2.X, pt2.Y)); - } - Status DrawLine(const Pen *pen, const Point& pt1, const Point& pt2) - { - return updateStatus(DllExports::GdipDrawLineI( - nativeGraphics, pen ? pen->nativePen : NULL, - pt1.X, pt1.Y, pt2.X, pt2.Y)); - } - Status DrawLines(const Pen *pen, const PointF *points, INT count) - { - return updateStatus(DllExports::GdipDrawLines( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count)); - } - Status DrawLines(const Pen *pen, const Point *points, INT count) - { - return updateStatus(DllExports::GdipDrawLinesI( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count)); - } - Status DrawPath(const Pen *pen, const GraphicsPath *path) - { - return updateStatus(DllExports::GdipDrawPath( - nativeGraphics, pen ? pen->nativePen : NULL, - path ? path->nativePath : NULL)); - } - Status DrawPie(const Pen *pen, REAL x, REAL y, REAL width, REAL height, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipDrawPie( - nativeGraphics, pen ? pen->nativePen : NULL, - x, y, width, height, startAngle, sweepAngle)); - } - Status DrawPie(const Pen *pen, INT x, INT y, INT width, INT height, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipDrawPieI( - nativeGraphics, pen ? pen->nativePen : NULL, - x, y, width, height, startAngle, sweepAngle)); - } - Status DrawPie(const Pen *pen, const RectF& rect, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipDrawPie( - nativeGraphics, pen ? pen->nativePen : NULL, - rect.X, rect.Y, rect.Width, rect.Height, - startAngle, sweepAngle)); - } - Status DrawPie(const Pen *pen, const Rect& rect, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipDrawPieI( - nativeGraphics, pen ? pen->nativePen : NULL, - rect.X, rect.Y, rect.Width, rect.Height, - startAngle, sweepAngle)); - } - Status DrawPolygon(const Pen *pen, const PointF *points, INT count) - { - return updateStatus(DllExports::GdipDrawPolygon( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count)); - } - Status DrawPolygon(const Pen *pen, const Point *points, INT count) - { - return updateStatus(DllExports::GdipDrawPolygonI( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count)); - } - Status DrawRectangle(const Pen *pen, - REAL x, REAL y, REAL width, REAL height) - { - return updateStatus(DllExports::GdipDrawRectangle( - nativeGraphics, pen ? pen->nativePen : NULL, - x, y, width, height)); - } - Status DrawRectangle(const Pen *pen, - INT x, INT y, INT width, INT height) - { - return updateStatus(DllExports::GdipDrawRectangleI( - nativeGraphics, pen ? pen->nativePen : NULL, - x, y, width, height)); - } - Status DrawRectangle(const Pen *pen, const RectF& rect) - { - return updateStatus(DllExports::GdipDrawRectangle( - nativeGraphics, pen ? pen->nativePen : NULL, - rect.X, rect.Y, rect.Width, rect.Height)); - } - Status DrawRectangle(const Pen *pen, const Rect& rect) - { - return updateStatus(DllExports::GdipDrawRectangleI( - nativeGraphics, pen ? pen->nativePen : NULL, - rect.X, rect.Y, rect.Width, rect.Height)); - } - Status DrawRectangles(const Pen *pen, const RectF *rects, INT count) - { - return updateStatus(DllExports::GdipDrawRectangles( - nativeGraphics, pen ? pen->nativePen : NULL, - rects, count)); - } - Status DrawRectangles(const Pen *pen, const Rect *rects, INT count) - { - return updateStatus(DllExports::GdipDrawRectanglesI( - nativeGraphics, pen ? pen->nativePen : NULL, - rects, count)); - } - Status DrawString(const WCHAR *string, INT length, const Font *font, - const PointF& origin, const Brush *brush) - { - RectF layoutRect(origin.X, origin.Y, 0.0f, 0.0f); - return updateStatus(DllExports::GdipDrawString( - nativeGraphics, string, length, - font ? font->nativeFont : NULL, - &layoutRect, NULL, - brush ? brush->nativeBrush : NULL)); - } - Status DrawString(const WCHAR *string, INT length, - const Font *font, const PointF& origin, - const StringFormat *stringFormat, const Brush *brush) - { - RectF layoutRect(origin.X, origin.Y, 0.0f, 0.0f); - return updateStatus(DllExports::GdipDrawString( - nativeGraphics, string, length, - font ? font->nativeFont : NULL, - &layoutRect, - stringFormat ? stringFormat->nativeStringFormat : NULL, - brush ? brush->nativeBrush : NULL)); - } - Status DrawString(const WCHAR *string, INT length, - const Font *font, const RectF& layoutRect, - const StringFormat *stringFormat, const Brush *brush) - { - return updateStatus(DllExports::GdipDrawString( - nativeGraphics, string, length, - font ? font->nativeFont : NULL, - &layoutRect, - stringFormat ? stringFormat->nativeStringFormat : NULL, - brush ? brush->nativeBrush : NULL)); - } - Status EndContainer(GraphicsContainer state) - { - return updateStatus(DllExports::GdipEndContainer( - nativeGraphics, state)); - } - Status EnumerateMetafile(const Metafile *metafile, - const PointF& destPoint, - EnumerateMetafileProc callback, - VOID *callbackData = NULL, - ImageAttributes *imageAttributes = NULL) - { - return updateStatus(DllExports::GdipEnumerateMetafileDestPoint( - nativeGraphics, - metafile ? ((GpMetafile*) metafile->nativeImage) : NULL, - destPoint, callback, callbackData, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL)); - } - Status EnumerateMetafile(const Metafile *metafile, - const Point& destPoint, - EnumerateMetafileProc callback, - VOID *callbackData = NULL, - ImageAttributes *imageAttributes = NULL) - { - return updateStatus(DllExports::GdipEnumerateMetafileDestPointI( - nativeGraphics, - metafile ? ((GpMetafile*) metafile->nativeImage) : NULL, - destPoint, callback, callbackData, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL)); - } - Status EnumerateMetafile(const Metafile *metafile, - const RectF& destRect, - EnumerateMetafileProc callback, - VOID *callbackData = NULL, - ImageAttributes *imageAttributes = NULL) - { - return updateStatus(DllExports::GdipEnumerateMetafileDestRect( - nativeGraphics, - metafile ? ((GpMetafile*) metafile->nativeImage) : NULL, - destRect, callback, callbackData, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL)); - } - Status EnumerateMetafile(const Metafile *metafile, - const Rect& destRect, - EnumerateMetafileProc callback, - VOID *callbackData = NULL, - ImageAttributes *imageAttributes = NULL) - { - return updateStatus(DllExports::GdipEnumerateMetafileDestRectI( - nativeGraphics, - metafile ? ((GpMetafile*) metafile->nativeImage) : NULL, - destRect, callback, callbackData, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL)); - } - Status EnumerateMetafile(const Metafile *metafile, - const PointF *destPoints, INT count, - EnumerateMetafileProc callback, - VOID *callbackData = NULL, - ImageAttributes *imageAttributes = NULL) - { - return updateStatus(DllExports::GdipEnumerateMetafileDestPoints( - nativeGraphics, - metafile ? ((GpMetafile*) metafile->nativeImage) : NULL, - destPoints, count, callback, callbackData, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL)); - } - Status EnumerateMetafile(const Metafile *metafile, - const Point *destPoints, INT count, - EnumerateMetafileProc callback, - VOID *callbackData = NULL, - ImageAttributes *imageAttributes = NULL) - { - return updateStatus(DllExports::GdipEnumerateMetafileDestPointsI( - nativeGraphics, - metafile ? ((GpMetafile*) metafile->nativeImage) : NULL, - destPoints, count, callback, callbackData, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL)); - } - Status EnumerateMetafile(const Metafile *metafile, - const PointF& destPoint, - const RectF& srcRect, Unit srcUnit, - EnumerateMetafileProc callback, - VOID *callbackData = NULL, - ImageAttributes *imageAttributes = NULL) - { - return updateStatus(DllExports::GdipEnumerateMetafileSrcRectDestPoint( - nativeGraphics, - metafile ? ((GpMetafile*) metafile->nativeImage) : NULL, - destPoint, srcRect, srcUnit, - callback, callbackData, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL)); - } - Status EnumerateMetafile(const Metafile *metafile, - const Point& destPoint, - const Rect& srcRect, Unit srcUnit, - EnumerateMetafileProc callback, - VOID *callbackData = NULL, - ImageAttributes *imageAttributes = NULL) - { - return updateStatus(DllExports::GdipEnumerateMetafileSrcRectDestPointI( - nativeGraphics, - metafile ? ((GpMetafile*) metafile->nativeImage) : NULL, - destPoint, srcRect, srcUnit, - callback, callbackData, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL)); - } - Status EnumerateMetafile(const Metafile *metafile, - const RectF& destRect, - const RectF& srcRect, Unit srcUnit, - EnumerateMetafileProc callback, - VOID *callbackData = NULL, - ImageAttributes *imageAttributes = NULL) - { - return updateStatus(DllExports::GdipEnumerateMetafileSrcRectDestRect( - nativeGraphics, - metafile ? ((GpMetafile*) metafile->nativeImage) : NULL, - destRect, srcRect, srcUnit, - callback, callbackData, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL)); - } - Status EnumerateMetafile(const Metafile *metafile, - const Rect& destRect, - const Rect& srcRect, Unit srcUnit, - EnumerateMetafileProc callback, - VOID *callbackData = NULL, - ImageAttributes *imageAttributes = NULL) - { - return updateStatus(DllExports::GdipEnumerateMetafileSrcRectDestRectI( - nativeGraphics, - metafile ? ((GpMetafile*) metafile->nativeImage) : NULL, - destRect, srcRect, srcUnit, - callback, callbackData, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL)); - } - Status EnumerateMetafile(const Metafile *metafile, - const PointF* destPoints, INT count, - const RectF& srcRect, Unit srcUnit, - EnumerateMetafileProc callback, - VOID *callbackData = NULL, - ImageAttributes *imageAttributes = NULL) - { - return updateStatus(DllExports::GdipEnumerateMetafileSrcRectDestPoints( - nativeGraphics, - metafile ? ((GpMetafile*) metafile->nativeImage) : NULL, - destPoints, count, srcRect, srcUnit, - callback, callbackData, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL)); - } - Status EnumerateMetafile(const Metafile *metafile, - const Point* destPoints, INT count, - const Rect& srcRect, Unit srcUnit, - EnumerateMetafileProc callback, - VOID *callbackData = NULL, - ImageAttributes *imageAttributes = NULL) - { - return updateStatus(DllExports::GdipEnumerateMetafileSrcRectDestPointsI( - nativeGraphics, - metafile ? ((GpMetafile*) metafile->nativeImage) : NULL, - destPoints, count, srcRect, srcUnit, - callback, callbackData, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL)); - } - Status ExcludeClip(const RectF& rect) - { - return updateStatus(DllExports::GdipSetClipRect( - nativeGraphics, - rect.X, rect.Y, rect.Width, rect.Height, - CombineModeExclude)); - } - Status ExcludeClip(const Rect& rect) - { - return updateStatus(DllExports::GdipSetClipRectI( - nativeGraphics, - rect.X, rect.Y, rect.Width, rect.Height, - CombineModeExclude)); - } - Status ExcludeClip(const Region *region) - { - return updateStatus(DllExports::GdipSetClipRegion( - nativeGraphics, - region ? region->nativeRegion : NULL, - CombineModeExclude)); - } - Status FillClosedCurve(const Brush *brush, - const PointF *points, INT count) - { - return updateStatus(DllExports::GdipFillClosedCurve( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - points, count)); - } - Status FillClosedCurve(const Brush *brush, - const Point *points, INT count) - { - return updateStatus(DllExports::GdipFillClosedCurveI( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - points, count)); - } - Status FillClosedCurve(const Brush *brush, - const PointF *points, INT count, - FillMode fillMode, REAL tension = 0.5f) - { - return updateStatus(DllExports::GdipFillClosedCurve2( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - points, count, tension, fillMode)); - } - Status FillClosedCurve(const Brush *brush, - const Point *points, INT count, - FillMode fillMode, REAL tension = 0.5f) - { - return updateStatus(DllExports::GdipFillClosedCurve2I( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - points, count, tension, fillMode)); - } - Status FillEllipse(const Brush *brush, - REAL x, REAL y, REAL width, REAL height) - { - return updateStatus(DllExports::GdipFillEllipse( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - x, y, width, height)); - } - Status FillEllipse(const Brush *brush, - INT x, INT y, INT width, INT height) - { - return updateStatus(DllExports::GdipFillEllipseI( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - x, y, width, height)); - } - Status FillEllipse(const Brush *brush, const RectF& rect) - { - return updateStatus(DllExports::GdipFillEllipse( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - rect.X, rect.Y, rect.Width, rect.Height)); - } - Status FillEllipse(const Brush *brush, const Rect& rect) - { - return updateStatus(DllExports::GdipFillEllipseI( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - rect.X, rect.Y, rect.Width, rect.Height)); - } - Status FillPath(const Brush *brush, const GraphicsPath *path) - { - return updateStatus(DllExports::GdipFillPath( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - path ? path->nativePath : NULL)); - } - Status FillPie(const Brush *brush, - REAL x, REAL y, REAL width, REAL height, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipFillPie( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - x, y, width, height, startAngle, sweepAngle)); - } - Status FillPie(const Brush *brush, INT x, INT y, INT width, INT height, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipFillPieI( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - x, y, width, height, startAngle, sweepAngle)); - } - Status FillPie(const Brush *brush, const RectF& rect, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipFillPie( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - rect.X, rect.Y, rect.Width, rect.Height, - startAngle, sweepAngle)); - } - Status FillPie(const Brush *brush, const Rect& rect, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipFillPieI( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - rect.X, rect.Y, rect.Width, rect.Height, - startAngle, sweepAngle)); - } - Status FillPolygon(const Brush *brush, const PointF *points, INT count) - { - return updateStatus(DllExports::GdipFillPolygon( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - points, count, FillModeAlternate)); - } - Status FillPolygon(const Brush *brush, const Point *points, INT count) - { - return updateStatus(DllExports::GdipFillPolygonI( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - points, count, FillModeAlternate)); - } - Status FillPolygon(const Brush *brush, const PointF *points, INT count, - FillMode fillMode) - { - return updateStatus(DllExports::GdipFillPolygon( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - points, count, fillMode)); - } - Status FillPolygon(const Brush *brush, const Point *points, INT count, - FillMode fillMode) - { - return updateStatus(DllExports::GdipFillPolygonI( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - points, count, fillMode)); - } - Status FillRectangle(const Brush *brush, - REAL x, REAL y, REAL width, REAL height) - { - return updateStatus(DllExports::GdipFillRectangle( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - x, y, width, height)); - } - Status FillRectangle(const Brush *brush, - INT x, INT y, INT width, INT height) - { - return updateStatus(DllExports::GdipFillRectangleI( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - x, y, width, height)); - } - Status FillRectangle(const Brush *brush, const RectF& rect) - { - return updateStatus(DllExports::GdipFillRectangle( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - rect.X, rect.Y, rect.Width, rect.Height)); - } - Status FillRectangle(const Brush *brush, const Rect& rect) - { - return updateStatus(DllExports::GdipFillRectangleI( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - rect.X, rect.Y, rect.Width, rect.Height)); - } - Status FillRectangles(const Brush *brush, const RectF *rects, INT count) - { - return updateStatus(DllExports::GdipFillRectangles( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - rects, count)); - } - Status FillRectangles(const Brush *brush, const Rect *rects, INT count) - { - return updateStatus(DllExports::GdipFillRectanglesI( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - rects, count)); - } - Status FillRegion(const Brush *brush, const Region *region) - { - return updateStatus(DllExports::GdipFillRegion( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - region ? region->nativeRegion : NULL)); - } - VOID Flush(FlushIntention intention = FlushIntentionFlush) - { - updateStatus(DllExports::GdipFlush(nativeGraphics, intention)); - } - Status GetClip(Region *region) const - { - return updateStatus(DllExports::GdipGetClip( - nativeGraphics, - region ? region->nativeRegion : NULL)); - } - Status GetClipBounds(RectF *rect) const - { - return updateStatus(DllExports::GdipGetClipBounds( - nativeGraphics, rect)); - } - Status GetClipBounds(Rect *rect) const - { - return updateStatus(DllExports::GdipGetClipBoundsI( - nativeGraphics, rect)); - } - CompositingMode GetCompositingMode() const - { - CompositingMode result = CompositingModeSourceOver; - updateStatus(DllExports::GdipGetCompositingMode( - nativeGraphics, &result)); - return result; - } - CompositingQuality GetCompositingQuality() const - { - CompositingQuality result = CompositingQualityDefault; - updateStatus(DllExports::GdipGetCompositingQuality( - nativeGraphics, &result)); - return result; - } - REAL GetDpiX() const - { - REAL result = 0.0f; - updateStatus(DllExports::GdipGetDpiX(nativeGraphics, &result)); - return result; - } - REAL GetDpiY() const - { - REAL result = 0.0f; - updateStatus(DllExports::GdipGetDpiY(nativeGraphics, &result)); - return result; - } - HDC GetHDC() - { - HDC result = NULL; - updateStatus(DllExports::GdipGetDC(nativeGraphics, &result)); - return result; - } - InterpolationMode GetInterpolationMode() const - { - InterpolationMode result = InterpolationModeDefault; - updateStatus(DllExports::GdipGetInterpolationMode( - nativeGraphics, &result)); - return result; - } - Status GetLastStatus() const - { - Status result = lastStatus; - lastStatus = Ok; - return result; - } - Status GetNearestColor(Color *color) const - { - return updateStatus(DllExports::GdipGetNearestColor( - nativeGraphics, color ? &color->Value : NULL)); - } - REAL GetPageScale() const - { - REAL result = 0.0f; - updateStatus(DllExports::GdipGetPageScale( - nativeGraphics, &result)); - return result; - } - Unit GetPageUnit() const - { - Unit result = UnitWorld; - updateStatus(DllExports::GdipGetPageUnit( - nativeGraphics, &result)); - return result; - } - PixelOffsetMode GetPixelOffsetMode() const - { - PixelOffsetMode result = PixelOffsetModeDefault; - updateStatus(DllExports::GdipGetPixelOffsetMode( - nativeGraphics, &result)); - return result; - } - Status GetRenderingOrigin(INT *x, INT *y) const - { - return updateStatus(DllExports::GdipGetRenderingOrigin( - nativeGraphics, x, y)); - } - SmoothingMode GetSmoothingMode() const - { - SmoothingMode result = SmoothingModeDefault; - updateStatus(DllExports::GdipGetSmoothingMode( - nativeGraphics, &result)); - return result; - } - UINT GetTextContrast() const - { - UINT result = 0; - updateStatus(DllExports::GdipGetTextContrast( - nativeGraphics, &result)); - return result; - } - TextRenderingHint GetTextRenderingHint() const - { - TextRenderingHint result = TextRenderingHintSystemDefault; - updateStatus(DllExports::GdipGetTextRenderingHint( - nativeGraphics, &result)); - return result; - } - Status GetTransform(Matrix *matrix) const - { - return updateStatus(DllExports::GdipGetWorldTransform( - nativeGraphics, - matrix ? matrix->nativeMatrix : NULL)); - } - Status GetVisibleClipBounds(RectF *rect) const - { - return updateStatus(DllExports::GdipGetVisibleClipBounds( - nativeGraphics, rect)); - } - Status GetVisibleClipBounds(Rect *rect) const - { - return updateStatus(DllExports::GdipGetVisibleClipBoundsI( - nativeGraphics, rect)); - } - Status IntersectClip(const RectF& rect) - { - return updateStatus(DllExports::GdipSetClipRect( - nativeGraphics, - rect.X, rect.Y, rect.Width, rect.Height, - CombineModeIntersect)); - } - Status IntersectClip(const Rect& rect) - { - return updateStatus(DllExports::GdipSetClipRectI( - nativeGraphics, - rect.X, rect.Y, rect.Width, rect.Height, - CombineModeIntersect)); - } - Status IntersectClip(const Region *region) - { - return updateStatus(DllExports::GdipSetClipRegion( - nativeGraphics, - region ? region->nativeRegion : NULL, - CombineModeIntersect)); - } - BOOL IsClipEmpty() const - { - BOOL result = FALSE; - updateStatus(DllExports::GdipIsClipEmpty( - nativeGraphics, &result)); - return result; - } - BOOL IsVisible(REAL x, REAL y) const - { - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisiblePoint( - nativeGraphics, x, y, &result)); - return result; - } - BOOL IsVisible(INT x, INT y) const - { - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisiblePointI( - nativeGraphics, x, y, &result)); - return result; - } - BOOL IsVisible(const PointF& point) const - { - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisiblePoint( - nativeGraphics, point.X, point.Y, &result)); - return result; - } - BOOL IsVisible(const Point& point) const - { - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisiblePointI( - nativeGraphics, point.X, point.Y, &result)); - return result; - } - BOOL IsVisible(REAL x, REAL y, REAL width, REAL height) const - { - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisibleRect( - nativeGraphics, x, y, width, height, &result)); - return result; - } - BOOL IsVisible(INT x, INT y, INT width, INT height) const - { - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisibleRectI( - nativeGraphics, x, y, width, height, &result)); - return result; - } - BOOL IsVisible(const RectF& rect) const - { - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisibleRect( - nativeGraphics, rect.X, rect.Y, - rect.Width, rect.Height, &result)); - return result; - } - BOOL IsVisible(const Rect& rect) const - { - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisibleRectI( - nativeGraphics, rect.X, rect.Y, - rect.Width, rect.Height, &result)); - return result; - } - BOOL IsVisibleClipEmpty() const - { - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisibleClipEmpty( - nativeGraphics, &result)); - return result; - } - Status MeasureCharacterRanges(const WCHAR *string, INT length, - const Font *font, const RectF& layoutRect, - const StringFormat *stringFormat, - INT regionCount, Region *regions) const - { - if (regionCount <= 0 || !regions) - return lastStatus = InvalidParameter; - - GpRegion **nativeRegionArray = (GpRegion**) - DllExports::GdipAlloc(regionCount * sizeof(GpRegion*)); - if (!nativeRegionArray) - return lastStatus = OutOfMemory; - for (int i = 0; i < regionCount; ++i) { - nativeRegionArray[i] = regions[i].nativeRegion; - } - Status status = updateStatus(DllExports::GdipMeasureCharacterRanges( - nativeGraphics, string, length, - font ? font->nativeFont : NULL, - layoutRect, - stringFormat ? stringFormat->nativeStringFormat : NULL, - regionCount, nativeRegionArray)); - DllExports::GdipFree(nativeRegionArray); - return status; - } - Status MeasureDriverString(const UINT16 *text, INT length, - const Font *font, const PointF *positions, INT flags, - const Matrix *matrix, RectF *boundingBox) const - { - return updateStatus(DllExports::GdipMeasureDriverString( - nativeGraphics, text, length, - font ? font->nativeFont : NULL, - positions, flags, - matrix ? matrix->nativeMatrix : NULL, - boundingBox)); - } - Status MeasureString(const WCHAR *string, INT length, - const Font *font, const RectF& layoutRect, - RectF *boundingBox) const - { - return updateStatus(DllExports::GdipMeasureString( - nativeGraphics, string, length, - font ? font->nativeFont : NULL, - &layoutRect, NULL, boundingBox, NULL, NULL)); - } - Status MeasureString(const WCHAR *string, INT length, - const Font *font, const RectF& layoutRect, - const StringFormat *stringFormat, RectF *boundingBox, - INT *codepointsFitted = NULL, - INT *linesFitted = NULL) const - { - return updateStatus(DllExports::GdipMeasureString( - nativeGraphics, string, length, - font ? font->nativeFont : NULL, - &layoutRect, - stringFormat ? stringFormat->nativeStringFormat : NULL, - boundingBox, codepointsFitted, linesFitted)); - } - Status MeasureString(const WCHAR *string, INT length, - const Font *font, const SizeF& layoutRectSize, - const StringFormat *stringFormat, SizeF *size, - INT *codepointsFitted = NULL, - INT *linesFitted = NULL) const - { - if (!size) return lastStatus = InvalidParameter; - RectF layoutRect(PointF(0.0f, 0.0f), layoutRectSize); - RectF boundingBox; - Status status = updateStatus(DllExports::GdipMeasureString( - nativeGraphics, string, length, - font ? font->nativeFont : NULL, - &layoutRect, - stringFormat ? stringFormat->nativeStringFormat : NULL, - &boundingBox, codepointsFitted, linesFitted)); - boundingBox.GetSize(size); - return status; - } - Status MeasureString(const WCHAR *string, INT length, - const Font *font, const PointF& origin, - RectF *boundingBox) const - { - RectF layoutRect(origin, SizeF(0.0f, 0.0f)); - return updateStatus(DllExports::GdipMeasureString( - nativeGraphics, string, length, - font ? font->nativeFont : NULL, - &layoutRect, NULL, boundingBox, NULL, NULL)); - } - Status MeasureString(const WCHAR *string, INT length, - const Font *font, const PointF& origin, - const StringFormat *stringFormat, - RectF *boundingBox) const - { - RectF layoutRect(origin, SizeF(0.0f, 0.0f)); - return updateStatus(DllExports::GdipMeasureString( - nativeGraphics, string, length, - font ? font->nativeFont : NULL, - &layoutRect, - stringFormat ? stringFormat->nativeStringFormat : NULL, - boundingBox, NULL, NULL)); - } - Status MultiplyTransform(const Matrix *matrix, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipMultiplyWorldTransform( - nativeGraphics, - matrix ? matrix->nativeMatrix : NULL, order)); - } - VOID ReleaseHDC(HDC hdc) - { - updateStatus(DllExports::GdipReleaseDC(nativeGraphics, hdc)); - } - Status ResetClip() - { - return updateStatus(DllExports::GdipResetClip(nativeGraphics)); - } - Status ResetTransform() - { - return updateStatus(DllExports::GdipResetWorldTransform( - nativeGraphics)); - } - Status Restore(GraphicsState state) - { - return updateStatus(DllExports::GdipRestoreGraphics( - nativeGraphics, state)); - } - Status RotateTransform(REAL angle, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipRotateWorldTransform( - nativeGraphics, angle, order)); - } - GraphicsState Save() const - { - GraphicsState result = 0; - updateStatus(DllExports::GdipSaveGraphics( - nativeGraphics, &result)); - return result; - } - Status ScaleTransform(REAL sx, REAL sy, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipScaleWorldTransform( - nativeGraphics, sx, sy, order)); - } - VOID SetAbort() - { - updateStatus(NotImplemented); - } - Status SetClip(const Graphics *g, - CombineMode combineMode = CombineModeReplace) - { - return updateStatus(DllExports::GdipSetClipGraphics( - nativeGraphics, g ? g->nativeGraphics : NULL, - combineMode)); - } - Status SetClip(const RectF& rect, - CombineMode combineMode = CombineModeReplace) - { - return updateStatus(DllExports::GdipSetClipRect( - nativeGraphics, - rect.X, rect.Y, rect.Width, rect.Height, - combineMode)); - } - Status SetClip(const Rect& rect, - CombineMode combineMode = CombineModeReplace) - { - return updateStatus(DllExports::GdipSetClipRectI( - nativeGraphics, - rect.X, rect.Y, rect.Width, rect.Height, - combineMode)); - } - Status SetClip(const GraphicsPath *path, - CombineMode combineMode = CombineModeReplace) - { - return updateStatus(DllExports::GdipSetClipPath( - nativeGraphics, - path ? path->nativePath : NULL, - combineMode)); - } - Status SetClip(const Region *region, - CombineMode combineMode = CombineModeReplace) - { - return updateStatus(DllExports::GdipSetClipRegion( - nativeGraphics, - region ? region->nativeRegion : NULL, - combineMode)); - } - Status SetClip(HRGN hRgn, CombineMode combineMode = CombineModeReplace) - { - return updateStatus(DllExports::GdipSetClipHrgn( - nativeGraphics, hRgn, combineMode)); - } - Status SetCompositingMode(CompositingMode compositingMode) - { - return updateStatus(DllExports::GdipSetCompositingMode( - nativeGraphics, compositingMode)); - } - Status SetCompositingQuality(CompositingQuality compositingQuality) - { - return updateStatus(DllExports::GdipSetCompositingQuality( - nativeGraphics, compositingQuality)); - } - Status SetInterpolationMode(InterpolationMode interpolationMode) - { - return updateStatus(DllExports::GdipSetInterpolationMode( - nativeGraphics, interpolationMode)); - } - Status SetPageScale(REAL scale) - { - return updateStatus(DllExports::GdipSetPageScale( - nativeGraphics, scale)); - } - Status SetPageUnit(Unit unit) - { - return updateStatus(DllExports::GdipSetPageUnit( - nativeGraphics, unit)); - } - Status SetPixelOffsetMode(PixelOffsetMode pixelOffsetMode) - { - return updateStatus(DllExports::GdipSetPixelOffsetMode( - nativeGraphics, pixelOffsetMode)); - } - Status SetRenderingOrigin(INT x, INT y) - { - return updateStatus(DllExports::GdipSetRenderingOrigin( - nativeGraphics, x, y)); - } - Status SetSmoothingMode(SmoothingMode smoothingMode) - { - return updateStatus(DllExports::GdipSetSmoothingMode( - nativeGraphics, smoothingMode)); - } - Status SetTextContrast(UINT contrast) - { - return updateStatus(DllExports::GdipSetTextContrast( - nativeGraphics, contrast)); - } - Status SetTextRenderingHint(TextRenderingHint textRenderingHint) - { - return updateStatus(DllExports::GdipSetTextRenderingHint( - nativeGraphics, textRenderingHint)); - } - Status SetTransform(const Matrix *matrix) - { - return updateStatus(DllExports::GdipSetWorldTransform( - nativeGraphics, - matrix ? matrix->nativeMatrix : NULL)); - } - Status TransformPoints(CoordinateSpace destSpace, - CoordinateSpace srcSpace, - PointF *pts, INT count) const - { - return updateStatus(DllExports::GdipTransformPoints( - nativeGraphics, destSpace, srcSpace, - pts, count)); - } - Status TransformPoints(CoordinateSpace destSpace, - CoordinateSpace srcSpace, - Point *pts, INT count) const - { - return updateStatus(DllExports::GdipTransformPointsI( - nativeGraphics, destSpace, srcSpace, - pts, count)); - } - Status TranslateClip(REAL dx, REAL dy) - { - return updateStatus(DllExports::GdipTranslateClip( - nativeGraphics, dx, dy)); - } - Status TranslateClip(INT dx, INT dy) - { - return updateStatus(DllExports::GdipTranslateClipI( - nativeGraphics, dx, dy)); - } - Status TranslateTransform(REAL dx, REAL dy, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipTranslateWorldTransform( - nativeGraphics, dx, dy, order)); - } - -private: - Graphics(const Graphics&); - Graphics& operator=(const Graphics&); - - Status updateStatus(Status newStatus) const - { - if (newStatus != Ok) lastStatus = newStatus; - return newStatus; - } - - GpGraphics *nativeGraphics; - mutable Status lastStatus; -}; - -#endif /* __GDIPLUS_GRAPHICS_H */ diff --git a/src/gdiplus3/gdiplusheaders.h b/src/gdiplus3/gdiplusheaders.h deleted file mode 100644 index 78d0d717..00000000 --- a/src/gdiplus3/gdiplusheaders.h +++ /dev/null @@ -1,581 +0,0 @@ -/* - * gdiplusheaders.h - * - * GDI+ Bitmap, CachedBitmap, CustomLineCap, Font, FontCollection, - * FontFamily, Image, InstalledFontCollection, PrivateFontCollection, - * Region class definitions. - * Implementation of these classes is in gdiplusimpl.h. - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_HEADERS_H -#define __GDIPLUS_HEADERS_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#ifndef __cplusplus -#error "A C++ compiler is required to include gdiplusheaders.h." -#endif - -/* - * Note: Virtual inline functions (dtors, Clone()) are implemented here: If - * these were defined outside class scope, the compiler would always generate - * code for them (and the vtable), even if these classes were never used. - */ - -class Bitmap; -class Effect; -class FontCollection; -class FontFamily; -class Graphics; -class GraphicsPath; -class Matrix; -class Pen; - -class Image: public GdiplusBase -{ - friend class Bitmap; - friend class Metafile; - friend class CachedBitmap; - friend class Graphics; - friend class TextureBrush; - -public: - static Image* FromFile(const WCHAR *filename, - BOOL useEmbeddedColorManagement = FALSE); - static Image* FromStream(IStream *stream, - BOOL useEmbeddedColorManagement = FALSE); - - Image(const WCHAR *filename, BOOL useEmbeddedColorManagement = FALSE); - Image(IStream *stream, BOOL useEmbeddedColorManagement = FALSE); - - virtual ~Image() - { - DllExports::GdipDisposeImage(nativeImage); - } - virtual Image* Clone() const - { - GpImage *cloneImage = NULL; - Status status = updateStatus(DllExports::GdipCloneImage( - nativeImage, &cloneImage)); - if (status == Ok) { - Image *result = new Image(cloneImage, lastStatus); - if (!result) { - DllExports::GdipDisposeImage(cloneImage); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } - } - - Status FindFirstItem(ImageItemData *item); - Status FindNextItem(ImageItemData *item); - Status GetAllPropertyItems(UINT totalBufferSize, - UINT numProperties, PropertyItem *allItems); - Status GetBounds(RectF *srcRect, Unit *srcUnit); - Status GetEncoderParameterList(const CLSID *clsidEncoder, - UINT size, EncoderParameters *buffer); - UINT GetEncoderParameterListSize(const CLSID *clsidEncoder); - UINT GetFlags(); - UINT GetFrameCount(const GUID *dimensionID); - UINT GetFrameDimensionsCount(); - Status GetFrameDimensionsList(GUID *dimensionIDs, UINT count); - UINT GetHeight(); - REAL GetHorizontalResolution(); - Status GetItemData(ImageItemData *item); - Status GetPalette(ColorPalette *palette, INT size); - INT GetPaletteSize(); - Status GetPhysicalDimension(SizeF *size); - PixelFormat GetPixelFormat(); - UINT GetPropertyCount(); - Status GetPropertyIdList(UINT numOfProperty, PROPID *list); - Status GetPropertyItem(PROPID propId, UINT propSize, - PropertyItem *buffer); - UINT GetPropertyItemSize(PROPID propId); - Status GetPropertySize(UINT *totalBufferSize, UINT *numProperties); - Status GetRawFormat(GUID *format); - Image* GetThumbnailImage(UINT thumbWidth, UINT thumbHeight, - GetThumbnailImageAbort callback, VOID *callbackData); - ImageType GetType() const; - REAL GetVerticalResolution(); - UINT GetWidth(); - Status RemovePropertyItem(PROPID propId); - Status RotateFlip(RotateFlipType rotateFlipType); - Status Save(IStream *stream, const CLSID *clsidEncoder, - const EncoderParameters *encoderParams); - Status Save(const WCHAR *filename, const CLSID *clsidEncoder, - const EncoderParameters *encoderParams); - Status SaveAdd(const EncoderParameters *encoderParams); - Status SaveAdd(Image *newImage, const EncoderParameters *encoderParams); - Status SelectActiveFrame(const GUID *dimensionID, UINT frameIndex); - Status SetAbort(GdiplusAbort *pIAbort); - Status SetPalette(const ColorPalette *palette); - Status SetPropertyItem(const PropertyItem *item); - - Status GetLastStatus() const - { - Status result = lastStatus; - lastStatus = Ok; - return result; - } - -private: - Image(GpImage *image, Status status): - nativeImage(image), lastStatus(status) {} - Image(const Image&); - Image& operator=(const Image&); - - Status updateStatus(Status newStatus) const - { - if (newStatus != Ok) lastStatus = newStatus; - return newStatus; - } - - GpImage *nativeImage; - mutable Status lastStatus; -}; - -class Bitmap: public Image -{ -public: - static Bitmap* FromBITMAPINFO(const BITMAPINFO *gdiBitmapInfo, - VOID *gdiBitmapData); - static Bitmap* FromDirectDrawSurface7(IDirectDrawSurface7 *surface); - static Bitmap* FromFile(const WCHAR *filename, - BOOL useEmbeddedColorManagement = FALSE); - static Bitmap* FromHBITMAP(HBITMAP hbm, HPALETTE hpal); - static Bitmap* FromHICON(HICON icon); - static Bitmap* FromResource(HINSTANCE hInstance, - const WCHAR *bitmapName); - static Bitmap* FromStream(IStream *stream, - BOOL useEmbeddedColorManagement = FALSE); - static Status ApplyEffect(Bitmap **inputs, INT numInputs, - Effect *effect, RECT *ROI, - RECT *outputRect, Bitmap **output); - static Status InitializePalette(ColorPalette *palette, - PaletteType paletteType, INT optimalColors, - BOOL useTransparentColor, Bitmap *bitmap); - - Bitmap(const BITMAPINFO *gdiBitmapInfo, VOID *gdiBitmapData); - Bitmap(IDirectDrawSurface7 *surface); - Bitmap(const WCHAR *filename, BOOL useEmbeddedColorManagement = FALSE); - Bitmap(HBITMAP hbm, HPALETTE hpal); - Bitmap(HICON hicon); - Bitmap(HINSTANCE hInstance, const WCHAR *bitmapName); - Bitmap(IStream *stream, BOOL useEmbeddedColorManagement = FALSE); - Bitmap(INT width, INT height, Graphics *target); - Bitmap(INT width, INT height, PixelFormat format = PixelFormat32bppARGB); - Bitmap(INT width, INT height, INT stride, PixelFormat format, BYTE *scan0); - - virtual ~Bitmap() - { - } - virtual Bitmap* Clone() const - { - GpImage *cloneImage = NULL; - Status status = updateStatus(DllExports::GdipCloneImage( - nativeImage, &cloneImage)); - if (status == Ok) { - Bitmap *result = new Bitmap(cloneImage, lastStatus); - if (!result) { - DllExports::GdipDisposeImage(cloneImage); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } - } - - Bitmap* Clone(const RectF& rect, PixelFormat format) const; - Bitmap* Clone(const Rect& rect, PixelFormat format) const; - Bitmap* Clone(REAL x, REAL y, REAL width, REAL height, - PixelFormat format) const; - Bitmap* Clone(INT x, INT y, INT width, INT height, - PixelFormat format) const; - - Status ApplyEffect(Effect *effect, RECT *ROI); - Status ConvertFormat(PixelFormat format, DitherType ditherType, - PaletteType paletteType, ColorPalette *palette, - REAL alphaThresholdPercent); - Status GetHBITMAP(const Color& colorBackground, HBITMAP *hbmReturn) const; - Status GetHICON(HICON *icon) const; - Status GetHistogram(HistogramFormat format, UINT numberOfEntries, - UINT *channel0, UINT *channel1, - UINT *channel2, UINT *channel3) const; - Status GetHistogramSize(HistogramFormat format, - UINT *numberOfEntries) const; - Status GetPixel(INT x, INT y, Color *color) const; - Status LockBits(const Rect *rect, UINT flags, PixelFormat format, - BitmapData *lockedBitmapData); - Status SetPixel(INT x, INT y, const Color& color); - Status SetResolution(REAL xdpi, REAL ydpi); - Status UnlockBits(BitmapData *lcokedBitmapData); - -private: - Bitmap(GpImage *image, Status status): Image(image, status) {} - Bitmap(const Bitmap&); - Bitmap& operator=(const Bitmap&); -}; - -class CachedBitmap: public GdiplusBase -{ - friend class Graphics; - -public: - CachedBitmap(Bitmap *bitmap, Graphics *graphics); - ~CachedBitmap(); - - Status GetLastStatus() const - { - return lastStatus; - } - -private: - CachedBitmap(const CachedBitmap&); - CachedBitmap& operator=(const CachedBitmap&); - - GpCachedBitmap *nativeCachedBitmap; - Status lastStatus; -}; - -class CustomLineCap: public GdiplusBase -{ - friend class AdjustableArrowCap; - friend class Pen; - -public: - CustomLineCap(const GraphicsPath *fillPath, - const GraphicsPath *strokePath, - LineCap baseCap = LineCapFlat, - REAL baseInset = 0.0f); - - virtual ~CustomLineCap() - { - DllExports::GdipDeleteCustomLineCap(nativeCustomLineCap); - } - virtual CustomLineCap* Clone() const - { - GpCustomLineCap *cloneCustomLineCap = NULL; - Status status = updateStatus(DllExports::GdipCloneCustomLineCap( - nativeCustomLineCap, &cloneCustomLineCap)); - if (status == Ok) { - CustomLineCap *result = new CustomLineCap( - cloneCustomLineCap, lastStatus); - if (!result) { - DllExports::GdipDeleteCustomLineCap(cloneCustomLineCap); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } - } - - LineCap GetBaseCap() const; - REAL GetBaseInset() const; - Status GetStrokeCaps(LineCap *startCap, LineCap *endCap) const; - LineJoin GetStrokeJoin() const; - REAL GetWidthScale() const; - Status SetBaseCap(LineCap baseCap); - Status SetBaseInset(REAL inset); - Status SetStrokeCap(LineCap strokeCap); - Status SetStrokeCaps(LineCap startCap, LineCap endCap); - Status SetStrokeJoin(LineJoin lineJoin); - Status SetWidthScale(REAL widthScale); - - Status GetLastStatus() const - { - Status result = lastStatus; - lastStatus = Ok; - return result; - } - -private: - CustomLineCap(GpCustomLineCap *customLineCap, Status status): - nativeCustomLineCap(customLineCap), lastStatus(status) {} - CustomLineCap(const CustomLineCap&); - CustomLineCap& operator=(const CustomLineCap&); - - Status updateStatus(Status newStatus) const - { - if (newStatus != Ok) lastStatus = newStatus; - return newStatus; - } - - GpCustomLineCap *nativeCustomLineCap; - mutable Status lastStatus; -}; - -class Font: public GdiplusBase -{ - friend class Graphics; - -public: - Font(const FontFamily *family, REAL emSize, - INT style = FontStyleRegular, - Unit unit = UnitPoint); - Font(HDC hdc, HFONT hfont); - Font(HDC hdc, const LOGFONTA *logfont); - Font(HDC hdc, const LOGFONTW *logfont); - Font(HDC hdc); - Font(const WCHAR *familyName, REAL emSize, - INT style = FontStyleRegular, - Unit unit = UnitPoint, - const FontCollection *fontCollection = NULL); - ~Font(); - Font* Clone() const; - - Status GetFamily(FontFamily *family) const; - REAL GetHeight(const Graphics *graphics) const; - REAL GetHeight(REAL dpi) const; - Status GetLogFontA(const Graphics *graphics, LOGFONTA *logfontA) const; - Status GetLogFontW(const Graphics *graphics, LOGFONTW *logfontW) const; - REAL GetSize() const; - INT GetStyle() const; - Unit GetUnit() const; - - Status GetLastStatus() const - { - return lastStatus; - } - BOOL IsAvailable() const - { - return nativeFont != NULL; - } - -private: - Font(GpFont *font, Status status): - nativeFont(font), lastStatus(status) {} - Font(const Font&); - Font& operator=(const Font&); - - Status updateStatus(Status newStatus) const - { - if (newStatus != Ok) lastStatus = newStatus; - return newStatus; - } - - GpFont *nativeFont; - mutable Status lastStatus; -}; - -class FontCollection: public GdiplusBase -{ - friend class InstalledFontCollection; - friend class PrivateFontCollection; - friend class Font; - friend class FontFamily; - -public: - FontCollection(); - virtual ~FontCollection() {} - - Status GetFamilies(INT numSought, FontFamily *families, - INT *numFound) const; - INT GetFamilyCount() const; - - Status GetLastStatus() const - { - return lastStatus; - } - -private: - FontCollection(const FontCollection&); - FontCollection& operator=(const FontCollection&); - - Status updateStatus(Status newStatus) const - { - return lastStatus = newStatus; - } - - GpFontCollection *nativeFontCollection; - mutable Status lastStatus; -}; - -class FontFamily: public GdiplusBase -{ - friend class Font; - friend class FontCollection; - friend class GraphicsPath; - -public: - static const FontFamily* GenericMonospace(); - static const FontFamily* GenericSansSerif(); - static const FontFamily* GenericSerif(); - - FontFamily(); - FontFamily(const WCHAR *name, - const FontCollection *fontCollection = NULL); - ~FontFamily(); - FontFamily* Clone() const; - - UINT16 GetCellAscent(INT style) const; - UINT16 GetCellDescent(INT style) const; - UINT16 GetEmHeight(INT style) const; - Status GetFamilyName(WCHAR name[LF_FACESIZE], - LANGID language = LANG_NEUTRAL) const; - UINT16 GetLineSpacing(INT style) const; - BOOL IsStyleAvailable(INT style) const; - - Status GetLastStatus() const - { - Status result = lastStatus; - lastStatus = Ok; - return result; - } - BOOL IsAvailable() const - { - return nativeFontFamily != NULL; - } - -private: - FontFamily(GpFontFamily *fontFamily, Status status): - nativeFontFamily(fontFamily), lastStatus(status) {} - FontFamily(const FontFamily&); - FontFamily& operator=(const FontFamily&); - - Status updateStatus(Status newStatus) const - { - if (newStatus != Ok) lastStatus = newStatus; - return newStatus; - } - - GpFontFamily *nativeFontFamily; - mutable Status lastStatus; -}; - -class InstalledFontCollection: public FontCollection -{ -public: - InstalledFontCollection(); - virtual ~InstalledFontCollection() {} -}; - -class PrivateFontCollection: public FontCollection -{ -public: - PrivateFontCollection(); - - virtual ~PrivateFontCollection() - { - DllExports::GdipDeletePrivateFontCollection(&nativeFontCollection); - } - - Status AddFontFile(const WCHAR *filename); - Status AddMemoryFont(const VOID *memory, INT length); -}; - -class Region: public GdiplusBase -{ - friend class Graphics; - -public: - static Region* FromHRGN(HRGN hrgn); - - Region(); - Region(const RectF& rect); - Region(const Rect& rect); - Region(const GraphicsPath *path); - Region(const BYTE *regionData, INT size); - Region(HRGN hrgn); - ~Region(); - Region* Clone() const; - - Status Complement(const RectF& rect); - Status Complement(const Rect& rect); - Status Complement(const Region *region); - Status Complement(const GraphicsPath *path); - BOOL Equals(const Region *region, const Graphics *graphics) const; - Status Exclude(const RectF& rect); - Status Exclude(const Rect& rect); - Status Exclude(const Region *region); - Status Exclude(const GraphicsPath *path); - Status GetBounds(RectF *rect, const Graphics *graphics) const; - Status GetBounds(Rect *rect, const Graphics *graphics) const; - Status GetData(BYTE *buffer, UINT bufferSize, UINT *sizeFilled) const; - UINT GetDataSize() const; - HRGN GetHRGN(const Graphics *graphics) const; - Status GetRegionScans(const Matrix *matrix, - RectF *rects, INT *count) const; - Status GetRegionScans(const Matrix *matrix, - Rect *rects, INT *count) const; - UINT GetRegionScansCount(const Matrix *matrix) const; - Status Intersect(const RectF& rect); - Status Intersect(const Rect& rect); - Status Intersect(const Region *region); - Status Intersect(const GraphicsPath *path); - BOOL IsEmpty(const Graphics *graphics) const; - BOOL IsInfinite(const Graphics *graphics) const; - BOOL IsVisible(REAL x, REAL y, - const Graphics *graphics = NULL) const; - BOOL IsVisible(INT x, INT y, - const Graphics *graphics = NULL) const; - BOOL IsVisible(const PointF& point, - const Graphics *graphics = NULL) const; - BOOL IsVisible(const Point& point, - const Graphics *graphics = NULL) const; - BOOL IsVisible(REAL x, REAL y, REAL width, REAL height, - const Graphics *graphics = NULL) const; - BOOL IsVisible(INT x, INT y, INT width, INT height, - const Graphics *graphics = NULL) const; - BOOL IsVisible(const RectF& rect, - const Graphics *graphics = NULL) const; - BOOL IsVisible(const Rect& rect, - const Graphics *graphics = NULL) const; - Status MakeEmpty(); - Status MakeInfinite(); - Status Transform(const Matrix *matrix); - Status Translate(REAL dx, REAL dy); - Status Translate(INT dx, INT dy); - Status Union(const RectF& rect); - Status Union(const Rect& rect); - Status Union(const Region *region); - Status Union(const GraphicsPath *path); - Status Xor(const RectF& rect); - Status Xor(const Rect& rect); - Status Xor(const Region *region); - Status Xor(const GraphicsPath *path); - - Status GetLastStatus() const - { - Status result = lastStatus; - lastStatus = Ok; - return result; - } - -private: - Region(GpRegion *region, Status status): - nativeRegion(region), lastStatus(status) {} - Region(const Region&); - Region& operator=(const Region&); - - Status updateStatus(Status newStatus) const - { - if (newStatus != Ok) lastStatus = newStatus; - return newStatus; - } - - GpRegion *nativeRegion; - mutable Status lastStatus; -}; - -#endif /* __GDIPLUS_HEADERS_H */ diff --git a/src/gdiplus3/gdiplusimageattributes.h b/src/gdiplus3/gdiplusimageattributes.h deleted file mode 100644 index 695b898e..00000000 --- a/src/gdiplus3/gdiplusimageattributes.h +++ /dev/null @@ -1,236 +0,0 @@ -/* - * gdiplusimageattributes.h - * - * GDI+ ImageAttributes class - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_IMAGEATTRIBUTES_H -#define __GDIPLUS_IMAGEATTRIBUTES_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#ifndef __cplusplus -#error "A C++ compiler is required to include gdiplusimageattributes.h." -#endif - -class ImageAttributes: public GdiplusBase -{ - friend class Graphics; - friend class TextureBrush; - -public: - ImageAttributes(): nativeImageAttributes(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipCreateImageAttributes( - &nativeImageAttributes); - } - ~ImageAttributes() - { - DllExports::GdipDisposeImageAttributes(nativeImageAttributes); - } - ImageAttributes* Clone() const - { - GpImageAttributes *cloneImageAttributes = NULL; - Status status = updateStatus(DllExports::GdipCloneImageAttributes( - nativeImageAttributes, &cloneImageAttributes)); - if (status == Ok) { - ImageAttributes *result = new ImageAttributes( - cloneImageAttributes, lastStatus); - if (!result) { - DllExports::GdipDisposeImageAttributes(cloneImageAttributes); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } - } - - Status ClearBrushRemapTable() - { - return updateStatus(DllExports::GdipSetImageAttributesRemapTable( - nativeImageAttributes, ColorAdjustTypeBrush, - FALSE, 0, NULL)); - } - Status ClearColorKey(ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesColorKeys( - nativeImageAttributes, type, FALSE, 0, 0)); - } - Status ClearColorMatrices(ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesColorMatrix( - nativeImageAttributes, type, FALSE, - NULL, NULL, ColorMatrixFlagsDefault)); - } - Status ClearColorMatrix(ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesColorMatrix( - nativeImageAttributes, type, FALSE, - NULL, NULL, ColorMatrixFlagsDefault)); - } - Status ClearGamma(ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesGamma( - nativeImageAttributes, type, FALSE, 1.0f)); - } - Status ClearNoOp(ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesNoOp( - nativeImageAttributes, type, FALSE)); - } - Status ClearOutputChannel(ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesOutputChannel( - nativeImageAttributes, type, FALSE, - ColorChannelFlagsC)); - } - Status ClearOutputChannelColorProfile( - ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesOutputChannelColorProfile( - nativeImageAttributes, type, FALSE, NULL)); - } - Status ClearRemapTable(ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesRemapTable( - nativeImageAttributes, type, FALSE, 0, NULL)); - } - Status ClearThreshold(ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesThreshold( - nativeImageAttributes, type, FALSE, 0.0)); - } - Status GetAdjustedPalette(ColorPalette *colorPalette, - ColorAdjustType type) const - { - return updateStatus(DllExports::GdipGetImageAttributesAdjustedPalette( - nativeImageAttributes, colorPalette, type)); - } - Status GetLastStatus() const - { - Status result = lastStatus; - lastStatus = Ok; - return result; - } - Status Reset(ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipResetImageAttributes( - nativeImageAttributes, type)); - } - Status SetBrushRemapTable(UINT mapSize, ColorMap *map) - { - return updateStatus(DllExports::GdipSetImageAttributesRemapTable( - nativeImageAttributes, ColorAdjustTypeBrush, - TRUE, mapSize, map)); - } - Status SetColorKey(const Color& colorLow, const Color& colorHigh, - ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesColorKeys( - nativeImageAttributes, type, TRUE, - colorLow.GetValue(), colorHigh.GetValue())); - } - Status SetColorMatrices(const ColorMatrix *colorMatrix, - const ColorMatrix *grayMatrix, - ColorMatrixFlags mode = ColorMatrixFlagsDefault, - ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesColorMatrix( - nativeImageAttributes, type, TRUE, - colorMatrix, grayMatrix, mode)); - } - Status SetColorMatrix(const ColorMatrix *colorMatrix, - ColorMatrixFlags mode = ColorMatrixFlagsDefault, - ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesColorMatrix( - nativeImageAttributes, type, TRUE, - colorMatrix, NULL, mode)); - } - Status SetGamma(REAL gamma, - ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesGamma( - nativeImageAttributes, type, TRUE, gamma)); - } - Status SetNoOp(ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesNoOp( - nativeImageAttributes, type, TRUE)); - } - Status SetOutputChannel(ColorChannelFlags channelFlags, - ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesOutputChannel( - nativeImageAttributes, type, TRUE, - channelFlags)); - } - Status SetOutputChannelColorProfile(const WCHAR *colorProfileFilename, - ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesOutputChannelColorProfile( - nativeImageAttributes, type, TRUE, - colorProfileFilename)); - } - Status SetRemapTable(UINT mapSize, const ColorMap *map, - ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesRemapTable( - nativeImageAttributes, type, TRUE, - mapSize, map)); - } - Status SetThreshold(REAL threshold, - ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesThreshold( - nativeImageAttributes, type, TRUE, threshold)); - } - Status SetToIdentity(ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesToIdentity( - nativeImageAttributes, type)); - } - Status SetWrapMode(WrapMode wrap, const Color& color = Color(), - BOOL clamp = FALSE) - { - return updateStatus(DllExports::GdipSetImageAttributesWrapMode( - nativeImageAttributes, wrap, - color.GetValue(), clamp)); - } - -private: - ImageAttributes(GpImageAttributes *imageAttributes, Status status): - nativeImageAttributes(imageAttributes), lastStatus(status) {} - ImageAttributes(const ImageAttributes&); - ImageAttributes& operator=(const ImageAttributes&); - - Status updateStatus(Status newStatus) const - { - if (newStatus != Ok) lastStatus = newStatus; - return newStatus; - } - - GpImageAttributes *nativeImageAttributes; - mutable Status lastStatus; -}; - - -#endif /* __GDIPLUS_IMAGEATTRIBUTES_H */ diff --git a/src/gdiplus3/gdiplusimagecodec.h b/src/gdiplus3/gdiplusimagecodec.h deleted file mode 100644 index e897f1ee..00000000 --- a/src/gdiplus3/gdiplusimagecodec.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * gdiplusimagecodec.h - * - * GDI+ image decoders and encoders - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_IMAGECODEC_H -#define __GDIPLUS_IMAGECODEC_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -static __inline__ GpStatus GetImageDecoders(UINT numDecoders, UINT size, - ImageCodecInfo *decoders) -{ - #ifdef __cplusplus - return DllExports::GdipGetImageDecoders(numDecoders, size, decoders); - #else - return GdipGetImageDecoders(numDecoders, size, decoders); - #endif -} - -static __inline__ GpStatus GetImageDecodersSize(UINT *numDecoders, UINT *size) -{ - #ifdef __cplusplus - return DllExports::GdipGetImageDecodersSize(numDecoders, size); - #else - return GdipGetImageDecodersSize(numDecoders, size); - #endif -} - -static __inline__ GpStatus GetImageEncoders(UINT numEncoders, UINT size, - ImageCodecInfo *encoders) -{ - #ifdef __cplusplus - return DllExports::GdipGetImageEncoders(numEncoders, size, encoders); - #else - return GdipGetImageEncoders(numEncoders, size, encoders); - #endif -} - -static __inline__ GpStatus GetImageEncodersSize(UINT *numEncoders, UINT *size) -{ - #ifdef __cplusplus - return DllExports::GdipGetImageEncodersSize(numEncoders, size); - #else - return GdipGetImageEncodersSize(numEncoders, size); - #endif -} - -#endif /* __GDIPLUS_IMAGECODEC_H */ diff --git a/src/gdiplus3/gdiplusimaging.h b/src/gdiplus3/gdiplusimaging.h deleted file mode 100644 index c452d77e..00000000 --- a/src/gdiplus3/gdiplusimaging.h +++ /dev/null @@ -1,411 +0,0 @@ -/* - * gdiplusimaging.h - * - * GDI+ Imaging and image metadata - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_IMAGING_H -#define __GDIPLUS_IMAGING_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -typedef enum ImageCodecFlags { - ImageCodecFlagsEncoder = 0x00000001, - ImageCodecFlagsDecoder = 0x00000002, - ImageCodecFlagsSupportBitmap = 0x00000004, - ImageCodecFlagsSupportVector = 0x00000008, - ImageCodecFlagsSeekableEncode = 0x00000010, - ImageCodecFlagsBlockingDecode = 0x00000020, - ImageCodecFlagsBuiltin = 0x00010000, - ImageCodecFlagsSystem = 0x00020000, - ImageCodecFlagsUser = 0x00040000 -} ImageCodecFlags; - -typedef enum ImageFlags { - ImageFlagsNone = 0, - ImageFlagsScalable = 0x00000001, - ImageFlagsHasAlpha = 0x00000002, - ImageFlagsHasTranslucent = 0x00000004, - ImageFlagsPartiallyScalable = 0x00000008, - ImageFlagsColorSpaceRGB = 0x00000010, - ImageFlagsColorSpaceCMYK = 0x00000020, - ImageFlagsColorSpaceGRAY = 0x00000040, - ImageFlagsColorSpaceYCBCR = 0x00000080, - ImageFlagsColorSpaceYCCK = 0x00000100, - ImageFlagsHasRealDPI = 0x00001000, - ImageFlagsHasRealPixelSize = 0x00002000, - ImageFlagsReadOnly = 0x00010000, - ImageFlagsCaching = 0x00020000 -} ImageFlags; - -typedef enum ImageLockMode { - ImageLockModeRead = 1, - ImageLockModeWrite = 2, - ImageLockModeUserInputBuf = 4 -} ImageLockMode; - -typedef enum ItemDataPosition { - ItemDataPositionAfterHeader = 0, - ItemDataPositionAfterPalette = 1, - ItemDataPositionAfterBits = 2 -} ItemDataPosition; - -typedef enum RotateFlipType { - RotateNoneFlipNone = 0, - Rotate90FlipNone = 1, - Rotate180FlipNone = 2, - Rotate270FlipNone = 3, - RotateNoneFlipX = 4, - Rotate90FlipX = 5, - Rotate180FlipX = 6, - Rotate270FlipX = 7, - Rotate180FlipXY = 0, - Rotate270FlipXY = 1, - RotateNoneFlipXY = 2, - Rotate90FlipXY = 3, - Rotate180FlipY = 4, - Rotate270FlipY = 5, - RotateNoneFlipY = 6, - Rotate90FlipY = 7 -} RotateFlipType; - -typedef struct BitmapData { - UINT Width; - UINT Height; - INT Stride; - INT PixelFormat; /* MSDN: "PixelFormat PixelFormat;" */ - VOID *Scan0; - UINT_PTR Reserved; -} BitmapData; - -typedef struct EncoderParameter { - GUID Guid; - ULONG NumberOfValues; - ULONG Type; - VOID *Value; -} EncoderParameter; - -typedef struct EncoderParameters { - UINT Count; - EncoderParameter Parameter[1]; -} EncoderParameters; - -typedef struct ImageCodecInfo { - CLSID Clsid; - GUID FormatID; - WCHAR *CodecName; - WCHAR *DllName; - WCHAR *FormatDescription; - WCHAR *FilenameExtension; - WCHAR *MimeType; - DWORD Flags; - DWORD Version; - DWORD SigCount; - DWORD SigSize; - BYTE *SigPattern; - BYTE *SigMask; -} ImageCodecInfo; - -/* FIXME: The order of fields is probably wrong. Please don't use this - * structure until this problem is resolved! Can't test because - * ImageItemData is not supported by the redistributable GDI+ 1.0 DLL. */ -typedef struct ImageItemData { - UINT Size; - UINT Position; - VOID *Desc; - UINT DescSize; - UINT *Data; - UINT DataSize; - UINT Cookie; -} ImageItemData; - -typedef struct PropertyItem { - PROPID id; - ULONG length; - WORD type; - VOID *value; -} PropertyItem; - -#define PropertyTagGpsVer ((PROPID) 0x0000) -#define PropertyTagGpsLatitudeRef ((PROPID) 0x0001) -#define PropertyTagGpsLatitude ((PROPID) 0x0002) -#define PropertyTagGpsLongitudeRef ((PROPID) 0x0003) -#define PropertyTagGpsLongitude ((PROPID) 0x0004) -#define PropertyTagGpsAltitudeRef ((PROPID) 0x0005) -#define PropertyTagGpsAltitude ((PROPID) 0x0006) -#define PropertyTagGpsGpsTime ((PROPID) 0x0007) -#define PropertyTagGpsGpsSatellites ((PROPID) 0x0008) -#define PropertyTagGpsGpsStatus ((PROPID) 0x0009) -#define PropertyTagGpsGpsMeasureMode ((PROPID) 0x000A) -#define PropertyTagGpsGpsDop ((PROPID) 0x000B) -#define PropertyTagGpsSpeedRef ((PROPID) 0x000C) -#define PropertyTagGpsSpeed ((PROPID) 0x000D) -#define PropertyTagGpsTrackRef ((PROPID) 0x000E) -#define PropertyTagGpsTrack ((PROPID) 0x000F) -#define PropertyTagGpsImgDirRef ((PROPID) 0x0010) -#define PropertyTagGpsImgDir ((PROPID) 0x0011) -#define PropertyTagGpsMapDatum ((PROPID) 0x0012) -#define PropertyTagGpsDestLatRef ((PROPID) 0x0013) -#define PropertyTagGpsDestLat ((PROPID) 0x0014) -#define PropertyTagGpsDestLongRef ((PROPID) 0x0015) -#define PropertyTagGpsDestLong ((PROPID) 0x0016) -#define PropertyTagGpsDestBearRef ((PROPID) 0x0017) -#define PropertyTagGpsDestBear ((PROPID) 0x0018) -#define PropertyTagGpsDestDistRef ((PROPID) 0x0019) -#define PropertyTagGpsDestDist ((PROPID) 0x001A) -#define PropertyTagNewSubfileType ((PROPID) 0x00FE) -#define PropertyTagSubfileType ((PROPID) 0x00FF) -#define PropertyTagImageWidth ((PROPID) 0x0100) -#define PropertyTagImageHeight ((PROPID) 0x0101) -#define PropertyTagBitsPerSample ((PROPID) 0x0102) -#define PropertyTagCompression ((PROPID) 0x0103) -#define PropertyTagPhotometricInterp ((PROPID) 0x0106) -#define PropertyTagThreshHolding ((PROPID) 0x0107) -#define PropertyTagCellWidth ((PROPID) 0x0108) -#define PropertyTagCellHeight ((PROPID) 0x0109) -#define PropertyTagFillOrder ((PROPID) 0x010A) -#define PropertyTagDocumentName ((PROPID) 0x010D) -#define PropertyTagImageDescription ((PROPID) 0x010E) -#define PropertyTagEquipMake ((PROPID) 0x010F) -#define PropertyTagEquipModel ((PROPID) 0x0110) -#define PropertyTagStripOffsets ((PROPID) 0x0111) -#define PropertyTagOrientation ((PROPID) 0x0112) -#define PropertyTagSamplesPerPixel ((PROPID) 0x0115) -#define PropertyTagRowsPerStrip ((PROPID) 0x0116) -#define PropertyTagStripBytesCount ((PROPID) 0x0117) -#define PropertyTagMinSampleValue ((PROPID) 0x0118) -#define PropertyTagMaxSampleValue ((PROPID) 0x0119) -#define PropertyTagXResolution ((PROPID) 0x011A) -#define PropertyTagYResolution ((PROPID) 0x011B) -#define PropertyTagPlanarConfig ((PROPID) 0x011C) -#define PropertyTagPageName ((PROPID) 0x011D) -#define PropertyTagXPosition ((PROPID) 0x011E) -#define PropertyTagYPosition ((PROPID) 0x011F) -#define PropertyTagFreeOffset ((PROPID) 0x0120) -#define PropertyTagFreeByteCounts ((PROPID) 0x0121) -#define PropertyTagGrayResponseUnit ((PROPID) 0x0122) -#define PropertyTagGrayResponseCurve ((PROPID) 0x0123) -#define PropertyTagT4Option ((PROPID) 0x0124) -#define PropertyTagT6Option ((PROPID) 0x0125) -#define PropertyTagResolutionUnit ((PROPID) 0x0128) -#define PropertyTagPageNumber ((PROPID) 0x0129) -#define PropertyTagTransferFunction ((PROPID) 0x012D) -#define PropertyTagSoftwareUsed ((PROPID) 0x0131) -#define PropertyTagDateTime ((PROPID) 0x0132) -#define PropertyTagArtist ((PROPID) 0x013B) -#define PropertyTagHostComputer ((PROPID) 0x013C) -#define PropertyTagPredictor ((PROPID) 0x013D) -#define PropertyTagWhitePoint ((PROPID) 0x013E) -#define PropertyTagPrimaryChromaticities ((PROPID) 0x013F) -#define PropertyTagColorMap ((PROPID) 0x0140) -#define PropertyTagHalftoneHints ((PROPID) 0x0141) -#define PropertyTagTileWidth ((PROPID) 0x0142) -#define PropertyTagTileLength ((PROPID) 0x0143) -#define PropertyTagTileOffset ((PROPID) 0x0144) -#define PropertyTagTileByteCounts ((PROPID) 0x0145) -#define PropertyTagInkSet ((PROPID) 0x014C) -#define PropertyTagInkNames ((PROPID) 0x014D) -#define PropertyTagNumberOfInks ((PROPID) 0x014E) -#define PropertyTagDotRange ((PROPID) 0x0150) -#define PropertyTagTargetPrinter ((PROPID) 0x0151) -#define PropertyTagExtraSamples ((PROPID) 0x0152) -#define PropertyTagSampleFormat ((PROPID) 0x0153) -#define PropertyTagSMinSampleValue ((PROPID) 0x0154) -#define PropertyTagSMaxSampleValue ((PROPID) 0x0155) -#define PropertyTagTransferRange ((PROPID) 0x0156) -#define PropertyTagJPEGProc ((PROPID) 0x0200) -#define PropertyTagJPEGInterFormat ((PROPID) 0x0201) -#define PropertyTagJPEGInterLength ((PROPID) 0x0202) -#define PropertyTagJPEGRestartInterval ((PROPID) 0x0203) -#define PropertyTagJPEGLosslessPredictors ((PROPID) 0x0205) -#define PropertyTagJPEGPointTransforms ((PROPID) 0x0206) -#define PropertyTagJPEGQTables ((PROPID) 0x0207) -#define PropertyTagJPEGDCTables ((PROPID) 0x0208) -#define PropertyTagJPEGACTables ((PROPID) 0x0209) -#define PropertyTagYCbCrCoefficients ((PROPID) 0x0211) -#define PropertyTagYCbCrSubsampling ((PROPID) 0x0212) -#define PropertyTagYCbCrPositioning ((PROPID) 0x0213) -#define PropertyTagREFBlackWhite ((PROPID) 0x0214) -#define PropertyTagGamma ((PROPID) 0x0301) -#define PropertyTagICCProfileDescriptor ((PROPID) 0x0302) -#define PropertyTagSRGBRenderingIntent ((PROPID) 0x0303) -#define PropertyTagImageTitle ((PROPID) 0x0320) -#define PropertyTagResolutionXUnit ((PROPID) 0x5001) -#define PropertyTagResolutionYUnit ((PROPID) 0x5002) -#define PropertyTagResolutionXLengthUnit ((PROPID) 0x5003) -#define PropertyTagResolutionYLengthUnit ((PROPID) 0x5004) -#define PropertyTagPrintFlags ((PROPID) 0x5005) -#define PropertyTagPrintFlagsVersion ((PROPID) 0x5006) -#define PropertyTagPrintFlagsCrop ((PROPID) 0x5007) -#define PropertyTagPrintFlagsBleedWidth ((PROPID) 0x5008) -#define PropertyTagPrintFlagsBleedWidthScale ((PROPID) 0x5009) -#define PropertyTagHalftoneLPI ((PROPID) 0x500A) -#define PropertyTagHalftoneLPIUnit ((PROPID) 0x500B) -#define PropertyTagHalftoneDegree ((PROPID) 0x500C) -#define PropertyTagHalftoneShape ((PROPID) 0x500D) -#define PropertyTagHalftoneMisc ((PROPID) 0x500E) -#define PropertyTagHalftoneScreen ((PROPID) 0x500F) -#define PropertyTagJPEGQuality ((PROPID) 0x5010) -#define PropertyTagGridSize ((PROPID) 0x5011) -#define PropertyTagThumbnailFormat ((PROPID) 0x5012) -#define PropertyTagThumbnailWidth ((PROPID) 0x5013) -#define PropertyTagThumbnailHeight ((PROPID) 0x5014) -#define PropertyTagThumbnailColorDepth ((PROPID) 0x5015) -#define PropertyTagThumbnailPlanes ((PROPID) 0x5016) -#define PropertyTagThumbnailRawBytes ((PROPID) 0x5017) -#define PropertyTagThumbnailSize ((PROPID) 0x5018) -#define PropertyTagThumbnailCompressedSize ((PROPID) 0x5019) -#define PropertyTagColorTransferFunction ((PROPID) 0x501A) -#define PropertyTagThumbnailData ((PROPID) 0x501B) -#define PropertyTagThumbnailImageWidth ((PROPID) 0x5020) -#define PropertyTagThumbnailImageHeight ((PROPID) 0x5021) -#define PropertyTagThumbnailBitsPerSample ((PROPID) 0x5022) -#define PropertyTagThumbnailCompression ((PROPID) 0x5023) -#define PropertyTagThumbnailPhotometricInterp ((PROPID) 0x5024) -#define PropertyTagThumbnailImageDescription ((PROPID) 0x5025) -#define PropertyTagThumbnailEquipMake ((PROPID) 0x5026) -#define PropertyTagThumbnailEquipModel ((PROPID) 0x5027) -#define PropertyTagThumbnailStripOffsets ((PROPID) 0x5028) -#define PropertyTagThumbnailOrientation ((PROPID) 0x5029) -#define PropertyTagThumbnailSamplesPerPixel ((PROPID) 0x502A) -#define PropertyTagThumbnailRowsPerStrip ((PROPID) 0x502B) -#define PropertyTagThumbnailStripBytesCount ((PROPID) 0x502C) -#define PropertyTagThumbnailResolutionX ((PROPID) 0x502D) -#define PropertyTagThumbnailResolutionY ((PROPID) 0x502E) -#define PropertyTagThumbnailPlanarConfig ((PROPID) 0x502F) -#define PropertyTagThumbnailResolutionUnit ((PROPID) 0x5030) -#define PropertyTagThumbnailTransferFunction ((PROPID) 0x5031) -#define PropertyTagThumbnailSoftwareUsed ((PROPID) 0x5032) -#define PropertyTagThumbnailDateTime ((PROPID) 0x5033) -#define PropertyTagThumbnailArtist ((PROPID) 0x5034) -#define PropertyTagThumbnailWhitePoint ((PROPID) 0x5035) -#define PropertyTagThumbnailPrimaryChromaticities ((PROPID) 0x5036) -#define PropertyTagThumbnailYCbCrCoefficients ((PROPID) 0x5037) -#define PropertyTagThumbnailYCbCrSubsampling ((PROPID) 0x5038) -#define PropertyTagThumbnailYCbCrPositioning ((PROPID) 0x5039) -#define PropertyTagThumbnailRefBlackWhite ((PROPID) 0x503A) -#define PropertyTagThumbnailCopyRight ((PROPID) 0x503B) -#define PropertyTagLuminanceTable ((PROPID) 0x5090) -#define PropertyTagChrominanceTable ((PROPID) 0x5091) -#define PropertyTagFrameDelay ((PROPID) 0x5100) -#define PropertyTagLoopCount ((PROPID) 0x5101) -#define PropertyTagGlobalPalette ((PROPID) 0x5102) -#define PropertyTagIndexBackground ((PROPID) 0x5103) -#define PropertyTagIndexTransparent ((PROPID) 0x5104) -#define PropertyTagPixelUnit ((PROPID) 0x5110) -#define PropertyTagPixelPerUnitX ((PROPID) 0x5111) -#define PropertyTagPixelPerUnitY ((PROPID) 0x5112) -#define PropertyTagPaletteHistogram ((PROPID) 0x5113) -#define PropertyTagCopyright ((PROPID) 0x8298) -#define PropertyTagExifExposureTime ((PROPID) 0x829A) -#define PropertyTagExifFNumber ((PROPID) 0x829D) -#define PropertyTagExifIFD ((PROPID) 0x8769) -#define PropertyTagICCProfile ((PROPID) 0x8773) -#define PropertyTagExifExposureProg ((PROPID) 0x8822) -#define PropertyTagExifSpectralSense ((PROPID) 0x8824) -#define PropertyTagGpsIFD ((PROPID) 0x8825) -#define PropertyTagExifISOSpeed ((PROPID) 0x8827) -#define PropertyTagExifOECF ((PROPID) 0x8828) -#define PropertyTagExifVer ((PROPID) 0x9000) -#define PropertyTagExifDTOrig ((PROPID) 0x9003) -#define PropertyTagExifDTDigitized ((PROPID) 0x9004) -#define PropertyTagExifCompConfig ((PROPID) 0x9101) -#define PropertyTagExifCompBPP ((PROPID) 0x9102) -#define PropertyTagExifShutterSpeed ((PROPID) 0x9201) -#define PropertyTagExifAperture ((PROPID) 0x9202) -#define PropertyTagExifBrightness ((PROPID) 0x9203) -#define PropertyTagExifExposureBias ((PROPID) 0x9204) -#define PropertyTagExifMaxAperture ((PROPID) 0x9205) -#define PropertyTagExifSubjectDist ((PROPID) 0x9206) -#define PropertyTagExifMeteringMode ((PROPID) 0x9207) -#define PropertyTagExifLightSource ((PROPID) 0x9208) -#define PropertyTagExifFlash ((PROPID) 0x9209) -#define PropertyTagExifFocalLength ((PROPID) 0x920A) -#define PropertyTagExifMakerNote ((PROPID) 0x927C) -#define PropertyTagExifUserComment ((PROPID) 0x9286) -#define PropertyTagExifDTSubsec ((PROPID) 0x9290) -#define PropertyTagExifDTOrigSS ((PROPID) 0x9291) -#define PropertyTagExifDTDigSS ((PROPID) 0x9292) -#define PropertyTagExifFPXVer ((PROPID) 0xA000) -#define PropertyTagExifColorSpace ((PROPID) 0xA001) -#define PropertyTagExifPixXDim ((PROPID) 0xA002) -#define PropertyTagExifPixYDim ((PROPID) 0xA003) -#define PropertyTagExifRelatedWav ((PROPID) 0xA004) -#define PropertyTagExifInterop ((PROPID) 0xA005) -#define PropertyTagExifFlashEnergy ((PROPID) 0xA20B) -#define PropertyTagExifSpatialFR ((PROPID) 0xA20C) -#define PropertyTagExifFocalXRes ((PROPID) 0xA20E) -#define PropertyTagExifFocalYRes ((PROPID) 0xA20F) -#define PropertyTagExifFocalResUnit ((PROPID) 0xA210) -#define PropertyTagExifSubjectLoc ((PROPID) 0xA214) -#define PropertyTagExifExposureIndex ((PROPID) 0xA215) -#define PropertyTagExifSensingMethod ((PROPID) 0xA217) -#define PropertyTagExifFileSource ((PROPID) 0xA300) -#define PropertyTagExifSceneType ((PROPID) 0xA301) -#define PropertyTagExifCfaPattern ((PROPID) 0xA302) - -#define PropertyTagTypeByte ((WORD) 1) -#define PropertyTagTypeASCII ((WORD) 2) -#define PropertyTagTypeShort ((WORD) 3) -#define PropertyTagTypeLong ((WORD) 4) -#define PropertyTagTypeRational ((WORD) 5) -#define PropertyTagTypeUndefined ((WORD) 7) -#define PropertyTagTypeSLONG ((WORD) 9) -#define PropertyTagTypeSRational ((WORD) 10) - -#ifdef __cplusplus -extern "C" { -#endif - -extern const GUID EncoderChrominanceTable; /* f2e455dc-09b3-4316-8260-676ada32481c */ -extern const GUID EncoderColorDepth; /* 66087055-ad66-4c7c-9a18-38a2310b8337 */ -extern const GUID EncoderColorSpace; /* ? */ -extern const GUID EncoderCompression; /* e09d739d-ccd4-44ee-8eba-3fbf8be4fc58 */ -extern const GUID EncoderImageItems; /* ? */ -extern const GUID EncoderLuminanceTable; /* edb33bce-0266-4a77-b904-27216099e717 */ -extern const GUID EncoderQuality; /* 1d5be4b5-fa4a-452d-9cdd-5db35105e7eb */ -extern const GUID EncoderRenderMethod; /* 6d42c53a-229a-4825-8bb7-5c99e2b9a8b8 */ -extern const GUID EncoderSaveAsCMYK; /* ? */ -extern const GUID EncoderSaveFlag; /* 292266fc-ac40-47bf-8cfc-a85b89a655de */ -extern const GUID EncoderScanMethod; /* 3a4e2661-3109-4e56-8536-42c156e7dcfa */ -extern const GUID EncoderTransformation; /* 8d0eb2d1-a58e-4ea8-aa14-108074b7b6f9 */ -extern const GUID EncoderVersion; /* 24d18c76-814a-41a4-bf53-1c219cccf797 */ - -extern const GUID ImageFormatBMP; /* b96b3cab-0728-11d3-9d7b-0000f81ef32e */ -extern const GUID ImageFormatEMF; /* b96b3cac-0728-11d3-9d7b-0000f81ef32e */ -extern const GUID ImageFormatEXIF; /* ? */ -extern const GUID ImageFormatGIF; /* b96b3cb0-0728-11d3-9d7b-0000f81ef32e */ -extern const GUID ImageFormatIcon; /* b96b3cb5-0728-11d3-9d7b-0000f81ef32e */ -extern const GUID ImageFormatJPEG; /* b96b3cae-0728-11d3-9d7b-0000f81ef32e */ -extern const GUID ImageFormatMemoryBMP; /* b96b3caa-0728-11d3-9d7b-0000f81ef32e */ -extern const GUID ImageFormatPNG; /* b96b3caf-0728-11d3-9d7b-0000f81ef32e */ -extern const GUID ImageFormatTIFF; /* b96b3cb1-0728-11d3-9d7b-0000f81ef32e */ -extern const GUID ImageFormatUndefined; /* ? */ -extern const GUID ImageFormatWMF; /* b96b3cad-0728-11d3-9d7b-0000f81ef32e */ - -extern const GUID FrameDimensionPage; /* 7462dc86-6180-4c7e-8e3f-ee7333a7a483 */ -extern const GUID FrameDimensionResolution; /* ? */ -extern const GUID FrameDimensionTime; /* 6aedbd6d-3fb5-418a-83a6-7f45229dc872 */ - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* __GDIPLUS_IMAGING_H */ diff --git a/src/gdiplus3/gdiplusimpl.h b/src/gdiplus3/gdiplusimpl.h deleted file mode 100644 index 13b48ab1..00000000 --- a/src/gdiplus3/gdiplusimpl.h +++ /dev/null @@ -1,1613 +0,0 @@ -/* - * gdiplusimpl.h - * - * GDI+ Bitmap, CachedBitmap, CustomLineCap, Font, FontCollection, FontFamily, - * Image, InstalledFontCollection, PrivateFontCollection, Region - * implementation. Definitions of these classes are in gdiplusheaders.h. - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_IMPL_H -#define __GDIPLUS_IMPL_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#ifndef __cplusplus -#error "A C++ compiler is required to include gdiplusimpl.h." -#endif - -/* - * FIXME: I called this file gdiplusimpl.h, but what should it really be called? - * Or did Microsoft create separate files for each class implemented here? - */ - - -// Image - -__inline__ Image* Image::FromFile(const WCHAR *filename, - BOOL useEmbeddedColorManagement) -{ - return new Image(filename, useEmbeddedColorManagement); -} - -__inline__ Image* Image::FromStream(IStream *stream, - BOOL useEmbeddedColorManagement) -{ - return new Image(stream, useEmbeddedColorManagement); -} - -__inline__ Image::Image(const WCHAR *filename, BOOL useEmbeddedColorManagement): - nativeImage(NULL), lastStatus(Ok) -{ - if (useEmbeddedColorManagement) { - lastStatus = DllExports::GdipLoadImageFromFileICM( - filename, &nativeImage); - } else { - lastStatus = DllExports::GdipLoadImageFromFile( - filename, &nativeImage); - } -} - -__inline__ Image::Image(IStream *stream, BOOL useEmbeddedColorManagement): - nativeImage(NULL), lastStatus(Ok) -{ - if (useEmbeddedColorManagement) { - lastStatus = DllExports::GdipLoadImageFromStreamICM( - stream, &nativeImage); - } else { - lastStatus = DllExports::GdipLoadImageFromStream( - stream, &nativeImage); - } -} - -__inline__ Status Image::FindFirstItem(ImageItemData *item) -{ - // FIXME: can't test GdipFindFirstImageItem b/c it isn't exported in 1.0 - return updateStatus(DllExports::GdipFindFirstImageItem( - nativeImage, item)); -} - -__inline__ Status Image::FindNextItem(ImageItemData *item) -{ - // FIXME: can't test GdipFindFirstImageItem b/c it isn't exported in 1.0 - return updateStatus(DllExports::GdipFindNextImageItem( - nativeImage, item)); -} - -__inline__ Status Image::GetAllPropertyItems(UINT totalBufferSize, - UINT numProperties, PropertyItem *allItems) -{ - return updateStatus(DllExports::GdipGetAllPropertyItems( - nativeImage, totalBufferSize, numProperties, allItems)); -} - -__inline__ Status Image::GetBounds(RectF *srcRect, Unit *srcUnit) -{ - return updateStatus(DllExports::GdipGetImageBounds( - nativeImage, srcRect, srcUnit)); -} - -__inline__ Status Image::GetEncoderParameterList(const CLSID *clsidEncoder, - UINT size, EncoderParameters *buffer) -{ - return updateStatus(DllExports::GdipGetEncoderParameterList( - nativeImage, clsidEncoder, size, buffer)); -} - -__inline__ UINT Image::GetEncoderParameterListSize(const CLSID *clsidEncoder) -{ - UINT result = 0; - updateStatus(DllExports::GdipGetEncoderParameterListSize( - nativeImage, clsidEncoder, &result)); - return result; -} - -__inline__ UINT Image::GetFlags() -{ - UINT result = 0; - updateStatus(DllExports::GdipGetImageFlags(nativeImage, &result)); - return result; -} - -__inline__ UINT Image::GetFrameCount(const GUID *dimensionID) -{ - UINT result = 0; - updateStatus(DllExports::GdipImageGetFrameCount( - nativeImage, dimensionID, &result)); - return result; -} - -__inline__ UINT Image::GetFrameDimensionsCount() -{ - UINT result = 0; - updateStatus(DllExports::GdipImageGetFrameDimensionsCount( - nativeImage, &result)); - return result; -} - -__inline__ Status Image::GetFrameDimensionsList(GUID *dimensionIDs, UINT count) -{ - return updateStatus(DllExports::GdipImageGetFrameDimensionsList( - nativeImage, dimensionIDs, count)); -} - -__inline__ UINT Image::GetHeight() -{ - UINT result = 0; - updateStatus(DllExports::GdipGetImageHeight(nativeImage, &result)); - return result; -} - -__inline__ REAL Image::GetHorizontalResolution() -{ - REAL result = 0.0f; - updateStatus(DllExports::GdipGetImageHorizontalResolution( - nativeImage, &result)); - return result; -} - -__inline__ Status Image::GetItemData(ImageItemData *item) -{ - // FIXME: can't test GdipGetImageItemData b/c it isn't exported in 1.0 - return updateStatus(DllExports::GdipGetImageItemData( - nativeImage, item)); -} - -__inline__ Status Image::GetPalette(ColorPalette *palette, INT size) -{ - return updateStatus(DllExports::GdipGetImagePalette( - nativeImage, palette, size)); -} - -__inline__ INT Image::GetPaletteSize() -{ - INT result = 0; - updateStatus(DllExports::GdipGetImagePaletteSize(nativeImage, &result)); - return result; -} - -__inline__ Status Image::GetPhysicalDimension(SizeF *size) -{ - if (!size) return lastStatus = InvalidParameter; - return updateStatus(DllExports::GdipGetImageDimension( - nativeImage, &size->Width, &size->Height)); -} - -__inline__ PixelFormat Image::GetPixelFormat() -{ - PixelFormat result = (PixelFormat) 0; - updateStatus(DllExports::GdipGetImagePixelFormat(nativeImage, &result)); - return result; -} - -__inline__ UINT Image::GetPropertyCount() -{ - UINT result = 0; - updateStatus(DllExports::GdipGetPropertyCount(nativeImage, &result)); - return result; -} - -__inline__ Status Image::GetPropertyIdList(UINT numOfProperty, PROPID *list) -{ - return updateStatus(DllExports::GdipGetPropertyIdList( - nativeImage, numOfProperty, list)); -} - -__inline__ Status Image::GetPropertyItem(PROPID propId, UINT propSize, - PropertyItem *buffer) -{ - return updateStatus(DllExports::GdipGetPropertyItem( - nativeImage, propId, propSize, buffer)); -} - -__inline__ UINT Image::GetPropertyItemSize(PROPID propId) -{ - UINT result = 0; - updateStatus(DllExports::GdipGetPropertyItemSize( - nativeImage, propId, &result)); - return result; -} - -__inline__ Status Image::GetPropertySize( - UINT *totalBufferSize, UINT *numProperties) -{ - return updateStatus(DllExports::GdipGetPropertySize( - nativeImage, totalBufferSize, numProperties)); -} - -__inline__ Status Image::GetRawFormat(GUID *format) -{ - return updateStatus(DllExports::GdipGetImageRawFormat( - nativeImage, format)); -} - -__inline__ Image* Image::GetThumbnailImage(UINT thumbWidth, UINT thumbHeight, - GetThumbnailImageAbort callback, VOID *callbackData) -{ - GpImage *thumbImage = NULL; - Status status = updateStatus(DllExports::GdipGetImageThumbnail( - nativeImage, thumbWidth, thumbHeight, &thumbImage, - callback, callbackData)); - - if (status == Ok) { - Image *result = new Image(thumbImage, Ok); - if (!result) { - DllExports::GdipDisposeImage(thumbImage); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } -} - -__inline__ ImageType Image::GetType() const -{ - ImageType result = ImageTypeUnknown; - updateStatus(DllExports::GdipGetImageType(nativeImage, &result)); - return result; -} - -__inline__ REAL Image::GetVerticalResolution() -{ - REAL result = 0.0f; - updateStatus(DllExports::GdipGetImageVerticalResolution( - nativeImage, &result)); - return result; -} - -__inline__ UINT Image::GetWidth() -{ - UINT result = 0; - updateStatus(DllExports::GdipGetImageWidth(nativeImage, &result)); - return result; -} - -__inline__ Status Image::RemovePropertyItem(PROPID propId) -{ - return updateStatus(DllExports::GdipRemovePropertyItem( - nativeImage, propId)); -} - -__inline__ Status Image::RotateFlip(RotateFlipType rotateFlipType) -{ - return updateStatus(DllExports::GdipImageRotateFlip( - nativeImage, rotateFlipType)); -} - -__inline__ Status Image::Save(const WCHAR *filename, const CLSID *clsidEncoder, - const EncoderParameters *encoderParams) -{ - return updateStatus(DllExports::GdipSaveImageToFile( - nativeImage, filename, clsidEncoder, encoderParams)); -} - -__inline__ Status Image::Save(IStream *stream, const CLSID *clsidEncoder, - const EncoderParameters *encoderParams) -{ - return updateStatus(DllExports::GdipSaveImageToStream( - nativeImage, stream, clsidEncoder, encoderParams)); -} - -__inline__ Status Image::SaveAdd(const EncoderParameters *encoderParams) -{ - return updateStatus(DllExports::GdipSaveAdd( - nativeImage, encoderParams)); -} - -__inline__ Status Image::SaveAdd(Image *newImage, - const EncoderParameters *encoderParams) -{ - return updateStatus(DllExports::GdipSaveAddImage( - nativeImage, - newImage ? newImage->nativeImage : NULL, - encoderParams)); -} - -__inline__ Status Image::SelectActiveFrame( - const GUID *dimensionID, UINT frameIndex) -{ - return updateStatus(DllExports::GdipImageSelectActiveFrame( - nativeImage, dimensionID, frameIndex)); -} - -__inline__ Status Image::SetAbort(GdiplusAbort *pIAbort) -{ - // FIXME: can't test GdipImageSetAbort because it isn't exported in 1.0 - return updateStatus(DllExports::GdipImageSetAbort( - nativeImage, pIAbort)); -} - -__inline__ Status Image::SetPalette(const ColorPalette *palette) -{ - return updateStatus(DllExports::GdipSetImagePalette( - nativeImage, palette)); -} - -__inline__ Status Image::SetPropertyItem(const PropertyItem *item) -{ - return updateStatus(DllExports::GdipSetPropertyItem(nativeImage, item)); -} - - -// Bitmap - -__inline__ Bitmap* Bitmap::FromBITMAPINFO(const BITMAPINFO *gdiBitmapInfo, - VOID *gdiBitmapData) -{ - return new Bitmap(gdiBitmapInfo, gdiBitmapData); -} - -__inline__ Bitmap* Bitmap::FromDirectDrawSurface7(IDirectDrawSurface7 *surface) -{ - return new Bitmap(surface); -} - -__inline__ Bitmap* Bitmap::FromFile(const WCHAR *filename, - BOOL useEmbeddedColorManagement) -{ - return new Bitmap(filename, useEmbeddedColorManagement); -} - -__inline__ Bitmap* Bitmap::FromHBITMAP(HBITMAP hbm, HPALETTE hpal) -{ - return new Bitmap(hbm, hpal); -} - -__inline__ Bitmap* Bitmap::FromHICON(HICON icon) -{ - return new Bitmap(icon); -} - -__inline__ Bitmap* Bitmap::FromResource( - HINSTANCE hInstance, const WCHAR *bitmapName) -{ - return new Bitmap(hInstance, bitmapName); -} - -__inline__ Bitmap* Bitmap::FromStream(IStream *stream, - BOOL useEmbeddedColorManagement) -{ - return new Bitmap(stream, useEmbeddedColorManagement); -} - -//TODO: [GDI+ 1.1] Bitmap::ApplyEffect -//__inline__ Status Bitmap::ApplyEffect(Bitmap **inputs, INT numInputs, -// Effect *effect, RECT *ROI, RECT *outputRect, Bitmap **output) -//{ -// return NotImplemented; -//} - -__inline__ Status Bitmap::InitializePalette(ColorPalette *palette, - PaletteType paletteType, INT optimalColors, - BOOL useTransparentColor, Bitmap *bitmap) -{ - // FIXME: can't test GdipInitializePalette b/c it isn't exported in 1.0 - return DllExports::GdipInitializePalette(palette, paletteType, - optimalColors, useTransparentColor, - bitmap ? (GpBitmap*) bitmap->nativeImage : NULL); -} - -__inline__ Bitmap::Bitmap(const BITMAPINFO *gdiBitmapInfo, VOID *gdiBitmapData): - Image(NULL, Ok) -{ - GpBitmap *nativeBitmap = NULL; - lastStatus = DllExports::GdipCreateBitmapFromGdiDib( - gdiBitmapInfo, gdiBitmapData, &nativeBitmap); - nativeImage = nativeBitmap; -} - -__inline__ Bitmap::Bitmap(IDirectDrawSurface7 *surface): Image(NULL, Ok) -{ - GpBitmap *nativeBitmap = NULL; - lastStatus = DllExports::GdipCreateBitmapFromDirectDrawSurface( - surface, &nativeBitmap); - nativeImage = nativeBitmap; -} - -__inline__ Bitmap::Bitmap(const WCHAR *filename, - BOOL useEmbeddedColorManagement): Image(NULL, Ok) -{ - GpBitmap *nativeBitmap = NULL; - if (useEmbeddedColorManagement) { - lastStatus = DllExports::GdipCreateBitmapFromFileICM( - filename, &nativeBitmap); - } else { - lastStatus = DllExports::GdipCreateBitmapFromFile( - filename, &nativeBitmap); - } - nativeImage = nativeBitmap; -} - -__inline__ Bitmap::Bitmap(HBITMAP hbm, HPALETTE hpal): - Image(NULL, Ok) -{ - GpBitmap *nativeBitmap = NULL; - lastStatus = DllExports::GdipCreateBitmapFromHBITMAP( - hbm, hpal, &nativeBitmap); - nativeImage = nativeBitmap; -} - -__inline__ Bitmap::Bitmap(HICON hicon): - Image(NULL, Ok) -{ - GpBitmap *nativeBitmap = NULL; - lastStatus = DllExports::GdipCreateBitmapFromHICON(hicon, &nativeBitmap); - nativeImage = nativeBitmap; -} - -__inline__ Bitmap::Bitmap(HINSTANCE hInstance, const WCHAR *bitmapName): - Image(NULL, Ok) -{ - GpBitmap *nativeBitmap = NULL; - lastStatus = DllExports::GdipCreateBitmapFromResource( - hInstance, bitmapName, &nativeBitmap); - nativeImage = nativeBitmap; -} - -__inline__ Bitmap::Bitmap(IStream *stream, BOOL useEmbeddedColorManagement): - Image(NULL, Ok) -{ - GpBitmap *nativeBitmap = NULL; - if (useEmbeddedColorManagement) { - lastStatus = DllExports::GdipCreateBitmapFromStreamICM( - stream, &nativeBitmap); - } else { - lastStatus = DllExports::GdipCreateBitmapFromStream( - stream, &nativeBitmap); - } - nativeImage = nativeBitmap; -} - -__inline__ Bitmap::Bitmap(INT width, INT height, Graphics *target): - Image(NULL, Ok) -{ - GpBitmap *nativeBitmap = NULL; - lastStatus = DllExports::GdipCreateBitmapFromGraphics( - width, height, target ? target->nativeGraphics : NULL, - &nativeBitmap); - nativeImage = nativeBitmap; -} - -__inline__ Bitmap::Bitmap(INT width, INT height, PixelFormat format): - Image(NULL, Ok) -{ - GpBitmap *nativeBitmap = NULL; - lastStatus = DllExports::GdipCreateBitmapFromScan0( - width, height, 0, format, NULL, &nativeBitmap); - nativeImage = nativeBitmap; -} - -__inline__ Bitmap::Bitmap(INT width, INT height, INT stride, - PixelFormat format, BYTE *scan0): Image(NULL, Ok) -{ - GpBitmap *nativeBitmap = NULL; - lastStatus = DllExports::GdipCreateBitmapFromScan0( - width, height, stride, format, scan0, &nativeBitmap); - nativeImage = nativeBitmap; -} - -__inline__ Bitmap* Bitmap::Clone(const RectF& rect, PixelFormat format) const -{ - return Clone(rect.X, rect.Y, rect.Width, rect.Height, format); -} - -__inline__ Bitmap* Bitmap::Clone(const Rect& rect, PixelFormat format) const -{ - return Clone(rect.X, rect.Y, rect.Width, rect.Height, format); -} - -__inline__ Bitmap* Bitmap::Clone(REAL x, REAL y, REAL width, REAL height, - PixelFormat format) const -{ - GpBitmap *cloneBitmap = NULL; - Status status = updateStatus(DllExports::GdipCloneBitmapArea( - x, y, width, height, format, - (GpBitmap*) nativeImage, &cloneBitmap)); - if (status == Ok) { - Bitmap *result = new Bitmap(cloneBitmap, lastStatus); - if (!result) { - DllExports::GdipDisposeImage(cloneBitmap); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } -} - -__inline__ Bitmap* Bitmap::Clone(INT x, INT y, INT width, INT height, - PixelFormat format) const -{ - GpBitmap *cloneBitmap = NULL; - Status status = updateStatus(DllExports::GdipCloneBitmapAreaI( - x, y, width, height, format, - (GpBitmap*) nativeImage, &cloneBitmap)); - if (status == Ok) { - Bitmap *result = new Bitmap(cloneBitmap, lastStatus); - if (!result) { - DllExports::GdipDisposeImage(cloneBitmap); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } -} - -//TODO: [GDI+ 1.1] Bitmap::ApplyEffect -//__inline__ Status Bitmap::ApplyEffect(Effect *effect, RECT *ROI) -//{ -// return NotImplemented; -//} - -__inline__ Status Bitmap::ConvertFormat(PixelFormat format, - DitherType ditherType, PaletteType paletteType, - ColorPalette *palette, REAL alphaThresholdPercent) -{ - // FIXME: can't test GdipBitmapConvertFormat b/c it isn't exported in 1.0 - return updateStatus(DllExports::GdipBitmapConvertFormat( - (GpBitmap*) nativeImage, format, ditherType, - paletteType, palette, alphaThresholdPercent)); -} - -__inline__ Status Bitmap::GetHBITMAP( - const Color& colorBackground, HBITMAP *hbmReturn) const -{ - return updateStatus(DllExports::GdipCreateHBITMAPFromBitmap( - (GpBitmap*) nativeImage, hbmReturn, - colorBackground.GetValue())); -} - -__inline__ Status Bitmap::GetHICON(HICON *icon) const -{ - return updateStatus(DllExports::GdipCreateHICONFromBitmap( - (GpBitmap*) nativeImage, icon)); -} - -__inline__ Status Bitmap::GetHistogram(HistogramFormat format, - UINT numberOfEntries, - UINT *channel0, UINT *channel1, - UINT *channel2, UINT *channel3) const -{ - return updateStatus(DllExports::GdipBitmapGetHistogram( - (GpBitmap*) nativeImage, format, numberOfEntries, - channel0, channel1, channel2, channel3)); -} - -__inline__ Status Bitmap::GetHistogramSize(HistogramFormat format, - UINT *numberOfEntries) const -{ - return updateStatus(DllExports::GdipBitmapGetHistogramSize( - format, numberOfEntries)); -} - -__inline__ Status Bitmap::GetPixel(INT x, INT y, Color *color) const -{ - return updateStatus(DllExports::GdipBitmapGetPixel( - (GpBitmap*) nativeImage, x, y, - color ? &color->Value : NULL)); -} - -__inline__ Status Bitmap::LockBits(const Rect *rect, UINT flags, - PixelFormat format, BitmapData *lockedBitmapData) -{ - return updateStatus(DllExports::GdipBitmapLockBits( - (GpBitmap*) nativeImage, rect, flags, format, - lockedBitmapData)); -} - -__inline__ Status Bitmap::SetPixel(INT x, INT y, const Color& color) -{ - return updateStatus(DllExports::GdipBitmapSetPixel( - (GpBitmap*) nativeImage, x, y, color.GetValue())); -} - -__inline__ Status Bitmap::SetResolution(REAL xdpi, REAL ydpi) -{ - return updateStatus(DllExports::GdipBitmapSetResolution( - (GpBitmap*) nativeImage, xdpi, ydpi)); -} - -__inline__ Status Bitmap::UnlockBits(BitmapData *lockedBitmapData) -{ - return updateStatus(DllExports::GdipBitmapUnlockBits( - (GpBitmap*) nativeImage, lockedBitmapData)); -} - - -// CachedBitmap - -__inline__ CachedBitmap::CachedBitmap(Bitmap *bitmap, Graphics *graphics): - nativeCachedBitmap(NULL), lastStatus(Ok) -{ - lastStatus = DllExports::GdipCreateCachedBitmap( - bitmap ? ((GpBitmap*) bitmap->nativeImage) : NULL, - graphics ? graphics->nativeGraphics : NULL, - &nativeCachedBitmap); -} - -__inline__ CachedBitmap::~CachedBitmap() -{ - DllExports::GdipDeleteCachedBitmap(nativeCachedBitmap); -} - - -// CustomLineCap - -__inline__ CustomLineCap::CustomLineCap( - const GraphicsPath *fillPath, - const GraphicsPath *strokePath, - LineCap baseCap, REAL baseInset): - nativeCustomLineCap(NULL), lastStatus(Ok) -{ - lastStatus = DllExports::GdipCreateCustomLineCap( - fillPath ? fillPath->nativePath : NULL, - strokePath ? strokePath->nativePath : NULL, - baseCap, baseInset, &nativeCustomLineCap); -} - -__inline__ LineCap CustomLineCap::GetBaseCap() const -{ - LineCap result = LineCapFlat; - updateStatus(DllExports::GdipGetCustomLineCapBaseCap( - nativeCustomLineCap, &result)); - return result; -} - -__inline__ REAL CustomLineCap::GetBaseInset() const -{ - REAL result = 0.0f; - updateStatus(DllExports::GdipGetCustomLineCapBaseInset( - nativeCustomLineCap, &result)); - return result; -} - -__inline__ Status CustomLineCap::GetStrokeCaps(LineCap *startCap, - LineCap *endCap) const -{ - return updateStatus(DllExports::GdipGetCustomLineCapStrokeCaps( - nativeCustomLineCap, startCap, endCap)); -} - -__inline__ LineJoin CustomLineCap::GetStrokeJoin() const -{ - LineJoin result = LineJoinMiter; - updateStatus(DllExports::GdipGetCustomLineCapStrokeJoin( - nativeCustomLineCap, &result)); - return result; -} - -__inline__ REAL CustomLineCap::GetWidthScale() const -{ - REAL result = 0.0f; - updateStatus(DllExports::GdipGetCustomLineCapWidthScale( - nativeCustomLineCap, &result)); - return result; -} - -__inline__ Status CustomLineCap::SetBaseCap(LineCap baseCap) -{ - return updateStatus(DllExports::GdipSetCustomLineCapBaseCap( - nativeCustomLineCap, baseCap)); -} - -__inline__ Status CustomLineCap::SetBaseInset(REAL inset) -{ - return updateStatus(DllExports::GdipSetCustomLineCapBaseInset( - nativeCustomLineCap, inset)); -} - -__inline__ Status CustomLineCap::SetStrokeCap(LineCap strokeCap) -{ - return updateStatus(DllExports::GdipSetCustomLineCapStrokeCaps( - nativeCustomLineCap, strokeCap, strokeCap)); -} - -__inline__ Status CustomLineCap::SetStrokeCaps(LineCap startCap, LineCap endCap) -{ - return updateStatus(DllExports::GdipSetCustomLineCapStrokeCaps( - nativeCustomLineCap, startCap, endCap)); -} - -__inline__ Status CustomLineCap::SetStrokeJoin(LineJoin lineJoin) -{ - return updateStatus(DllExports::GdipSetCustomLineCapStrokeJoin( - nativeCustomLineCap, lineJoin)); -} - -__inline__ Status CustomLineCap::SetWidthScale(REAL widthScale) -{ - return updateStatus(DllExports::GdipSetCustomLineCapWidthScale( - nativeCustomLineCap, widthScale)); -} - - -// Font - -__inline__ Font::Font(const FontFamily *family, - REAL emSize, INT style, Unit unit): - nativeFont(NULL), lastStatus(Ok) -{ - lastStatus = DllExports::GdipCreateFont( - family ? family->nativeFontFamily : NULL, - emSize, style, unit, &nativeFont); -} - -__inline__ Font::Font(HDC hdc, HFONT hfont): - nativeFont(NULL), lastStatus(Ok) -{ - LOGFONTW logfont; - if (GetObject(hfont, sizeof logfont, &logfont)) { - lastStatus = DllExports::GdipCreateFontFromLogfontW( - hdc, &logfont, &nativeFont); - } else { - lastStatus = DllExports::GdipCreateFontFromDC( - hdc, &nativeFont); - } -} - -__inline__ Font::Font(HDC hdc, const LOGFONTA *logfont): - nativeFont(NULL), lastStatus(Ok) -{ - lastStatus = DllExports::GdipCreateFontFromLogfontA( - hdc, logfont, &nativeFont); -} - -__inline__ Font::Font(HDC hdc, const LOGFONTW *logfont): - nativeFont(NULL), lastStatus(Ok) -{ - lastStatus = DllExports::GdipCreateFontFromLogfontW( - hdc, logfont, &nativeFont); -} - -__inline__ Font::Font(HDC hdc): - nativeFont(NULL), lastStatus(Ok) -{ - lastStatus = DllExports::GdipCreateFontFromDC(hdc, &nativeFont); -} - -__inline__ Font::Font(const WCHAR *familyName, REAL emSize, INT style, - Unit unit, const FontCollection *fontCollection): - nativeFont(NULL), lastStatus(Ok) -{ - GpFontFamily *nativeFamily = NULL; - lastStatus = DllExports::GdipCreateFontFamilyFromName( - familyName, - fontCollection ? fontCollection->nativeFontCollection : NULL, - &nativeFamily); - - if (nativeFamily) { - lastStatus = DllExports::GdipCreateFont( - nativeFamily, emSize, style, unit, &nativeFont); - DllExports::GdipDeleteFontFamily(nativeFamily); - } -} - -__inline__ Font::~Font() -{ - DllExports::GdipDeleteFont(nativeFont); -} - -__inline__ Font* Font::Clone() const -{ - GpFont *cloneFont = NULL; - Status status = updateStatus(DllExports::GdipCloneFont( - nativeFont, &cloneFont)); - if (status == Ok) { - Font *result = new Font(cloneFont, lastStatus); - if (!result) { - DllExports::GdipDeleteFont(cloneFont); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } -} - -__inline__ Status Font::GetFamily(FontFamily *family) const -{ - if (!family) return lastStatus = InvalidParameter; - // FIXME: do we need to call GdipDeleteFontFamily first? - return family->lastStatus = updateStatus(DllExports::GdipGetFamily( - nativeFont, &family->nativeFontFamily)); -} - -__inline__ REAL Font::GetHeight(const Graphics *graphics) const -{ - REAL result = 0.0f; - updateStatus(DllExports::GdipGetFontHeight( - nativeFont, graphics ? graphics->nativeGraphics : NULL, - &result)); - return result; -} - -__inline__ REAL Font::GetHeight(REAL dpi) const -{ - REAL result = 0.0f; - updateStatus(DllExports::GdipGetFontHeightGivenDPI( - nativeFont, dpi, &result)); - return result; -} - -__inline__ Status Font::GetLogFontA(const Graphics *graphics, LOGFONTA *logfontA) -const -{ - return updateStatus(DllExports::GdipGetLogFontA( - nativeFont, graphics ? graphics->nativeGraphics : NULL, - logfontA)); -} - -__inline__ Status Font::GetLogFontW(const Graphics *graphics, LOGFONTW *logfontW) -const -{ - return updateStatus(DllExports::GdipGetLogFontW( - nativeFont, graphics ? graphics->nativeGraphics : NULL, - logfontW)); -} - -__inline__ REAL Font::GetSize() const -{ - REAL result = 0.0; - updateStatus(DllExports::GdipGetFontSize(nativeFont, &result)); - return result; -} - -__inline__ INT Font::GetStyle() const -{ - INT result = FontStyleRegular; - updateStatus(DllExports::GdipGetFontStyle(nativeFont, &result)); - return result; -} - -__inline__ Unit Font::GetUnit() const -{ - Unit result = UnitPoint; - updateStatus(DllExports::GdipGetFontUnit(nativeFont, &result)); - return result; -} - - -// FontCollection - -__inline__ FontCollection::FontCollection(): - nativeFontCollection(NULL), lastStatus(Ok) -{ -} - -__inline__ Status FontCollection::GetFamilies(INT numSought, - FontFamily *families, INT *numFound) const -{ - if (numSought <= 0 || !families || !numFound) - return lastStatus = InvalidParameter; - - for (int i = 0; i < numSought; ++i) { - families[i].nativeFontFamily = NULL; - families[i].lastStatus = FontFamilyNotFound; - } - *numFound = 0; - - GpFontFamily **nativeFamilyArray = (GpFontFamily**) - DllExports::GdipAlloc(numSought * sizeof (GpFontFamily*)); - if (!nativeFamilyArray) - return lastStatus = OutOfMemory; - - Status status = updateStatus(DllExports::GdipGetFontCollectionFamilyList( - nativeFontCollection, numSought, nativeFamilyArray, - numFound)); - - // FIXME: must the native GpFontFamily objects be cloned? Seems so. - // (if this is not done, the "Creating a Private Font Collection" - // example crashes on "delete[] pFontFamily") - - if (status == Ok) { - for (int i = 0; i < *numFound; ++i) { - families[i].lastStatus = - updateStatus(DllExports::GdipCloneFontFamily( - nativeFamilyArray[i], - &families[i].nativeFontFamily)); - } - } - - DllExports::GdipFree(nativeFamilyArray); - return status; -} - -__inline__ INT FontCollection::GetFamilyCount() const -{ - INT result = 0; - updateStatus(DllExports::GdipGetFontCollectionFamilyCount( - nativeFontCollection, &result)); - return result; -} - - -// FontFamily - -// FIXME: do FontFamily::GenericMonospace() et al. need to be thread safe? -// FIXME: maybe put parts of this in gdiplus.c - -extern "C" void *_GdipFontFamilyCachedGenericMonospace; -extern "C" void *_GdipFontFamilyCachedGenericSansSerif; -extern "C" void *_GdipFontFamilyCachedGenericSerif; - -__inline__ const FontFamily* FontFamily::GenericMonospace() -{ - if (!_GdipFontFamilyCachedGenericMonospace) { - GpFontFamily *nativeFontFamily = 0; - Status status = DllExports::GdipGetGenericFontFamilyMonospace( - &nativeFontFamily); - if (status == Ok && nativeFontFamily) { - _GdipFontFamilyCachedGenericMonospace = (void*) - new FontFamily(nativeFontFamily, Ok); - } - } - return (FontFamily*) _GdipFontFamilyCachedGenericMonospace; -} - -__inline__ const FontFamily* FontFamily::GenericSansSerif() -{ - if (!_GdipFontFamilyCachedGenericSansSerif) { - GpFontFamily *nativeFontFamily = 0; - Status status = DllExports::GdipGetGenericFontFamilySansSerif( - &nativeFontFamily); - if (status == Ok && nativeFontFamily) { - _GdipFontFamilyCachedGenericSansSerif = (void*) - new FontFamily(nativeFontFamily, Ok); - } - } - return (FontFamily*) _GdipFontFamilyCachedGenericSansSerif; -} - -__inline__ const FontFamily* FontFamily::GenericSerif() -{ - if (!_GdipFontFamilyCachedGenericSerif) { - GpFontFamily *nativeFontFamily = 0; - Status status = DllExports::GdipGetGenericFontFamilySerif( - &nativeFontFamily); - if (status == Ok && nativeFontFamily) { - _GdipFontFamilyCachedGenericSerif = (void*) - new FontFamily(nativeFontFamily, Ok); - } - } - return (FontFamily*) _GdipFontFamilyCachedGenericSerif; -} - -__inline__ FontFamily::FontFamily(): - nativeFontFamily(NULL), lastStatus(Ok) -{ -} - -__inline__ FontFamily::FontFamily(const WCHAR *name, - const FontCollection *fontCollection): - nativeFontFamily(NULL), lastStatus(Ok) -{ - lastStatus = DllExports::GdipCreateFontFamilyFromName(name, - fontCollection ? fontCollection->nativeFontCollection : NULL, - &nativeFontFamily); -} - -__inline__ FontFamily::~FontFamily() -{ - DllExports::GdipDeleteFontFamily(nativeFontFamily); -} - -__inline__ FontFamily* FontFamily::Clone() const -{ - GpFontFamily *cloneFontFamily = NULL; - Status status = updateStatus(DllExports::GdipCloneFontFamily( - nativeFontFamily, &cloneFontFamily)); - if (status == Ok) { - FontFamily *result = new FontFamily(cloneFontFamily, lastStatus); - if (!result) { - DllExports::GdipDeleteFontFamily(cloneFontFamily); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } -} - -__inline__ UINT16 FontFamily::GetCellAscent(INT style) const -{ - UINT16 result = 0; - updateStatus(DllExports::GdipGetCellAscent( - nativeFontFamily, style, &result)); - return result; -} - -__inline__ UINT16 FontFamily::GetCellDescent(INT style) const -{ - UINT16 result = 0; - updateStatus(DllExports::GdipGetCellDescent( - nativeFontFamily, style, &result)); - return result; -} - -__inline__ UINT16 FontFamily::GetEmHeight(INT style) const -{ - UINT16 result = 0; - updateStatus(DllExports::GdipGetEmHeight( - nativeFontFamily, style, &result)); - return result; -} - -__inline__ Status FontFamily::GetFamilyName(WCHAR name[LF_FACESIZE], - LANGID language) const -{ - return updateStatus(DllExports::GdipGetFamilyName( - nativeFontFamily, name, language)); -} - -__inline__ UINT16 FontFamily::GetLineSpacing(INT style) const -{ - UINT16 result = 0; - updateStatus(DllExports::GdipGetLineSpacing( - nativeFontFamily, style, &result)); - return result; -} - -__inline__ BOOL FontFamily::IsStyleAvailable(INT style) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsStyleAvailable( - nativeFontFamily, style, &result)); - return result; -} - - -// InstalledFontCollection - -__inline__ InstalledFontCollection::InstalledFontCollection() -{ - lastStatus = DllExports::GdipNewInstalledFontCollection( - &nativeFontCollection); -} - - -// PrivateFontCollection - -__inline__ PrivateFontCollection::PrivateFontCollection() -{ - lastStatus = DllExports::GdipNewPrivateFontCollection( - &nativeFontCollection); -} - -__inline__ Status PrivateFontCollection::AddFontFile(const WCHAR *filename) -{ - return updateStatus(DllExports::GdipPrivateAddFontFile( - nativeFontCollection, filename)); -} - -__inline__ Status PrivateFontCollection::AddMemoryFont( - const VOID *memory, INT length) -{ - return updateStatus(DllExports::GdipPrivateAddMemoryFont( - nativeFontCollection, memory, length)); -} - - -// Region - -__inline__ Region* Region::FromHRGN(HRGN hrgn) -{ - return new Region(hrgn); -} - -__inline__ Region::Region(): nativeRegion(NULL), lastStatus(Ok) -{ - lastStatus = DllExports::GdipCreateRegion(&nativeRegion); -} - -__inline__ Region::Region(const RectF& rect): nativeRegion(NULL), lastStatus(Ok) -{ - lastStatus = DllExports::GdipCreateRegionRect(&rect, &nativeRegion); -} - -__inline__ Region::Region(const Rect& rect): nativeRegion(NULL), lastStatus(Ok) -{ - lastStatus = DllExports::GdipCreateRegionRectI(&rect, &nativeRegion); -} - -__inline__ Region::Region(const GraphicsPath *path): - nativeRegion(NULL), lastStatus(Ok) -{ - lastStatus = DllExports::GdipCreateRegionPath( - path ? path->nativePath : NULL, &nativeRegion); -} - -__inline__ Region::Region(const BYTE *regionData, INT size): - nativeRegion(NULL), lastStatus(Ok) -{ - lastStatus = DllExports::GdipCreateRegionRgnData( - regionData, size, &nativeRegion); -} - -__inline__ Region::Region(HRGN hrgn): nativeRegion(NULL), lastStatus(Ok) -{ - lastStatus = DllExports::GdipCreateRegionHrgn(hrgn, &nativeRegion); -} - -__inline__ Region::~Region() -{ - DllExports::GdipDeleteRegion(nativeRegion); -} - -__inline__ Region* Region::Clone() const -{ - GpRegion *cloneRegion = NULL; - Status status = updateStatus(DllExports::GdipCloneRegion( - nativeRegion, &cloneRegion)); - if (status == Ok) { - Region *result = new Region(cloneRegion, lastStatus); - if (!result) { - DllExports::GdipDeleteRegion(cloneRegion); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } -} - -__inline__ Status Region::Complement(const RectF& rect) -{ - return updateStatus(DllExports::GdipCombineRegionRect( - nativeRegion, &rect, CombineModeComplement)); -} - -__inline__ Status Region::Complement(const Rect& rect) -{ - return updateStatus(DllExports::GdipCombineRegionRectI( - nativeRegion, &rect, CombineModeComplement)); -} - -__inline__ Status Region::Complement(const Region *region) -{ - return updateStatus(DllExports::GdipCombineRegionRegion( - nativeRegion, region ? region->nativeRegion : NULL, - CombineModeComplement)); -} - -__inline__ Status Region::Complement(const GraphicsPath *path) -{ - return updateStatus(DllExports::GdipCombineRegionPath( - nativeRegion, path ? path->nativePath : NULL, - CombineModeComplement)); -} - -__inline__ BOOL Region::Equals(const Region *region, const Graphics *graphics) -const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsEqualRegion( - nativeRegion, region ? region->nativeRegion : NULL, - graphics ? graphics->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ Status Region::Exclude(const RectF& rect) -{ - return updateStatus(DllExports::GdipCombineRegionRect( - nativeRegion, &rect, CombineModeExclude)); -} - -__inline__ Status Region::Exclude(const Rect& rect) -{ - return updateStatus(DllExports::GdipCombineRegionRectI( - nativeRegion, &rect, CombineModeExclude)); -} - -__inline__ Status Region::Exclude(const Region *region) -{ - return updateStatus(DllExports::GdipCombineRegionRegion( - nativeRegion, region ? region->nativeRegion : NULL, - CombineModeExclude)); -} - -__inline__ Status Region::Exclude(const GraphicsPath *path) -{ - return updateStatus(DllExports::GdipCombineRegionPath( - nativeRegion, path ? path->nativePath : NULL, - CombineModeExclude)); -} - -__inline__ Status Region::GetBounds(RectF *rect, const Graphics *graphics) const -{ - return updateStatus(DllExports::GdipGetRegionBounds(nativeRegion, - graphics ? graphics->nativeGraphics : NULL, rect)); -} - -__inline__ Status Region::GetBounds(Rect *rect, const Graphics *graphics) const -{ - return updateStatus(DllExports::GdipGetRegionBoundsI(nativeRegion, - graphics ? graphics->nativeGraphics : NULL, rect)); -} - -__inline__ Status Region::GetData(BYTE *buffer, UINT bufferSize, - UINT *sizeFilled) const -{ - return updateStatus(DllExports::GdipGetRegionData( - nativeRegion, buffer, bufferSize, sizeFilled)); -} - -__inline__ UINT Region::GetDataSize() const -{ - UINT result = 0; - updateStatus(DllExports::GdipGetRegionDataSize(nativeRegion, &result)); - return result; -} - -__inline__ HRGN Region::GetHRGN(const Graphics *graphics) const -{ - HRGN result = NULL; - updateStatus(DllExports::GdipGetRegionHRgn(nativeRegion, - graphics ? graphics->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ Status Region::GetRegionScans(const Matrix *matrix, - RectF *rects, INT *count) const -{ - return updateStatus(DllExports::GdipGetRegionScans( - nativeRegion, rects, count, - matrix ? matrix->nativeMatrix : NULL)); -} - -__inline__ Status Region::GetRegionScans(const Matrix *matrix, - Rect *rects, INT *count) const -{ - return updateStatus(DllExports::GdipGetRegionScansI( - nativeRegion, rects, count, - matrix ? matrix->nativeMatrix : NULL)); -} - -__inline__ UINT Region::GetRegionScansCount(const Matrix *matrix) const -{ - UINT result = 0; - updateStatus(DllExports::GdipGetRegionScansCount( - nativeRegion, &result, - matrix ? matrix->nativeMatrix : NULL)); - return result; -} - -__inline__ Status Region::Intersect(const RectF& rect) -{ - return updateStatus(DllExports::GdipCombineRegionRect( - nativeRegion, &rect, CombineModeIntersect)); -} - -__inline__ Status Region::Intersect(const Rect& rect) -{ - return updateStatus(DllExports::GdipCombineRegionRectI( - nativeRegion, &rect, CombineModeIntersect)); -} - -__inline__ Status Region::Intersect(const Region *region) -{ - return updateStatus(DllExports::GdipCombineRegionRegion( - nativeRegion, region ? region->nativeRegion : NULL, - CombineModeIntersect)); -} - -__inline__ Status Region::Intersect(const GraphicsPath *path) -{ - return updateStatus(DllExports::GdipCombineRegionPath( - nativeRegion, path ? path->nativePath : NULL, - CombineModeIntersect)); -} - -__inline__ BOOL Region::IsEmpty(const Graphics *graphics) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsEmptyRegion(nativeRegion, - graphics ? graphics->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ BOOL Region::IsInfinite(const Graphics *graphics) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsInfiniteRegion(nativeRegion, - graphics ? graphics->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ BOOL Region::IsVisible(REAL x, REAL y, - const Graphics *graphics) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisibleRegionPoint( - nativeRegion, x, y, - graphics ? graphics->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ BOOL Region::IsVisible(INT x, INT y, - const Graphics *graphics) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisibleRegionPointI( - nativeRegion, x, y, - graphics ? graphics->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ BOOL Region::IsVisible(const PointF& point, - const Graphics *graphics) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisibleRegionPoint( - nativeRegion, point.X, point.Y, - graphics ? graphics->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ BOOL Region::IsVisible(const Point& point, - const Graphics *graphics) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisibleRegionPointI( - nativeRegion, point.X, point.Y, - graphics ? graphics->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ BOOL Region::IsVisible(REAL x, REAL y, REAL width, REAL height, - const Graphics *graphics) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisibleRegionRect( - nativeRegion, x, y, width, height, - graphics ? graphics->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ BOOL Region::IsVisible(INT x, INT y, INT width, INT height, - const Graphics *graphics) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisibleRegionRectI( - nativeRegion, x, y, width, height, - graphics ? graphics->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ BOOL Region::IsVisible(const RectF& rect, - const Graphics *graphics) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisibleRegionRect( - nativeRegion, rect.X, rect.Y, rect.Width, rect.Height, - graphics ? graphics->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ BOOL Region::IsVisible(const Rect& rect, - const Graphics *graphics) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisibleRegionRectI( - nativeRegion, rect.X, rect.Y, rect.Width, rect.Height, - graphics ? graphics->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ Status Region::MakeEmpty() -{ - return updateStatus(DllExports::GdipSetEmpty(nativeRegion)); -} - -__inline__ Status Region::MakeInfinite() -{ - return updateStatus(DllExports::GdipSetInfinite(nativeRegion)); -} - -__inline__ Status Region::Transform(const Matrix *matrix) -{ - return updateStatus(DllExports::GdipTransformRegion( - nativeRegion, matrix ? matrix->nativeMatrix : NULL)); -} - -__inline__ Status Region::Translate(REAL dx, REAL dy) -{ - return updateStatus(DllExports::GdipTranslateRegion( - nativeRegion, dx, dy)); -} - -__inline__ Status Region::Translate(INT dx, INT dy) -{ - return updateStatus(DllExports::GdipTranslateRegionI( - nativeRegion, dx, dy)); -} - -__inline__ Status Region::Union(const RectF& rect) -{ - return updateStatus(DllExports::GdipCombineRegionRect( - nativeRegion, &rect, CombineModeUnion)); -} - -__inline__ Status Region::Union(const Rect& rect) -{ - return updateStatus(DllExports::GdipCombineRegionRectI( - nativeRegion, &rect, CombineModeUnion)); -} - -__inline__ Status Region::Union(const Region *region) -{ - return updateStatus(DllExports::GdipCombineRegionRegion( - nativeRegion, region ? region->nativeRegion : NULL, - CombineModeUnion)); -} - -__inline__ Status Region::Union(const GraphicsPath *path) -{ - return updateStatus(DllExports::GdipCombineRegionPath( - nativeRegion, path ? path->nativePath : NULL, - CombineModeUnion)); -} - -__inline__ Status Region::Xor(const RectF& rect) -{ - return updateStatus(DllExports::GdipCombineRegionRect( - nativeRegion, &rect, CombineModeXor)); -} - -__inline__ Status Region::Xor(const Rect& rect) -{ - return updateStatus(DllExports::GdipCombineRegionRectI( - nativeRegion, &rect, CombineModeXor)); -} - -__inline__ Status Region::Xor(const Region *region) -{ - return updateStatus(DllExports::GdipCombineRegionRegion( - nativeRegion, region ? region->nativeRegion : NULL, - CombineModeXor)); -} - -__inline__ Status Region::Xor(const GraphicsPath *path) -{ - return updateStatus(DllExports::GdipCombineRegionPath( - nativeRegion, path ? path->nativePath : NULL, - CombineModeXor)); -} - - -// GraphicsPath - -__inline__ BOOL GraphicsPath::IsOutlineVisible(REAL x, REAL y, const Pen *pen, - const Graphics *g) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsOutlineVisiblePathPoint( - nativePath, x, y, pen ? pen->nativePen : NULL, - g ? g->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ BOOL GraphicsPath::IsOutlineVisible(INT x, INT y, const Pen *pen, - const Graphics *g) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsOutlineVisiblePathPointI( - nativePath, x, y, pen ? pen->nativePen : NULL, - g ? g->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ BOOL GraphicsPath::IsOutlineVisible(const PointF& point, const Pen *pen, - const Graphics *g) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsOutlineVisiblePathPoint( - nativePath, point.X, point.Y, - pen ? pen->nativePen : NULL, - g ? g->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ BOOL GraphicsPath::IsOutlineVisible(const Point& point, const Pen *pen, - const Graphics *g) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsOutlineVisiblePathPointI( - nativePath, point.X, point.Y, - pen ? pen->nativePen : NULL, - g ? g->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ BOOL GraphicsPath::IsVisible(REAL x, REAL y, const Graphics *g) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisiblePathPoint( - nativePath, x, y, - g ? g->nativeGraphics : NULL, &result)); - return result; -} -__inline__ BOOL GraphicsPath::IsVisible(INT x, INT y, const Graphics *g) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisiblePathPointI( - nativePath, x, y, - g ? g->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ BOOL GraphicsPath::IsVisible(const PointF& point, - const Graphics *g) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisiblePathPoint( - nativePath, point.X, point.Y, - g ? g->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ BOOL GraphicsPath::IsVisible(const Point& point, const Graphics *g) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisiblePathPointI( - nativePath, point.X, point.Y, - g ? g->nativeGraphics : NULL, &result)); - return result; -} - - -// PathData - -__inline__ Status PathData::AllocateArrays(INT capacity) -{ - if (capacity < 0) { - return InvalidParameter; - } else if (Count < capacity) { - FreeArrays(); - - PointF *pointArray = (PointF*) - DllExports::GdipAlloc(capacity * sizeof(PointF)); - if (!pointArray) - return OutOfMemory; - - BYTE *typeArray = (BYTE*) - DllExports::GdipAlloc(capacity * sizeof(BYTE)); - if (!typeArray) { - DllExports::GdipFree(pointArray); - return OutOfMemory; - } - - Count = capacity; - Points = pointArray; - Types = typeArray; - } - return Ok; -} - -__inline__ VOID PathData::FreeArrays() -{ - if (Points) DllExports::GdipFree(Points); - if (Types) DllExports::GdipFree(Types); - Count = 0; - Points = NULL; - Types = NULL; -} - -#endif /* __GDIPLUS_IMPL_H */ diff --git a/src/gdiplus3/gdiplusinit.h b/src/gdiplus3/gdiplusinit.h deleted file mode 100644 index e9276a67..00000000 --- a/src/gdiplus3/gdiplusinit.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * gdiplusinit.h - * - * GDI+ Initialization - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_INIT_H -#define __GDIPLUS_INIT_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -typedef struct GdiplusStartupInput { - UINT32 GdiplusVersion; - DebugEventProc DebugEventCallback; - BOOL SuppressBackgroundThread; - BOOL SuppressExternalCodecs; - - #ifdef __cplusplus - GdiplusStartupInput(DebugEventProc debugEventCallback = NULL, - BOOL suppressBackgroundThread = FALSE, - BOOL suppressExternalCodecs = FALSE): - GdiplusVersion(1), - DebugEventCallback(debugEventCallback), - SuppressBackgroundThread(suppressBackgroundThread), - SuppressExternalCodecs(suppressExternalCodecs) {} - #endif /* __cplusplus */ -} GdiplusStartupInput; - -typedef GpStatus WINGDIPAPI (*NotificationHookProc)(ULONG_PTR *token); -typedef VOID WINGDIPAPI (*NotificationUnhookProc)(ULONG_PTR token); - -typedef struct GdiplusStartupOutput { - NotificationHookProc NotificationHook; - NotificationUnhookProc NotificationUnhook; - - #ifdef __cplusplus - GdiplusStartupOutput(): - NotificationHook(NULL), - NotificationUnhook(NULL) {} - #endif /* __cplusplus */ -} GdiplusStartupOutput; - -#ifdef __cplusplus -extern "C" { -#endif - -GpStatus WINGDIPAPI GdiplusStartup(ULONG_PTR*,GDIPCONST GdiplusStartupInput*,GdiplusStartupOutput*); -VOID WINGDIPAPI GdiplusShutdown(ULONG_PTR); -GpStatus WINGDIPAPI GdiplusNotificationHook(ULONG_PTR*); -VOID WINGDIPAPI GdiplusNotificationUnhook(ULONG_PTR); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* __GDIPLUS_INIT_H */ diff --git a/src/gdiplus3/gdipluslinecaps.h b/src/gdiplus3/gdipluslinecaps.h deleted file mode 100644 index 3134ede4..00000000 --- a/src/gdiplus3/gdipluslinecaps.h +++ /dev/null @@ -1,131 +0,0 @@ -/* - * gdipluslinecaps.h - * - * GDI+ AdjustableArrowCap class - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_LINECAPS_H -#define __GDIPLUS_LINECAPS_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#ifndef __cplusplus -#error "A C++ compiler is required to include gdipluslinecaps.h." -#endif - -class AdjustableArrowCap: public CustomLineCap -{ -public: - AdjustableArrowCap(REAL height, REAL width, BOOL isFilled): - CustomLineCap(NULL, Ok) - { - GpAdjustableArrowCap *nativeAdjustableArrowCap = NULL; - lastStatus = DllExports::GdipCreateAdjustableArrowCap( - height, width, isFilled, - &nativeAdjustableArrowCap); - nativeCustomLineCap = nativeAdjustableArrowCap; - } - virtual ~AdjustableArrowCap() - { - } - virtual AdjustableArrowCap* Clone() const - { - GpCustomLineCap *cloneCustomLineCap = NULL; - Status status = updateStatus(DllExports::GdipCloneCustomLineCap( - nativeCustomLineCap, &cloneCustomLineCap)); - if (status == Ok) { - AdjustableArrowCap *result = new AdjustableArrowCap( - cloneCustomLineCap, lastStatus); - if (!result) { - DllExports::GdipDeleteCustomLineCap( - cloneCustomLineCap); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } - } - - REAL GetHeight() const - { - REAL result = 0.0f; - updateStatus(DllExports::GdipGetAdjustableArrowCapHeight( - (GpAdjustableArrowCap*) nativeCustomLineCap, - &result)); - return result; - } - REAL GetMiddleInset() const - { - REAL result = 0.0f; - updateStatus(DllExports::GdipGetAdjustableArrowCapMiddleInset( - (GpAdjustableArrowCap*) nativeCustomLineCap, - &result)); - return result; - } - REAL GetWidth() const - { - REAL result = 0.0f; - updateStatus(DllExports::GdipGetAdjustableArrowCapWidth( - (GpAdjustableArrowCap*) nativeCustomLineCap, - &result)); - return result; - } - BOOL IsFilled() const - { - BOOL result = FALSE; - updateStatus(DllExports::GdipGetAdjustableArrowCapFillState( - (GpAdjustableArrowCap*) nativeCustomLineCap, - &result)); - return result; - } - Status SetFillState(BOOL isFilled) - { - return updateStatus(DllExports::GdipSetAdjustableArrowCapFillState( - (GpAdjustableArrowCap*) nativeCustomLineCap, - isFilled)); - } - Status SetHeight(REAL height) - { - return updateStatus(DllExports::GdipSetAdjustableArrowCapHeight( - (GpAdjustableArrowCap*) nativeCustomLineCap, - height)); - } - Status SetMiddleInset(REAL middleInset) - { - return updateStatus(DllExports::GdipSetAdjustableArrowCapMiddleInset( - (GpAdjustableArrowCap*) nativeCustomLineCap, - middleInset)); - } - Status SetWidth(REAL width) - { - return updateStatus(DllExports::GdipSetAdjustableArrowCapWidth( - (GpAdjustableArrowCap*) nativeCustomLineCap, - width)); - } - -private: - AdjustableArrowCap(GpCustomLineCap *customLineCap, Status status): - CustomLineCap(customLineCap, status) {} - AdjustableArrowCap(const AdjustableArrowCap&); - AdjustableArrowCap& operator=(const AdjustableArrowCap&); -}; - -#endif /* __GDIPLUS_LINECAPS_H */ diff --git a/src/gdiplus3/gdiplusmatrix.h b/src/gdiplus3/gdiplusmatrix.h deleted file mode 100644 index 7eb10649..00000000 --- a/src/gdiplus3/gdiplusmatrix.h +++ /dev/null @@ -1,240 +0,0 @@ -/* - * gdiplusmatrix.h - * - * GDI+ Matrix class - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_MATRIX_H -#define __GDIPLUS_MATRIX_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#ifndef __cplusplus -#error "A C++ compiler is required to include gdiplusmatrix.h." -#endif - -#define GDIP_MATRIX_PI \ - 3.1415926535897932384626433832795028841971693993751058209749445923078164 - -class Matrix: public GdiplusBase -{ - friend class Graphics; - friend class GraphicsPath; - friend class LinearGradientBrush; - friend class PathGradientBrush; - friend class Pen; - friend class Region; - friend class TextureBrush; - -public: - Matrix(): nativeMatrix(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipCreateMatrix(&nativeMatrix); - } - Matrix(REAL m11, REAL m12, REAL m21, REAL m22, REAL dx, REAL dy): - nativeMatrix(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipCreateMatrix2( - m11, m12, m21, m22, dx, dy, - &nativeMatrix); - } - Matrix(const RectF& rect, const PointF *dstplg): - nativeMatrix(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipCreateMatrix3( - &rect, dstplg, &nativeMatrix); - } - Matrix(const Rect& rect, const Point *dstplg): - nativeMatrix(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipCreateMatrix3I( - &rect, dstplg, &nativeMatrix); - } - ~Matrix() - { - DllExports::GdipDeleteMatrix(nativeMatrix); - } - Matrix* Clone() const - { - GpMatrix *cloneMatrix = NULL; - Status status = updateStatus(DllExports::GdipCloneMatrix( - nativeMatrix, &cloneMatrix)); - if (status == Ok) { - Matrix *result = new Matrix(cloneMatrix, lastStatus); - if (!result) { - DllExports::GdipDeleteMatrix(cloneMatrix); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } - } - - BOOL Equals(const Matrix *matrix) const - { - BOOL result; - updateStatus(DllExports::GdipIsMatrixEqual( - nativeMatrix, - matrix ? matrix->nativeMatrix : NULL, &result)); - return result; - } - Status GetElements(REAL *m) const - { - return updateStatus(DllExports::GdipGetMatrixElements( - nativeMatrix, m)); - } - Status GetLastStatus() const - { - Status result = lastStatus; - lastStatus = Ok; - return result; - } - Status Invert() - { - return updateStatus(DllExports::GdipInvertMatrix(nativeMatrix)); - } - BOOL IsIdentity() const - { - BOOL result; - updateStatus(DllExports::GdipIsMatrixIdentity( - nativeMatrix, &result)); - return result; - } - BOOL IsInvertible() const - { - BOOL result; - updateStatus(DllExports::GdipIsMatrixInvertible( - nativeMatrix, &result)); - return result; - } - Status Multiply(const Matrix *matrix, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipMultiplyMatrix( - nativeMatrix, - matrix ? matrix->nativeMatrix : NULL, order)); - } - REAL OffsetX() const - { - REAL m[6]; - updateStatus(DllExports::GdipGetMatrixElements(nativeMatrix, m)); - return m[4]; - } - REAL OffsetY() const - { - REAL m[6]; - updateStatus(DllExports::GdipGetMatrixElements(nativeMatrix, m)); - return m[5]; - } - Status Reset() - { - return updateStatus(DllExports::GdipSetMatrixElements( - nativeMatrix, - 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f)); - } - Status Rotate(REAL angle, MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipRotateMatrix( - nativeMatrix, angle, order)); - } - Status RotateAt(REAL angle, const PointF& center, - MatrixOrder order = MatrixOrderPrepend) - { - REAL angleRadian = angle * GDIP_MATRIX_PI / 180.0f; - REAL cosAngle = ::cos(angleRadian); - REAL sinAngle = ::sin(angleRadian); - REAL x = center.X; - REAL y = center.Y; - - Matrix matrix2(cosAngle, sinAngle, -sinAngle, cosAngle, - x * (1.0f-cosAngle) + y * sinAngle, - -x * sinAngle + y * (1.0f-cosAngle)); - Status status = matrix2.GetLastStatus(); - if (status == Ok) { - return Multiply(&matrix2, order); - } else { - return lastStatus = status; - } - } - Status Scale(REAL scaleX, REAL scaleY, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipScaleMatrix( - nativeMatrix, scaleX, scaleY, order)); - } - Status SetElements(REAL m11, REAL m12, REAL m21, REAL m22, - REAL dx, REAL dy) - { - return updateStatus(DllExports::GdipSetMatrixElements( - nativeMatrix, m11, m12, m21, m22, dx, dy)); - } - Status Shear(REAL shearX, REAL shearY, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipShearMatrix( - nativeMatrix, shearX, shearY, order)); - } - Status TransformPoints(PointF *pts, INT count = 1) const - { - return updateStatus(DllExports::GdipTransformMatrixPoints( - nativeMatrix, pts, count)); - } - Status TransformPoints(Point *pts, INT count = 1) const - { - return updateStatus(DllExports::GdipTransformMatrixPointsI( - nativeMatrix, pts, count)); - } - Status TransformVectors(PointF *pts, INT count = 1) const - { - return updateStatus(DllExports::GdipVectorTransformMatrixPoints( - nativeMatrix, pts, count)); - } - Status TransformVectors(Point *pts, INT count = 1) const - { - return updateStatus(DllExports::GdipVectorTransformMatrixPointsI( - nativeMatrix, pts, count)); - } - Status Translate(REAL offsetX, REAL offsetY, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipTranslateMatrix( - nativeMatrix, offsetX, offsetY, order)); - } - -private: - Matrix(GpMatrix *matrix, Status status): - nativeMatrix(matrix), lastStatus(status) {} - Matrix(const Matrix&); - Matrix& operator=(const Matrix&); - - Status updateStatus(Status newStatus) const - { - if (newStatus != Ok) lastStatus = newStatus; - return newStatus; - } - - GpMatrix *nativeMatrix; - mutable Status lastStatus; -}; - -#undef GDIP_MATRIX_PI - -#endif /* __GDIPLUS_MATRIX_H */ diff --git a/src/gdiplus3/gdiplusmem.h b/src/gdiplus3/gdiplusmem.h deleted file mode 100644 index 51bb420c..00000000 --- a/src/gdiplus3/gdiplusmem.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * gdiplusmem.h - * - * GDI+ memory allocation - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_MEM_H -#define __GDIPLUS_MEM_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#ifdef __cplusplus -namespace DllExports { -extern "C" { -#endif - -VOID* WINGDIPAPI GdipAlloc(size_t); -VOID WINGDIPAPI GdipFree(VOID*); - -#ifdef __cplusplus -} /* extern "C" */ -} /* namespace DllExports */ -#endif - -#endif /* __GDIPLUS_MEM_H */ diff --git a/src/gdiplus3/gdiplusmetafile.h b/src/gdiplus3/gdiplusmetafile.h deleted file mode 100644 index f19fb14e..00000000 --- a/src/gdiplus3/gdiplusmetafile.h +++ /dev/null @@ -1,305 +0,0 @@ -/* - * gdiplusmetafile.h - * - * GDI+ Metafile class - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_METAFILE_H -#define __GDIPLUS_METAFILE_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#ifndef __cplusplus -#error "A C++ compiler is required to include gdiplusmetafile.h." -#endif - -class Metafile: public Image -{ -public: - static UINT EmfToWmfBits(HENHMETAFILE hEmf, - UINT cbData16, LPBYTE pData16, - INT iMapMode = MM_ANISOTROPIC, - EmfToWmfBitsFlags eFlags = EmfToWmfBitsFlagsDefault) - { - return DllExports::GdipEmfToWmfBits(hEmf, - cbData16, pData16, iMapMode, eFlags); - } - static Status GetMetafileHeader(const WCHAR *filename, - MetafileHeader *header) - { - return DllExports::GdipGetMetafileHeaderFromFile( - filename, header); - } - static Status GetMetafileHeader(IStream *stream, MetafileHeader *header) - { - return DllExports::GdipGetMetafileHeaderFromStream( - stream, header); - } - ////TODO: Metafile::GetMetafileHeader - //static Status GetMetafileHeader(HMETAFILE hWmf, - // const WmfPlaceableFileHeader *wmfPlaceableFileHeader, - // MetafileHeader *header) - //{ - // // WTF: No flat API to do this. - // return NotImplemented; - //} - static Status GetMetafileHeader(HENHMETAFILE hEmf, - MetafileHeader *header) - { - return DllExports::GdipGetMetafileHeaderFromEmf(hEmf, header); - } - - Metafile(HMETAFILE hWmf, - const WmfPlaceableFileHeader *wmfPlaceableFileHeader, - BOOL deleteWmf = FALSE): Image(NULL, Ok) - { - GpMetafile *nativeMetafile = NULL; - lastStatus = DllExports::GdipCreateMetafileFromWmf( - hWmf, deleteWmf, wmfPlaceableFileHeader, - &nativeMetafile); - nativeImage = nativeMetafile; - } - Metafile(HENHMETAFILE hEmf, BOOL deleteEmf = FALSE): Image(NULL, Ok) - { - GpMetafile *nativeMetafile = NULL; - lastStatus = DllExports::GdipCreateMetafileFromEmf( - hEmf, deleteEmf, &nativeMetafile); - nativeImage = nativeMetafile; - } - Metafile(const WCHAR *filename): Image(NULL, Ok) - { - GpMetafile *nativeMetafile = NULL; - lastStatus = DllExports::GdipCreateMetafileFromFile( - filename, &nativeMetafile); - nativeImage = nativeMetafile; - } - Metafile(const WCHAR *filename, - const WmfPlaceableFileHeader *wmfPlaceableFileHeader): - Image(NULL, Ok) - { - GpMetafile *nativeMetafile = NULL; - lastStatus = DllExports::GdipCreateMetafileFromWmfFile( - filename, wmfPlaceableFileHeader, - &nativeMetafile); - nativeImage = nativeMetafile; - } - Metafile(IStream *stream): Image(NULL, Ok) - { - GpMetafile *nativeMetafile = NULL; - lastStatus = DllExports::GdipCreateMetafileFromStream( - stream, &nativeMetafile); - nativeImage = nativeMetafile; - } - Metafile(HDC referenceHdc, EmfType type = EmfTypeEmfPlusDual, - const WCHAR *description = NULL): Image(NULL, Ok) - { - GpMetafile *nativeMetafile = NULL; - lastStatus = DllExports::GdipRecordMetafile( - referenceHdc, type, NULL, MetafileFrameUnitGdi, - description, &nativeMetafile); - nativeImage = nativeMetafile; - } - Metafile(HDC referenceHdc, const RectF& frameRect, - MetafileFrameUnit frameUnit = MetafileFrameUnitGdi, - EmfType type = EmfTypeEmfPlusDual, - const WCHAR *description = NULL): Image(NULL, Ok) - { - GpMetafile *nativeMetafile = NULL; - lastStatus = DllExports::GdipRecordMetafile( - referenceHdc, type, &frameRect, frameUnit, - description, &nativeMetafile); - nativeImage = nativeMetafile; - } - Metafile(HDC referenceHdc, const Rect& frameRect, - MetafileFrameUnit frameUnit = MetafileFrameUnitGdi, - EmfType type = EmfTypeEmfPlusDual, - const WCHAR *description = NULL): Image(NULL, Ok) - { - GpMetafile *nativeMetafile = NULL; - lastStatus = DllExports::GdipRecordMetafileI( - referenceHdc, type, &frameRect, frameUnit, - description, &nativeMetafile); - nativeImage = nativeMetafile; - } - Metafile(const WCHAR *filename, HDC referenceHdc, - EmfType type = EmfTypeEmfPlusDual, - const WCHAR *description = NULL): Image(NULL, Ok) - { - GpMetafile *nativeMetafile = NULL; - lastStatus = DllExports::GdipRecordMetafileFileName( - filename, referenceHdc, type, NULL, - MetafileFrameUnitGdi, description, - &nativeMetafile); - nativeImage = nativeMetafile; - } - Metafile(const WCHAR *filename, HDC referenceHdc, - const RectF& frameRect, - MetafileFrameUnit frameUnit = MetafileFrameUnitGdi, - EmfType type = EmfTypeEmfPlusDual, - const WCHAR *description = NULL): Image(NULL, Ok) - { - GpMetafile *nativeMetafile = NULL; - lastStatus = DllExports::GdipRecordMetafileFileName( - filename, referenceHdc, type, &frameRect, - frameUnit, description, &nativeMetafile); - nativeImage = nativeMetafile; - } - Metafile(const WCHAR *filename, HDC referenceHdc, - const Rect& frameRect, - MetafileFrameUnit frameUnit = MetafileFrameUnitGdi, - EmfType type = EmfTypeEmfPlusDual, - const WCHAR *description = NULL): Image(NULL, Ok) - { - GpMetafile *nativeMetafile = NULL; - lastStatus = DllExports::GdipRecordMetafileFileNameI( - filename, referenceHdc, type, &frameRect, - frameUnit, description, &nativeMetafile); - nativeImage = nativeMetafile; - } - Metafile(IStream *stream, HDC referenceHdc, - EmfType type = EmfTypeEmfPlusDual, - const WCHAR *description = NULL): Image(NULL, Ok) - { - GpMetafile *nativeMetafile = NULL; - lastStatus = DllExports::GdipRecordMetafileStream( - stream, referenceHdc, type, NULL, - MetafileFrameUnitGdi, description, - &nativeMetafile); - nativeImage = nativeMetafile; - } - Metafile(IStream *stream, HDC referenceHdc, const RectF& frameRect, - MetafileFrameUnit frameUnit = MetafileFrameUnitGdi, - EmfType type = EmfTypeEmfPlusDual, - const WCHAR *description = NULL): Image(NULL, Ok) - { - GpMetafile *nativeMetafile = NULL; - lastStatus = DllExports::GdipRecordMetafileStream( - stream, referenceHdc, type, &frameRect, - frameUnit, description, &nativeMetafile); - nativeImage = nativeMetafile; - } - Metafile(IStream *stream, HDC referenceHdc, const Rect& frameRect, - MetafileFrameUnit frameUnit = MetafileFrameUnitGdi, - EmfType type = EmfTypeEmfPlusDual, - const WCHAR *description = NULL): Image(NULL, Ok) - { - GpMetafile *nativeMetafile = NULL; - lastStatus = DllExports::GdipRecordMetafileStreamI( - stream, referenceHdc, type, &frameRect, - frameUnit, description, &nativeMetafile); - nativeImage = nativeMetafile; - } - virtual ~Metafile() - { - } - virtual Metafile* Clone() const - { - GpImage *cloneImage = NULL; - Status status = updateStatus(DllExports::GdipCloneImage( - nativeImage, &cloneImage)); - if (status == Ok) { - Metafile *result = new Metafile(cloneImage, lastStatus); - if (!result) { - DllExports::GdipDisposeImage(cloneImage); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } - } - - ////TODO: [GDI+ 1.1] Metafile::ConvertToEmfPlus - //Status ConvertToEmfPlus(const Graphics *refGraphics, - // BOOL *conversionSuccess = NULL, - // EmfType emfType = EmfTypeEmfPlusOnly, - // const WCHAR *description = NULL) - //{ - // // FIXME: can't test GdipConvertToEmfPlus because it isn't exported in 1.0 - // return updateStatus(DllExports::GdipConvertToEmfPlus( - // refGraphics ? refGraphics->nativeGraphics : NULL, - // (GpMetafile*) nativeImage, - // conversionSuccess, emfType, description, ???)); - //} - ////TODO: [GDI+ 1.1] Metafile::ConvertToEmfPlus - //Status ConvertToEmfPlus(const Graphics *refGraphics, - // const WCHAR *filename, - // BOOL *conversionSuccess = NULL, - // EmfType emfType = EmfTypeEmfPlusOnly, - // const WCHAR *description = NULL) - //{ - // // FIXME: can't test GdipConvertToEmfPlusToFile because it isn't exported in 1.0 - // return updateStatus(DllExports::GdipConvertToEmfPlusToFile( - // refGraphics ? refGraphics->nativeGraphics : NULL, - // (GpMetafile*) nativeImage, conversionSuccess, - // filename, emfType, description, ???)); - //} - ////TODO: [GDI+ 1.1] Metafile::ConvertToEmfPlus - //Status ConvertToEmfPlus(const Graphics *refGraphics, - // IStream *stream, - // BOOL *conversionSuccess = NULL, - // EmfType emfType = EmfTypeEmfPlusOnly, - // const WCHAR *description = NULL) - //{ - // // FIXME: can't test GdipConvertToEmfPlusToStream because it isn't exported in 1.0 - // return updateStatus(DllExports::GdipConvertToEmfPlusToStream( - // refGraphics ? refGraphics->nativeGraphics : NULL, - // (GpMetafile*) nativeImage, conversionSuccess, - // stream, emfType, description, ???)); - //} - UINT GetDownLevelRasterizationLimit() const - { - UINT result = 0; - updateStatus(DllExports::GdipGetMetafileDownLevelRasterizationLimit( - (GpMetafile*) nativeImage, &result)); - return result; - } - HENHMETAFILE GetHENHMETAFILE() - { - HENHMETAFILE result = NULL; - updateStatus(DllExports::GdipGetHemfFromMetafile( - (GpMetafile*) nativeImage, &result)); - return result; - } - Status GetMetafileHeader(MetafileHeader *header) const - { - return updateStatus(DllExports::GdipGetMetafileHeaderFromMetafile( - (GpMetafile*) nativeImage, header)); - } - Status PlayRecord(EmfPlusRecordType recordType, UINT flags, - UINT dataSize, const BYTE *data) const - { - return updateStatus(DllExports::GdipPlayMetafileRecord( - (GpMetafile*) nativeImage, - recordType, flags, dataSize, data)); - } - Status SetDownLevelRasterizationLimit(UINT limitDpi) - { - return updateStatus(DllExports::GdipSetMetafileDownLevelRasterizationLimit( - (GpMetafile*) nativeImage, limitDpi)); - } - -private: - Metafile(GpImage *image, Status status): Image(image, status) {} - Metafile(const Metafile&); - Metafile& operator=(const Metafile&); -}; - -#endif /* __GDIPLUS_METAFILE_H */ diff --git a/src/gdiplus3/gdiplusmetaheader.h b/src/gdiplus3/gdiplusmetaheader.h deleted file mode 100644 index 499d7a98..00000000 --- a/src/gdiplus3/gdiplusmetaheader.h +++ /dev/null @@ -1,193 +0,0 @@ -/* - * gdiplusmetaheader.h - * - * GDI+ metafile header structure - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_METAHEADER_H -#define __GDIPLUS_METAHEADER_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - - -/* - * FIXME: is 1 the correct value for GDIP_EMFPLUSFLAGS_DISPLAY? This number - * has been determined by calling Metafile::GetMetafileHeader() on a EMF+ - * metafile which was recorded on a display device context (SampleMetafile.emf). - */ -#ifdef __cplusplus -const UINT GDIP_EMFPLUSFLAGS_DISPLAY = 1; -#else -#define GDIP_EMFPLUSFLAGS_DISPLAY ((UINT) 1) -#endif - -typedef struct tagENHMETAHEADER3 { - DWORD iType; - DWORD nSize; - RECTL rclBounds; - RECTL rclFrame; - DWORD dSignature; - DWORD nVersion; - DWORD nBytes; - DWORD nRecords; - WORD nHandles; - WORD sReserved; - DWORD nDescription; - DWORD offDescription; - DWORD nPalEntries; - SIZEL szlDevice; - SIZEL szlMillimeters; -} ENHMETAHEADER3,*LPENHMETAHEADER3; - -typedef struct PWMFRect16 { - INT16 Left; - INT16 Top; - INT16 Right; - INT16 Bottom; -} PWMFRect16; - -typedef struct WmfPlaceableFileHeader { - UINT32 Key; - INT16 Hmf; - PWMFRect16 BoundingBox; - INT16 Inch; - UINT32 Reserved; - INT16 Checksum; -} WmfPlaceableFileHeader; - -typedef struct MetafileHeader { - MetafileType Type; - UINT Size; - UINT Version; - UINT EmfPlusFlags; - REAL DpiX; - REAL DpiY; - INT X; - INT Y; - INT Width; - INT Height; - __extension__ union { - METAHEADER WmfHeader; - ENHMETAHEADER3 EmfHeader; - }; - INT EmfPlusHeaderSize; - INT LogicalDpiX; - INT LogicalDpiY; - - #ifdef __cplusplus - public: - void GetBounds(Rect *rect) const - { - if (rect) - { - rect->X = X; - rect->Y = Y; - rect->Width = Width; - rect->Height = Height; - } - } - REAL GetDpiX() const - { - return DpiX; - } - REAL GetDpiY() const - { - return DpiY; - } - const ENHMETAHEADER3* GetEmfHeader() const - { - if (Type == MetafileTypeEmf - || Type == MetafileTypeEmfPlusOnly - || Type == MetafileTypeEmfPlusDual) - { - return &EmfHeader; - } - else - { - return NULL; - } - } - UINT GetEmfPlusFlags() const - { - return EmfPlusFlags; - } - UINT GetMetafileSize() const - { - return Size; - } - MetafileType GetType() const - { - return Type; - } - UINT GetVersion() const - { - return Version; - } - const METAHEADER* GetWmfHeader() const - { - if (Type == MetafileTypeWmf || Type == MetafileTypeWmfPlaceable) - { - return &WmfHeader; - } - else - { - return NULL; - } - } - BOOL IsDisplay() const - { - return EmfPlusFlags == GDIP_EMFPLUSFLAGS_DISPLAY; - } - BOOL IsEmf() const - { - return Type == MetafileTypeEmf; - } - BOOL IsEmfOrEmfPlus() const - { - return Type == MetafileTypeEmf - || Type == MetafileTypeEmfPlusOnly - || Type == MetafileTypeEmfPlusDual; - } - BOOL IsEmfPlus() const - { - return Type == MetafileTypeEmfPlusOnly - || Type == MetafileTypeEmfPlusDual; - } - BOOL IsEmfPlusDual() const - { - return Type == MetafileTypeEmfPlusDual; - } - BOOL IsEmfPlusOnly() const - { - return Type == MetafileTypeEmfPlusOnly; - } - BOOL IsWmf() const - { - return Type == MetafileTypeWmf - || Type == MetafileTypeWmfPlaceable; - } - BOOL IsWmfPlaceable() const - { - return Type == MetafileTypeWmfPlaceable; - } - #endif -} MetafileHeader; - -#endif /* __GDIPLUS_METAHEADER_H */ diff --git a/src/gdiplus3/gdipluspath.h b/src/gdiplus3/gdipluspath.h deleted file mode 100644 index 393d917e..00000000 --- a/src/gdiplus3/gdipluspath.h +++ /dev/null @@ -1,964 +0,0 @@ -/* - * gdipluspath.h - * - * GDI+ GraphicsPath class - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_PATH_H -#define __GDIPLUS_PATH_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#ifndef __cplusplus -#error "A C++ compiler is required to include gdipluspath.h." -#endif - -// Note that some methods of GraphicsPath are implemented in gdiplusimpl.h. -// This avoids a cyclic dependency on Graphics and Pen. - -class GraphicsPath: public GdiplusBase -{ - friend class CustomLineCap; - friend class Graphics; - friend class GraphicsPathIterator; - friend class PathGradientBrush; - friend class Region; - -public: - GraphicsPath(FillMode fillMode = FillModeAlternate): - nativePath(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipCreatePath(fillMode, &nativePath); - } - GraphicsPath(const PointF *points, const BYTE *types, INT count, - FillMode fillMode = FillModeAlternate): - nativePath(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipCreatePath2( - points, types, count, fillMode, &nativePath); - } - GraphicsPath(const Point *points, const BYTE *types, INT count, - FillMode fillMode = FillModeAlternate): - nativePath(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipCreatePath2I( - points, types, count, fillMode, &nativePath); - } - ~GraphicsPath() - { - DllExports::GdipDeletePath(nativePath); - } - GraphicsPath* Clone() const - { - GpPath *clonePath = NULL; - Status status = updateStatus(DllExports::GdipClonePath( - nativePath, &clonePath)); - if (status == Ok) { - GraphicsPath *result = new GraphicsPath(clonePath, lastStatus); - if (!result) { - DllExports::GdipDeletePath(clonePath); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } - } - - Status AddArc(REAL x, REAL y, REAL width, REAL height, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipAddPathArc(nativePath, - x, y, width, height, startAngle, sweepAngle)); - } - Status AddArc(INT x, INT y, INT width, INT height, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipAddPathArcI(nativePath, - x, y, width, height, startAngle, sweepAngle)); - } - Status AddArc(const RectF& rect, REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipAddPathArc(nativePath, - rect.X, rect.Y, rect.Width, rect.Height, - startAngle, sweepAngle)); - } - Status AddArc(const Rect& rect, REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipAddPathArcI(nativePath, - rect.X, rect.Y, rect.Width, rect.Height, - startAngle, sweepAngle)); - } - Status AddBezier(REAL x1, REAL y1, REAL x2, REAL y2, - REAL x3, REAL y3, REAL x4, REAL y4) - { - return updateStatus(DllExports::GdipAddPathBezier(nativePath, - x1, y1, x2, y2, x3, y3, x4, y4)); - } - Status AddBezier(INT x1, INT y1, INT x2, INT y2, - INT x3, INT y3, INT x4, INT y4) - { - return updateStatus(DllExports::GdipAddPathBezierI(nativePath, - x1, y1, x2, y2, x3, y3, x4, y4)); - } - Status AddBezier(const PointF& pt1, const PointF& pt2, - const PointF& pt3, const PointF& pt4) - { - return updateStatus(DllExports::GdipAddPathBezier(nativePath, - pt1.X, pt1.Y, pt2.X, pt2.Y, - pt3.X, pt3.Y, pt4.X, pt4.Y)); - } - Status AddBezier(const Point& pt1, const Point& pt2, - const Point& pt3, const Point& pt4) - { - return updateStatus(DllExports::GdipAddPathBezierI(nativePath, - pt1.X, pt1.Y, pt2.X, pt2.Y, - pt3.X, pt3.Y, pt4.X, pt4.Y)); - } - Status AddBeziers(const PointF *points, INT count) - { - return updateStatus(DllExports::GdipAddPathBeziers( - nativePath, points, count)); - } - Status AddBeziers(const Point *points, INT count) - { - return updateStatus(DllExports::GdipAddPathBeziersI( - nativePath, points, count)); - } - Status AddClosedCurve(const PointF *points, INT count) - { - return updateStatus(DllExports::GdipAddPathClosedCurve( - nativePath, points, count)); - } - Status AddClosedCurve(const Point *points, INT count) - { - return updateStatus(DllExports::GdipAddPathClosedCurveI( - nativePath, points, count)); - } - Status AddClosedCurve(const PointF *points, INT count, REAL tension) - { - return updateStatus(DllExports::GdipAddPathClosedCurve2( - nativePath, points, count, tension)); - } - Status AddClosedCurve(const Point *points, INT count, REAL tension) - { - return updateStatus(DllExports::GdipAddPathClosedCurve2I( - nativePath, points, count, tension)); - } - Status AddCurve(const PointF *points, INT count) - { - return updateStatus(DllExports::GdipAddPathCurve( - nativePath, points, count)); - } - Status AddCurve(const Point *points, INT count) - { - return updateStatus(DllExports::GdipAddPathCurveI( - nativePath, points, count)); - } - Status AddCurve(const PointF *points, INT count, REAL tension) - { - return updateStatus(DllExports::GdipAddPathCurve2( - nativePath, points, count, tension)); - } - Status AddCurve(const Point *points, INT count, REAL tension) - { - return updateStatus(DllExports::GdipAddPathCurve2I( - nativePath, points, count, tension)); - } - Status AddCurve(const PointF *points, INT count, INT offset, - INT numberOfSegments, REAL tension) - { - return updateStatus(DllExports::GdipAddPathCurve3( - nativePath, points, count, - offset, numberOfSegments, tension)); - } - Status AddCurve(const Point *points, INT count, INT offset, - INT numberOfSegments, REAL tension) - { - return updateStatus(DllExports::GdipAddPathCurve3I( - nativePath, points, count, - offset, numberOfSegments, tension)); - } - Status AddEllipse(REAL x, REAL y, REAL width, REAL height) - { - return updateStatus(DllExports::GdipAddPathEllipse(nativePath, - x, y, width, height)); - } - Status AddEllipse(INT x, INT y, INT width, INT height) - { - return updateStatus(DllExports::GdipAddPathEllipseI(nativePath, - x, y, width, height)); - } - Status AddEllipse(const RectF& rect) - { - return updateStatus(DllExports::GdipAddPathEllipse(nativePath, - rect.X, rect.Y, rect.Width, rect.Height)); - } - Status AddEllipse(const Rect& rect) - { - return updateStatus(DllExports::GdipAddPathEllipseI(nativePath, - rect.X, rect.Y, rect.Width, rect.Height)); - } - Status AddLine(REAL x1, REAL y1, REAL x2, REAL y2) - { - return updateStatus(DllExports::GdipAddPathLine(nativePath, - x1, y1, x2, y2)); - } - Status AddLine(INT x1, INT y1, INT x2, INT y2) - { - return updateStatus(DllExports::GdipAddPathLineI(nativePath, - x1, y1, x2, y2)); - } - Status AddLine(const PointF& pt1, const PointF& pt2) - { - return updateStatus(DllExports::GdipAddPathLine(nativePath, - pt1.X, pt1.Y, pt2.X, pt2.Y)); - } - Status AddLine(const Point& pt1, const Point& pt2) - { - return updateStatus(DllExports::GdipAddPathLineI(nativePath, - pt1.X, pt1.Y, pt2.X, pt2.Y)); - } - Status AddLines(const PointF *points, INT count) - { - return updateStatus(DllExports::GdipAddPathLine2(nativePath, - points, count)); - } - Status AddLines(const Point *points, INT count) - { - return updateStatus(DllExports::GdipAddPathLine2I(nativePath, - points, count)); - } - Status AddPath(const GraphicsPath *addingPath, BOOL connect) - { - return updateStatus(DllExports::GdipAddPathPath(nativePath, - addingPath ? addingPath->nativePath : NULL, - connect)); - } - Status AddPie(REAL x, REAL y, REAL width, REAL height, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipAddPathPie(nativePath, - x, y, width, height, startAngle, sweepAngle)); - } - Status AddPie(INT x, INT y, INT width, INT height, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipAddPathPieI(nativePath, - x, y, width, height, startAngle, sweepAngle)); - } - Status AddPie(const RectF& rect, REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipAddPathPie(nativePath, - rect.X, rect.Y, rect.Width, rect.Height, - startAngle, sweepAngle)); - } - Status AddPie(const Rect& rect, REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipAddPathPieI(nativePath, - rect.X, rect.Y, rect.Width, rect.Height, - startAngle, sweepAngle)); - } - Status AddPolygon(const PointF *points, INT count) - { - return updateStatus(DllExports::GdipAddPathPolygon(nativePath, - points, count)); - } - Status AddPolygon(const Point *points, INT count) - { - return updateStatus(DllExports::GdipAddPathPolygonI(nativePath, - points, count)); - } - Status AddRectangle(const RectF& rect) - { - return updateStatus(DllExports::GdipAddPathRectangle(nativePath, - rect.X, rect.Y, rect.Width, rect.Height)); - } - Status AddRectangle(const Rect& rect) - { - return updateStatus(DllExports::GdipAddPathRectangleI( - nativePath, - rect.X, rect.Y, rect.Width, rect.Height)); - } - Status AddRectangles(const RectF *rects, INT count) - { - return updateStatus(DllExports::GdipAddPathRectangles( - nativePath, rects, count)); - } - Status AddRectangles(const Rect *rects, INT count) - { - return updateStatus(DllExports::GdipAddPathRectanglesI( - nativePath, rects, count)); - } - Status AddString(const WCHAR *string, INT length, - const FontFamily *family, INT style, REAL emSize, - const PointF& origin, const StringFormat *format) - { - RectF layoutRect(origin, SizeF(0.0f, 0.0f)); - return updateStatus(DllExports::GdipAddPathString(nativePath, - string, length, - family ? family->nativeFontFamily : NULL, - style, emSize, &layoutRect, - format ? format->nativeStringFormat : NULL)); - } - Status AddString(const WCHAR *string, INT length, - const FontFamily *family, INT style, REAL emSize, - const Point& origin, const StringFormat *format) - { - Rect layoutRect(origin, Size(0, 0)); - return updateStatus(DllExports::GdipAddPathStringI(nativePath, - string, length, - family ? family->nativeFontFamily : NULL, - style, emSize, &layoutRect, - format ? format->nativeStringFormat : NULL)); - } - Status AddString(const WCHAR *string, INT length, - const FontFamily *family, INT style, REAL emSize, - const RectF& layoutRect, const StringFormat *format) - { - return updateStatus(DllExports::GdipAddPathString(nativePath, - string, length, - family ? family->nativeFontFamily : NULL, - style, emSize, &layoutRect, - format ? format->nativeStringFormat : NULL)); - } - Status AddString(const WCHAR *string, INT length, - const FontFamily *family, INT style, REAL emSize, - const Rect& layoutRect, const StringFormat *format) - { - return updateStatus(DllExports::GdipAddPathStringI(nativePath, - string, length, - family ? family->nativeFontFamily : NULL, - style, emSize, &layoutRect, - format ? format->nativeStringFormat : NULL)); - } - Status ClearMarkers() - { - return updateStatus(DllExports::GdipClearPathMarkers( - nativePath)); - } - Status CloseAllFigures() - { - return updateStatus(DllExports::GdipClosePathFigures( - nativePath)); - } - Status CloseFigure() - { - return updateStatus(DllExports::GdipClosePathFigure( - nativePath)); - } - Status Flatten(const Matrix *matrix = NULL, - REAL flatness = FlatnessDefault) - { - return updateStatus(DllExports::GdipFlattenPath(nativePath, - matrix ? matrix->nativeMatrix : NULL, - flatness)); - } - Status GetBounds(RectF *bounds, const Matrix *matrix = NULL, - const Pen *pen = NULL) const - { - return updateStatus(DllExports::GdipGetPathWorldBounds( - nativePath, bounds, - matrix ? matrix->nativeMatrix : NULL, - pen ? pen->nativePen : NULL)); - } - Status GetBounds(Rect *bounds, const Matrix *matrix = NULL, - const Pen *pen = NULL) const - { - return updateStatus(DllExports::GdipGetPathWorldBoundsI( - nativePath, bounds, - matrix ? matrix->nativeMatrix : NULL, - pen ? pen->nativePen : NULL)); - } - FillMode GetFillMode() const - { - FillMode result = FillModeAlternate; - updateStatus(DllExports::GdipGetPathFillMode(nativePath, - &result)); - return result; - } - Status GetLastPoint(PointF *lastPoint) const - { - return updateStatus(DllExports::GdipGetPathLastPoint( - nativePath, lastPoint)); - } - Status GetLastStatus() const - { - Status result = lastStatus; - lastStatus = Ok; - return result; - } - Status GetPathData(PathData *pathData) const - { - if (!pathData) return lastStatus = InvalidParameter; - - Status status; - INT count; - - status = updateStatus(DllExports::GdipGetPointCount( - nativePath, &count)); - if (status != Ok) return status; - - status = updateStatus(pathData->AllocateArrays(count)); - if (status != Ok) return status; - - return updateStatus(DllExports::GdipGetPathData( - nativePath, (GpPathData*) pathData)); - } - Status GetPathPoints(PointF *points, INT count) const - { - return updateStatus(DllExports::GdipGetPathPoints(nativePath, - points, count)); - } - Status GetPathPoints(Point *points, INT count) const - { - return updateStatus(DllExports::GdipGetPathPointsI(nativePath, - points, count)); - } - Status GetPathTypes(BYTE *types, INT count) const - { - return updateStatus(DllExports::GdipGetPathTypes(nativePath, - types, count)); - } - INT GetPointCount() const - { - INT result = 0; - updateStatus(DllExports::GdipGetPointCount(nativePath, - &result)); - return result; - } - BOOL IsOutlineVisible(REAL x, REAL y, const Pen *pen, - const Graphics *g = NULL) const; - BOOL IsOutlineVisible(INT x, INT y, const Pen *pen, - const Graphics *g = NULL) const; - BOOL IsOutlineVisible(const PointF& point, const Pen *pen, - const Graphics *g = NULL) const; - BOOL IsOutlineVisible(const Point& point, const Pen *pen, - const Graphics *g = NULL) const; - BOOL IsVisible(REAL x, REAL y, const Graphics *g = NULL) const; - BOOL IsVisible(INT x, INT y, const Graphics *g = NULL) const; - BOOL IsVisible(const PointF& point, const Graphics *g = NULL) const; - BOOL IsVisible(const Point& point, const Graphics *g = NULL) const; - Status Outline(const Matrix *matrix = NULL, - REAL flatness = FlatnessDefault) - { - return updateStatus(DllExports::GdipWindingModeOutline( - nativePath, - matrix ? matrix->nativeMatrix : NULL, - flatness)); - } - Status Reset() - { - return updateStatus(DllExports::GdipResetPath(nativePath)); - } - Status Reverse() - { - return updateStatus(DllExports::GdipReversePath(nativePath)); - } - Status SetFillMode(FillMode fillMode) - { - return updateStatus(DllExports::GdipSetPathFillMode( - nativePath, fillMode)); - } - Status SetMarker() - { - return updateStatus(DllExports::GdipSetPathMarker(nativePath)); - } - Status StartFigure() - { - return updateStatus(DllExports::GdipStartPathFigure( - nativePath)); - } - Status Transform(const Matrix *matrix) - { - return updateStatus(DllExports::GdipTransformPath( - nativePath, - matrix ? matrix->nativeMatrix : NULL)); - } - Status Warp(const PointF *destPoints, INT count, const RectF& srcRect, - const Matrix *matrix = NULL, - WarpMode warpMode = WarpModePerspective, - REAL flatness = FlatnessDefault) - { - return updateStatus(DllExports::GdipWarpPath(nativePath, - matrix ? matrix->nativeMatrix : NULL, - destPoints, count, - srcRect.X, srcRect.Y, - srcRect.Width, srcRect.Height, - warpMode, flatness)); - } - Status Widen(const Pen *pen, const Matrix *matrix = NULL, - REAL flatness = FlatnessDefault) - { - return updateStatus(DllExports::GdipWidenPath(nativePath, - pen ? pen->nativePen : NULL, - matrix ? matrix->nativeMatrix : NULL, - flatness)); - } - -private: - GraphicsPath(GpPath *path, Status status): - nativePath(path), lastStatus(status) {} - GraphicsPath(const GraphicsPath&); - GraphicsPath& operator=(const GraphicsPath&); - - Status updateStatus(Status newStatus) const - { - if (newStatus != Ok) lastStatus = newStatus; - return newStatus; - } - - GpPath *nativePath; - mutable Status lastStatus; -}; - -class GraphicsPathIterator: public GdiplusBase -{ -public: - GraphicsPathIterator(GraphicsPath *path): - nativePathIterator(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipCreatePathIter( - &nativePathIterator, - path ? path->nativePath : NULL); - } - ~GraphicsPathIterator() - { - DllExports::GdipDeletePathIter(nativePathIterator); - } - - INT CopyData(PointF *points, BYTE *types, INT startIndex, INT endIndex) - { - INT result = 0; - updateStatus(DllExports::GdipPathIterCopyData( - nativePathIterator, &result, - points, types, startIndex, endIndex)); - return result; - } - INT Enumerate(PointF *points, BYTE *types, INT count) - { - INT result = 0; - updateStatus(DllExports::GdipPathIterEnumerate( - nativePathIterator, &result, - points, types, count)); - return result; - } - INT GetCount() const - { - INT result = 0; - updateStatus(DllExports::GdipPathIterGetCount( - nativePathIterator, &result)); - return result; - } - Status GetLastStatus() const - { - Status result = lastStatus; - lastStatus = Ok; - return result; - } - INT GetSubpathCount() const - { - INT result = 0; - updateStatus(DllExports::GdipPathIterGetSubpathCount( - nativePathIterator, &result)); - return result; - } - BOOL HasCurve() const - { - BOOL result = FALSE; - updateStatus(DllExports::GdipPathIterHasCurve( - nativePathIterator, &result)); - return result; - } - INT NextMarker(INT *startIndex, INT *endIndex) - { - INT result = 0; - updateStatus(DllExports::GdipPathIterNextMarker( - nativePathIterator, &result, - startIndex, endIndex)); - return result; - } - INT NextMarker(GraphicsPath *path) - { - INT result = 0; - updateStatus(DllExports::GdipPathIterNextMarkerPath( - nativePathIterator, &result, - path ? path->nativePath : NULL)); - return result; - } - INT NextPathType(BYTE *pathType, INT *startIndex, INT *endIndex) - { - INT result = 0; - updateStatus(DllExports::GdipPathIterNextPathType( - nativePathIterator, &result, - pathType, startIndex, endIndex)); - return result; - } - INT NextSubpath(INT *startIndex, INT *endIndex, BOOL *isClosed) - { - INT result = 0; - updateStatus(DllExports::GdipPathIterNextSubpath( - nativePathIterator, &result, - startIndex, endIndex, isClosed)); - return result; - } - INT NextSubpath(GraphicsPath *path, BOOL *isClosed) - { - INT result = 0; - updateStatus(DllExports::GdipPathIterNextSubpathPath( - nativePathIterator, &result, - path ? path->nativePath : NULL, isClosed)); - return result; - } - VOID Rewind() - { - updateStatus(DllExports::GdipPathIterRewind( - nativePathIterator)); - } - -private: - GraphicsPathIterator(GpPathIterator *pathIterator, Status status): - nativePathIterator(pathIterator), lastStatus(status) {} - GraphicsPathIterator(const GraphicsPathIterator&); - GraphicsPathIterator& operator=(const GraphicsPathIterator&); - - Status updateStatus(Status newStatus) const - { - if (newStatus != Ok) lastStatus = newStatus; - return newStatus; - } - - GpPathIterator *nativePathIterator; - mutable Status lastStatus; -}; - -class PathGradientBrush: public Brush -{ -public: - PathGradientBrush(const PointF *points, INT count, - WrapMode wrapMode = WrapModeClamp) - { - GpPathGradient *nativePathGradient = NULL; - lastStatus = DllExports::GdipCreatePathGradient( - points, count, wrapMode, &nativePathGradient); - nativeBrush = nativePathGradient; - } - PathGradientBrush(const Point *points, INT count, - WrapMode wrapMode = WrapModeClamp) - { - GpPathGradient *nativePathGradient = NULL; - lastStatus = DllExports::GdipCreatePathGradientI( - points, count, wrapMode, &nativePathGradient); - nativeBrush = nativePathGradient; - } - PathGradientBrush(const GraphicsPath *path) - { - GpPathGradient *nativePathGradient = NULL; - lastStatus = DllExports::GdipCreatePathGradientFromPath( - path ? path->nativePath : NULL, - &nativePathGradient); - nativeBrush = nativePathGradient; - } - virtual PathGradientBrush *Clone() const - { - GpBrush *cloneBrush = NULL; - Status status = updateStatus(DllExports::GdipCloneBrush( - nativeBrush, &cloneBrush)); - if (status == Ok) { - PathGradientBrush *result = - new PathGradientBrush(cloneBrush, lastStatus); - if (!result) { - DllExports::GdipDeleteBrush(cloneBrush); - updateStatus(OutOfMemory); - } - return result; - } else { - return NULL; - } - } - - Status GetBlend(REAL *blendFactors, REAL *blendPositions, - INT count) const - { - return updateStatus(DllExports::GdipGetPathGradientBlend( - (GpPathGradient*) nativeBrush, - blendFactors, blendPositions, count)); - } - INT GetBlendCount() const - { - INT result = 0; - updateStatus(DllExports::GdipGetPathGradientBlendCount( - (GpPathGradient*) nativeBrush, &result)); - return result; - } - Status GetCenterColor(Color *color) const - { - return updateStatus(DllExports::GdipGetPathGradientCenterColor( - (GpPathGradient*) nativeBrush, - color ? &color->Value : NULL)); - } - Status GetCenterPoint(PointF *point) const - { - return updateStatus(DllExports::GdipGetPathGradientCenterPoint( - (GpPathGradient*) nativeBrush, point)); - } - Status GetCenterPoint(Point *point) const - { - return updateStatus(DllExports::GdipGetPathGradientCenterPointI( - (GpPathGradient*) nativeBrush, point)); - } - Status GetFocusScales(REAL *xScale, REAL *yScale) const - { - return updateStatus(DllExports::GdipGetPathGradientFocusScales( - (GpPathGradient*) nativeBrush, xScale, yScale)); - } - BOOL GetGammaCorrection() const - { - BOOL result = FALSE; - updateStatus(DllExports::GdipGetPathGradientGammaCorrection( - (GpPathGradient*) nativeBrush, &result)); - return result; - } - //Status GetGraphicsPath(GraphicsPath *path) const - //{ - // // TODO: implement PathGradientBrush::GetGraphicsPath - // return updateStatus(NotImplemented); - //} - INT GetInterpolationColorCount() const - { - INT result = 0; - updateStatus(DllExports::GdipGetPathGradientPresetBlendCount( - (GpPathGradient*) nativeBrush, &result)); - return result; - } - Status GetInterpolationColors(Color *presetColors, - REAL *blendPositions, INT count) const - { - if (!presetColors || count <= 0) - return lastStatus = InvalidParameter; - - ARGB *presetArgb = - (ARGB*) DllExports::GdipAlloc(count * sizeof(ARGB)); - if (!presetArgb) - return lastStatus = OutOfMemory; - - Status status = updateStatus(DllExports::GdipGetPathGradientPresetBlend( - (GpPathGradient*) nativeBrush, - presetArgb, blendPositions, count)); - for (INT i = 0; i < count; ++i) { - presetColors[i].SetValue(presetArgb[i]); - } - DllExports::GdipFree((void*) presetArgb); - return status; - } - INT GetPointCount() const - { - INT result = 0; - updateStatus(DllExports::GdipGetPathGradientPointCount( - (GpPathGradient*) nativeBrush, &result)); - return result; - } - Status GetRectangle(RectF *rect) const - { - return updateStatus(DllExports::GdipGetPathGradientRect( - (GpPathGradient*) nativeBrush, rect)); - } - Status GetRectangle(Rect *rect) const - { - return updateStatus(DllExports::GdipGetPathGradientRectI( - (GpPathGradient*) nativeBrush, rect)); - } - INT GetSurroundColorCount() const - { - INT result = 0; - updateStatus(DllExports::GdipGetPathGradientSurroundColorCount( - (GpPathGradient*) nativeBrush, &result)); - return result; - } - Status GetSurroundColors(Color *colors, INT *count) - { - if (!colors || !count || *count <= 0) - return lastStatus = InvalidParameter; - - ARGB *colorsArgb = - (ARGB*) DllExports::GdipAlloc(*count * sizeof(ARGB)); - if (!colorsArgb) - return lastStatus = OutOfMemory; - - Status status = updateStatus(DllExports::GdipGetPathGradientSurroundColorsWithCount( - (GpPathGradient*) nativeBrush, - colorsArgb, count)); - for (INT i = 0; i < *count; ++i) { - colors[i].SetValue(colorsArgb[i]); - } - DllExports::GdipFree((void*) colorsArgb); - return status; - } - Status GetTransform(Matrix *matrix) const - { - return updateStatus(DllExports::GdipGetPathGradientTransform( - (GpPathGradient*) nativeBrush, - matrix ? matrix->nativeMatrix : NULL)); - } - WrapMode GetWrapMode() const - { - WrapMode result = WrapModeTile; - updateStatus(DllExports::GdipGetPathGradientWrapMode( - (GpPathGradient*) nativeBrush, &result)); - return result; - } - Status MultiplyTransform(const Matrix *matrix, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipMultiplyPathGradientTransform( - (GpPathGradient*) nativeBrush, - matrix ? matrix->nativeMatrix : NULL, order)); - } - Status ResetTransform() - { - return updateStatus(DllExports::GdipResetPathGradientTransform( - (GpPathGradient*) nativeBrush)); - } - Status RotateTransform(REAL angle, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipRotatePathGradientTransform( - (GpPathGradient*) nativeBrush, angle, order)); - } - Status ScaleTransform(REAL sx, REAL sy, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipScalePathGradientTransform( - (GpPathGradient*) nativeBrush, sx, sy, order)); - } - Status SetBlend(REAL *blendFactors, REAL *blendPositions, INT count) - { - return updateStatus(DllExports::GdipSetPathGradientBlend( - (GpPathGradient*) nativeBrush, - blendFactors, blendPositions, count)); - } - Status SetBlendBellShape(REAL focus, REAL scale = 1.0f) - { - return updateStatus(DllExports::GdipSetPathGradientSigmaBlend( - (GpPathGradient*) nativeBrush, focus, scale)); - } - Status SetBlendTriangularShape(REAL focus, REAL scale = 1.0f) - { - return updateStatus(DllExports::GdipSetPathGradientLinearBlend( - (GpPathGradient*) nativeBrush, focus, scale)); - } - Status SetCenterColor(const Color& color) - { - return updateStatus(DllExports::GdipSetPathGradientCenterColor( - (GpPathGradient*) nativeBrush, - color.GetValue())); - } - Status SetCenterPoint(const PointF& point) - { - return updateStatus(DllExports::GdipSetPathGradientCenterPoint( - (GpPathGradient*) nativeBrush, &point)); - } - Status SetCenterPoint(const Point& point) - { - return updateStatus(DllExports::GdipSetPathGradientCenterPointI( - (GpPathGradient*) nativeBrush, &point)); - } - Status SetFocusScales(REAL xScale, REAL yScale) - { - return updateStatus(DllExports::GdipSetPathGradientFocusScales( - (GpPathGradient*) nativeBrush, xScale, yScale)); - } - Status SetGammaCorrection(BOOL useGammaCorrection) - { - return updateStatus(DllExports::GdipSetPathGradientGammaCorrection( - (GpPathGradient*) nativeBrush, - useGammaCorrection)); - } - //Status SetGraphicsPath(const GraphicsPath *path) - //{ - // // TODO: implement PathGradientBrush::SetGraphicsPath - // return updateStatus(NotImplemented); - //} - Status SetInterpolationColors(const Color *presetColors, - REAL *blendPositions, INT count) - { - if (!presetColors || count <= 0) - return lastStatus = InvalidParameter; - - ARGB *presetArgb = - (ARGB*) DllExports::GdipAlloc(count * sizeof(ARGB)); - if (!presetArgb) - return lastStatus = OutOfMemory; - for (INT i = 0; i < count; ++i) { - presetArgb[i] = presetColors[i].GetValue(); - } - - Status status = updateStatus(DllExports::GdipSetPathGradientPresetBlend( - (GpPathGradient*) nativeBrush, - presetArgb, blendPositions, count)); - DllExports::GdipFree((void*) presetArgb); - return status; - } - Status SetSurroundColors(const Color *colors, INT *count) - { - if (!colors || !count || *count <= 0) - return lastStatus = InvalidParameter; - - ARGB *colorsArgb = - (ARGB*) DllExports::GdipAlloc(*count * sizeof(ARGB)); - if (!colorsArgb) - return lastStatus = OutOfMemory; - for (INT i = 0; i < *count; ++i) { - colorsArgb[i] = colors[i].GetValue(); - } - - Status status = updateStatus(DllExports::GdipSetPathGradientSurroundColorsWithCount( - (GpPathGradient*) nativeBrush, - colorsArgb, count)); - DllExports::GdipFree((void*) colorsArgb); - return status; - } - Status SetTransform(const Matrix *matrix) - { - return updateStatus(DllExports::GdipSetPathGradientTransform( - (GpPathGradient*) nativeBrush, - matrix ? matrix->nativeMatrix : NULL)); - } - Status SetWrapMode(WrapMode wrapMode) - { - return updateStatus(DllExports::GdipSetPathGradientWrapMode( - (GpPathGradient*) nativeBrush, wrapMode)); - } - Status TranslateTransform(REAL dx, REAL dy, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipTranslatePathGradientTransform( - (GpPathGradient*) nativeBrush, dx, dy, order)); - } - -private: - PathGradientBrush(GpBrush *brush, Status status): Brush(brush, status) {} - PathGradientBrush(const PathGradientBrush&); - PathGradientBrush& operator=(const PathGradientBrush&); -}; - - - -#endif /* __GDIPLUS_PATH_H */ diff --git a/src/gdiplus3/gdipluspen.h b/src/gdiplus3/gdipluspen.h deleted file mode 100644 index d7efed68..00000000 --- a/src/gdiplus3/gdipluspen.h +++ /dev/null @@ -1,338 +0,0 @@ -/* - * gdipluspen.h - * - * GDI+ Pen class - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_PEN_H -#define __GDIPLUS_PEN_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#ifndef __cplusplus -#error "A C++ compiler is required to include gdipluspen.h." -#endif - -class Pen: public GdiplusBase -{ - friend class Graphics; - friend class GraphicsPath; - -public: - Pen(const Color& color, REAL width = 1.0f): - nativePen(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipCreatePen1( - color.GetValue(), width, UnitWorld, - &nativePen); - } - Pen(const Brush *brush, REAL width = 1.0f): - nativePen(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipCreatePen2( - brush ? brush->nativeBrush : NULL, - width, UnitWorld, &nativePen); - } - ~Pen() - { - DllExports::GdipDeletePen(nativePen); - } - Pen* Clone() const - { - GpPen *clonePen = NULL; - Status status = updateStatus(DllExports::GdipClonePen( - nativePen, &clonePen)); - if (status == Ok) { - Pen *result = new Pen(clonePen, lastStatus); - if (!result) { - DllExports::GdipDeletePen(clonePen); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } - } - - PenAlignment GetAlignment() const - { - PenAlignment result = PenAlignmentCenter; - updateStatus(DllExports::GdipGetPenMode(nativePen, &result)); - return result; - } - // TODO: implement Pen::GetBrush() - //Brush *GetBrush() const - //{ - // // where is the pen brush allocated (static,member,new,other)? - // // GdipGetPenBrushFill just returns a GpBrush* - // updateStatus(NotImplemented); - // return NULL; - //} - Status GetColor(Color *color) const - { - return updateStatus(DllExports::GdipGetPenColor( - nativePen, color ? &color->Value : NULL)); - } - Status GetCompoundArray(REAL *compoundArray, INT count) const - { - return updateStatus(DllExports::GdipGetPenCompoundArray( - nativePen, compoundArray, count)); - } - INT GetCompoundArrayCount() const - { - INT result = 0; - updateStatus(DllExports::GdipGetPenCompoundCount( - nativePen, &result)); - return result; - } - Status GetCustomEndCap(CustomLineCap *customCap) const - { - if (!customCap) return lastStatus = InvalidParameter; - // FIXME: do we need to call GdipDeleteCustomLineCap first? - return updateStatus(DllExports::GdipGetPenCustomEndCap( - nativePen, &customCap->nativeCustomLineCap)); - } - Status GetCustomStartCap(CustomLineCap *customCap) const - { - if (!customCap) return lastStatus = InvalidParameter; - // FIXME: do we need to call GdipDeleteCustomLineCap first? - return updateStatus(DllExports::GdipGetPenCustomStartCap( - nativePen, &customCap->nativeCustomLineCap)); - } - DashCap GetDashCap() const - { - DashCap result = DashCapFlat; - updateStatus(DllExports::GdipGetPenDashCap197819( - nativePen, &result)); - return result; - } - REAL GetDashOffset() const - { - REAL result = 0.0f; - updateStatus(DllExports::GdipGetPenDashOffset( - nativePen, &result)); - return result; - } - Status GetDashPattern(REAL *dashArray, INT count) const - { - return updateStatus(DllExports::GdipGetPenDashArray( - nativePen, dashArray, count)); - } - INT GetDashPatternCount() const - { - INT result = 0; - updateStatus(DllExports::GdipGetPenDashCount( - nativePen, &result)); - return result; - } - DashStyle GetDashStyle() const - { - DashStyle result = DashStyleSolid; - updateStatus(DllExports::GdipGetPenDashStyle( - nativePen, &result)); - return result; - } - LineCap GetEndCap() const - { - LineCap result = LineCapFlat; - updateStatus(DllExports::GdipGetPenEndCap(nativePen, &result)); - return result; - } - Status GetLastStatus() const - { - Status result = lastStatus; - lastStatus = Ok; - return result; - } - LineJoin GetLineJoin() const - { - LineJoin result = LineJoinMiter; - updateStatus(DllExports::GdipGetPenLineJoin( - nativePen, &result)); - return result; - } - REAL GetMiterLimit() const - { - REAL result = 10.0f; - updateStatus(DllExports::GdipGetPenMiterLimit( - nativePen, &result)); - return result; - } - PenType GetPenType() const - { - PenType result = PenTypeUnknown; - updateStatus(DllExports::GdipGetPenFillType( - nativePen, &result)); - return result; - } - LineCap GetStartCap() const - { - LineCap result = LineCapFlat; - updateStatus(DllExports::GdipGetPenStartCap( - nativePen, &result)); - return result; - } - Status GetTransform(Matrix *matrix) const - { - return updateStatus(DllExports::GdipGetPenTransform( - nativePen, - matrix ? matrix->nativeMatrix : NULL)); - } - REAL GetWidth() const - { - REAL result = 1.0f; - updateStatus(DllExports::GdipGetPenWidth(nativePen, &result)); - return result; - } - Status MultiplyTransform(const Matrix *matrix, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipMultiplyPenTransform( - nativePen, - matrix ? matrix->nativeMatrix : NULL, order)); - } - Status ResetTransform() - { - return updateStatus(DllExports::GdipResetPenTransform( - nativePen)); - } - Status RotateTransform(REAL angle, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipRotatePenTransform( - nativePen, angle, order)); - } - Status ScaleTransform(REAL sx, REAL sy, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipScalePenTransform( - nativePen, sx, sy, order)); - } - Status SetAlignment(PenAlignment penAlignment) - { - return updateStatus(DllExports::GdipSetPenMode( - nativePen, penAlignment)); - } - Status SetBrush(const Brush *brush) - { - return updateStatus(DllExports::GdipSetPenBrushFill( - nativePen, brush ? brush->nativeBrush : NULL)); - } - Status SetColor(const Color& color) - { - return updateStatus(DllExports::GdipSetPenColor( - nativePen, color.GetValue())); - } - Status SetCompoundArray(const REAL *compoundArray, INT count) - { - return updateStatus(DllExports::GdipSetPenCompoundArray( - nativePen, compoundArray, count)); - } - Status SetCustomEndCap(const CustomLineCap *customCap) - { - return updateStatus(DllExports::GdipSetPenCustomEndCap( - nativePen, - customCap ? customCap->nativeCustomLineCap : NULL)); - } - Status SetCustomStartCap(const CustomLineCap *customCap) - { - return updateStatus(DllExports::GdipSetPenCustomStartCap( - nativePen, - customCap ? customCap->nativeCustomLineCap : NULL)); - } - Status SetDashCap(DashCap dashCap) - { - return updateStatus(DllExports::GdipSetPenDashCap197819( - nativePen, dashCap)); - } - Status SetDashOffset(REAL dashOffset) - { - return updateStatus(DllExports::GdipSetPenDashOffset( - nativePen, dashOffset)); - } - Status SetDashPattern(const REAL *dashArray, INT count) - { - return updateStatus(DllExports::GdipSetPenDashArray( - nativePen, dashArray, count)); - } - Status SetDashStyle(DashStyle dashStyle) - { - return updateStatus(DllExports::GdipSetPenDashStyle( - nativePen, dashStyle)); - } - Status SetEndCap(LineCap endCap) - { - return updateStatus(DllExports::GdipSetPenEndCap( - nativePen, endCap)); - } - Status SetLineCap(LineCap startCap, LineCap endCap, DashCap dashCap) - { - return updateStatus(DllExports::GdipSetPenLineCap197819( - nativePen, startCap, endCap, dashCap)); - } - Status SetLineJoin(LineJoin lineJoin) - { - return updateStatus(DllExports::GdipSetPenLineJoin( - nativePen, lineJoin)); - } - Status SetMiterLimit(REAL miterLimit) - { - return updateStatus(DllExports::GdipSetPenMiterLimit( - nativePen, miterLimit)); - } - Status SetStartCap(LineCap startCap) - { - return updateStatus(DllExports::GdipSetPenStartCap( - nativePen, startCap)); - } - Status SetTransform(const Matrix *matrix) - { - return updateStatus(DllExports::GdipSetPenTransform( - nativePen, - matrix ? matrix->nativeMatrix : NULL)); - } - Status SetWidth(REAL width) - { - return updateStatus(DllExports::GdipSetPenWidth( - nativePen, width)); - } - Status TranslateTransform(REAL dx, REAL dy, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipTranslatePenTransform( - nativePen, dx, dy, order)); - } - -private: - Pen(GpPen *pen, Status status): nativePen(pen), lastStatus(status) {} - Pen(const Pen& pen); - Pen& operator=(const Pen&); - - Status updateStatus(Status newStatus) const - { - if (newStatus != Ok) lastStatus = newStatus; - return newStatus; - } - - GpPen *nativePen; - mutable Status lastStatus; -}; - -#endif /* __GDIPLUS_PEN_H */ diff --git a/src/gdiplus3/gdipluspixelformats.h b/src/gdiplus3/gdipluspixelformats.h deleted file mode 100644 index ea51cc71..00000000 --- a/src/gdiplus3/gdipluspixelformats.h +++ /dev/null @@ -1,120 +0,0 @@ -/* - * gdipluspixelformats.h - * - * GDI+ pixel formats - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_PIXELFORMATS_H -#define __GDIPLUS_PIXELFORMATS_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -typedef DWORD ARGB; -typedef INT PixelFormat; - -#define PixelFormatIndexed ((INT) 0x00010000) -#define PixelFormatGDI ((INT) 0x00020000) -#define PixelFormatAlpha ((INT) 0x00040000) -#define PixelFormatPAlpha ((INT) 0x00080000) -#define PixelFormatExtended ((INT) 0x00100000) -#define PixelFormatCanonical ((INT) 0x00200000) -#define PixelFormatUndefined ((INT) 0) -#define PixelFormatDontCare ((INT) 0) -#define PixelFormat1bppIndexed ((INT) \ - (1 | (1<<8) | PixelFormatIndexed | PixelFormatGDI)) -#define PixelFormat4bppIndexed ((INT) \ - (2 | (4<<8) | PixelFormatIndexed | PixelFormatGDI)) -#define PixelFormat8bppIndexed ((INT) \ - (3 | (8<<8) | PixelFormatIndexed | PixelFormatGDI)) -#define PixelFormat16bppGrayScale ((INT) \ - (4 | (16<<8) | PixelFormatExtended)) -#define PixelFormat16bppRGB555 ((INT) \ - (5 | (16<<8) | PixelFormatGDI)) -#define PixelFormat16bppRGB565 ((INT) \ - (6 | (16<<8) | PixelFormatGDI)) -#define PixelFormat16bppARGB1555 ((INT) \ - (7 | (16<<8) | PixelFormatAlpha | PixelFormatGDI)) -#define PixelFormat24bppRGB ((INT) \ - (8 | (24<<8) | PixelFormatGDI)) -#define PixelFormat32bppRGB ((INT) \ - (9 | (32<<8) | PixelFormatGDI)) -#define PixelFormat32bppARGB ((INT) \ - (10 | (32<<8) | PixelFormatAlpha | PixelFormatGDI | PixelFormatCanonical)) -#define PixelFormat32bppPARGB ((INT) \ - (11 | (32<<8) | PixelFormatAlpha | PixelFormatPAlpha | PixelFormatGDI)) -#define PixelFormat48bppRGB ((INT) \ - (12 | (48<<8) | PixelFormatExtended)) -#define PixelFormat64bppARGB ((INT) \ - (13 | (64<<8) | PixelFormatAlpha | PixelFormatCanonical | PixelFormatExtended)) -#define PixelFormat64bppPARGB ((INT) \ - (14 | (64<<8) | PixelFormatAlpha | PixelFormatPAlpha | PixelFormatExtended)) -#define PixelFormatMax ((INT) 15) - -typedef enum PaletteFlags { - PaletteFlagsHasAlpha = 1, - PaletteFlagsGrayScale = 2, - PaletteFlagsHalftone = 4 -} PaletteFlags; - -typedef enum PaletteType { - PaletteTypeCustom = 0, - PaletteTypeOptimal = 1, - PaletteTypeFixedBW = 2, - PaletteTypeFixedHalftone8 = 3, - PaletteTypeFixedHalftone27 = 4, - PaletteTypeFixedHalftone64 = 5, - PaletteTypeFixedHalftone125 = 6, - PaletteTypeFixedHalftone216 = 7, - PaletteTypeFixedHalftone252 = 8, - PaletteTypeFixedHalftone256 = 9 -} PaletteType; - -typedef struct ColorPalette { - UINT Flags; - UINT Count; - ARGB Entries[1]; -} ColorPalette; - -static __inline__ UINT GetPixelFormatSize(PixelFormat pixfmt) -{ - return (((UINT) pixfmt) & 0xff00U) >> 8; -} - -static __inline__ BOOL IsAlphaPixelFormat(PixelFormat pixfmt) -{ - return (pixfmt & PixelFormatAlpha) != 0; -} - -static __inline__ BOOL IsCanonicalPixelFormat(PixelFormat pixfmt) -{ - return (pixfmt & PixelFormatCanonical) != 0; -} - -static __inline__ BOOL IsExtendedPixelFormat(PixelFormat pixfmt) -{ - return (pixfmt & PixelFormatExtended) != 0; -} - -static __inline__ BOOL IsIndexedPixelFormat(PixelFormat pixfmt) -{ - return (pixfmt & PixelFormatIndexed) != 0; -} - -#endif /* __GDIPLUS_PIXELFORMATS_H */ diff --git a/src/gdiplus3/gdiplusstringformat.h b/src/gdiplus3/gdiplusstringformat.h deleted file mode 100644 index b95d1c36..00000000 --- a/src/gdiplus3/gdiplusstringformat.h +++ /dev/null @@ -1,251 +0,0 @@ -/* - * gdiplusstringformat.h - * - * GDI+ StringFormat class - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_STRINGFORMAT_H -#define __GDIPLUS_STRINGFORMAT_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#ifndef __cplusplus -#error "A C++ compiler is required to include gdiplusstringformat.h." -#endif - -class StringFormat: public GdiplusBase -{ - friend class Graphics; - friend class GraphicsPath; - -public: - static const StringFormat* GenericDefault(); - static const StringFormat* GenericTypographic(); - - StringFormat(INT formatFlags = 0, LANGID language = LANG_NEUTRAL): - nativeStringFormat(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipCreateStringFormat( - formatFlags, language, &nativeStringFormat); - } - StringFormat(const StringFormat *format): - nativeStringFormat(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipCloneStringFormat( - format ? format->nativeStringFormat : NULL, - &nativeStringFormat); - } - ~StringFormat() - { - DllExports::GdipDeleteStringFormat(nativeStringFormat); - } - StringFormat* Clone() const - { - GpStringFormat *cloneStringFormat = NULL; - Status status = updateStatus(DllExports::GdipCloneStringFormat( - nativeStringFormat, &cloneStringFormat)); - if (status == Ok) { - StringFormat *result = new StringFormat( - cloneStringFormat, lastStatus); - if (!result) { - DllExports::GdipDeleteStringFormat(cloneStringFormat); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } - } - - StringAlignment GetAlignment() const - { - StringAlignment result = StringAlignmentNear; - updateStatus(DllExports::GdipGetStringFormatAlign( - nativeStringFormat, &result)); - return result; - } - LANGID GetDigitSubstitutionLanguage() const - { - LANGID result = 0; - StringDigitSubstitute method; - updateStatus(DllExports::GdipGetStringFormatDigitSubstitution( - nativeStringFormat, &result, &method)); - return result; - } - StringDigitSubstitute GetDigitSubstitutionMethod() const - { - LANGID language; - StringDigitSubstitute result = StringDigitSubstituteUser; - updateStatus(DllExports::GdipGetStringFormatDigitSubstitution( - nativeStringFormat, &language, &result)); - return result; - } - INT GetFormatFlags() const - { - INT result = 0; - updateStatus(DllExports::GdipGetStringFormatFlags( - nativeStringFormat, &result)); - return result; - } - HotkeyPrefix GetHotkeyPrefix() const - { - HotkeyPrefix result = HotkeyPrefixNone; - updateStatus(DllExports::GdipGetStringFormatHotkeyPrefix( - nativeStringFormat, (INT*) &result)); - return result; - } - Status GetLastStatus() const - { - Status result = lastStatus; - lastStatus = Ok; - return result; - } - StringAlignment GetLineAlignment() const - { - StringAlignment result = StringAlignmentNear; - updateStatus(DllExports::GdipGetStringFormatLineAlign( - nativeStringFormat, &result)); - return result; - } - INT GetMeasurableCharacterRangeCount() const - { - INT result = 0; - updateStatus(DllExports::GdipGetStringFormatMeasurableCharacterRangeCount( - nativeStringFormat, &result)); - return result; - } - INT GetTabStopCount() const - { - INT result = 0; - updateStatus(DllExports::GdipGetStringFormatTabStopCount( - nativeStringFormat, &result)); - return result; - } - Status GetTabStops(INT count, REAL *firstTabOffset, REAL *tabStops) - { - return updateStatus(DllExports::GdipGetStringFormatTabStops( - nativeStringFormat, count, - firstTabOffset, tabStops)); - } - StringTrimming GetTrimming() const - { - StringTrimming result = StringTrimmingNone; - updateStatus(DllExports::GdipGetStringFormatTrimming( - nativeStringFormat, &result)); - return result; - } - Status SetAlignment(StringAlignment align) - { - return updateStatus(DllExports::GdipSetStringFormatAlign( - nativeStringFormat, align)); - } - Status SetDigitSubstitution(LANGID language, - StringDigitSubstitute substitute) - { - return updateStatus(DllExports::GdipSetStringFormatDigitSubstitution( - nativeStringFormat, language, substitute)); - } - Status SetFormatFlags(INT flags) - { - return updateStatus(DllExports::GdipSetStringFormatFlags( - nativeStringFormat, flags)); - } - Status SetHotkeyPrefix(HotkeyPrefix hotkeyPrefix) - { - return updateStatus(DllExports::GdipSetStringFormatHotkeyPrefix( - nativeStringFormat, (INT) hotkeyPrefix)); - } - Status SetLineAlignment(StringAlignment align) - { - return updateStatus(DllExports::GdipSetStringFormatLineAlign( - nativeStringFormat, align)); - } - Status SetMeasurableCharacterRanges(INT rangeCount, - const CharacterRange *ranges) - { - return updateStatus(DllExports::GdipSetStringFormatMeasurableCharacterRanges( - nativeStringFormat, rangeCount, ranges)); - } - Status SetTabStops(REAL firstTabOffset, INT count, const REAL *tabStops) - { - return updateStatus(DllExports::GdipSetStringFormatTabStops( - nativeStringFormat, firstTabOffset, - count, tabStops)); - } - Status SetTrimming(StringTrimming trimming) - { - return updateStatus(DllExports::GdipSetStringFormatTrimming( - nativeStringFormat, trimming)); - } - -private: - StringFormat(GpStringFormat *stringFormat, Status status): - nativeStringFormat(stringFormat), lastStatus(status) {} - StringFormat(const StringFormat&); - StringFormat& operator=(const StringFormat&); - - Status updateStatus(Status newStatus) const - { - if (newStatus != Ok) lastStatus = newStatus; - return newStatus; - } - - GpStringFormat *nativeStringFormat; - mutable Status lastStatus; -}; - - -// FIXME: do StringFormat::GenericDefault() et al. need to be thread safe? -// FIXME: maybe put this in gdiplus.c? - -extern "C" void *_GdipStringFormatCachedGenericDefault; -extern "C" void *_GdipStringFormatCachedGenericTypographic; - -__inline__ const StringFormat* StringFormat::GenericDefault() -{ - if (!_GdipStringFormatCachedGenericDefault) { - GpStringFormat *nativeStringFormat = 0; - Status status = DllExports::GdipStringFormatGetGenericDefault( - &nativeStringFormat); - if (status == Ok && nativeStringFormat) { - _GdipStringFormatCachedGenericDefault = (void*) - new StringFormat(nativeStringFormat, Ok); - } - } - return (StringFormat*) _GdipStringFormatCachedGenericDefault; -} - -__inline__ const StringFormat* StringFormat::GenericTypographic() -{ - if (!_GdipStringFormatCachedGenericTypographic) { - GpStringFormat *nativeStringFormat = 0; - Status status = DllExports::GdipStringFormatGetGenericTypographic( - &nativeStringFormat); - if (status == Ok && nativeStringFormat) { - _GdipStringFormatCachedGenericTypographic = (void*) - new StringFormat(nativeStringFormat, Ok); - } - } - return (StringFormat*) _GdipStringFormatCachedGenericTypographic; -} - - - -#endif /* __GDIPLUS_STRINGFORMAT_H */ diff --git a/src/gdiplus3/gdiplustypes.h b/src/gdiplus3/gdiplustypes.h deleted file mode 100644 index 08a42378..00000000 --- a/src/gdiplus3/gdiplustypes.h +++ /dev/null @@ -1,456 +0,0 @@ -/* - * gdiplustypes.h - * - * GDI+ basic type declarations - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_TYPES_H -#define __GDIPLUS_TYPES_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#define WINGDIPAPI __stdcall -#define GDIPCONST const - -typedef enum GpStatus { - Ok = 0, - GenericError = 1, - InvalidParameter = 2, - OutOfMemory = 3, - ObjectBusy = 4, - InsufficientBuffer = 5, - NotImplemented = 6, - Win32Error = 7, - WrongState = 8, - Aborted = 9, - FileNotFound = 10, - ValueOverflow = 11, - AccessDenied = 12, - UnknownImageFormat = 13, - FontFamilyNotFound = 14, - FontStyleNotFound = 15, - NotTrueTypeFont = 16, - UnsupportedGdiplusVersion = 17, - GdiplusNotInitialized = 18, - PropertyNotFound = 19, - PropertyNotSupported = 20, - ProfileNotFound = 21 -} GpStatus; - -#ifdef __cplusplus -typedef GpStatus Status; -#endif - -typedef struct Size { - INT Width; - INT Height; - - #ifdef __cplusplus - Size(): Width(0), Height(0) {} - Size(INT width, INT height): Width(width), Height(height) {} - Size(const Size& size): Width(size.Width), Height(size.Height) {} - - BOOL Empty() const { - return Width == 0 && Height == 0; - } - BOOL Equals(const Size& size) const { - return Width == size.Width && Height == size.Height; - } - Size operator+(const Size& size) const { - return Size(Width + size.Width, Height + size.Height); - } - Size operator-(const Size& size) const { - return Size(Width - size.Width, Height - size.Height); - } - #endif /* __cplusplus */ -} Size; - -typedef struct SizeF { - REAL Width; - REAL Height; - - #ifdef __cplusplus - SizeF(): Width(0.0f), Height(0.0f) {} - SizeF(REAL width, REAL height): Width(width), Height(height) {} - SizeF(const SizeF& size): Width(size.Width), Height(size.Height) {} - - BOOL Empty() const { - return Width == 0.0f && Height == 0.0f; - } - BOOL Equals(const SizeF& size) const { - return Width == size.Width && Height == size.Height; - } - SizeF operator+(const SizeF& size) const { - return SizeF(Width + size.Width, Height + size.Height); - } - SizeF operator-(const SizeF& size) const { - return SizeF(Width - size.Width, Height - size.Height); - } - #endif /* __cplusplus */ -} SizeF; - -typedef struct Point { - INT X; - INT Y; - - #ifdef __cplusplus - Point(): X(0), Y(0) {} - Point(INT x, INT y): X(x), Y(y) {} - Point(const Point& point): X(point.X), Y(point.Y) {} - Point(const Size& size): X(size.Width), Y(size.Height) {} - - BOOL Equals(const Point& point) const { - return X == point.X && Y == point.Y; - } - Point operator+(const Point& point) const { - return Point(X + point.X, Y + point.Y); - } - Point operator-(const Point& point) const { - return Point(X - point.X, Y - point.Y); - } - #endif /* __cplusplus */ -} Point; - -typedef struct PointF { - REAL X; - REAL Y; - - #ifdef __cplusplus - PointF(): X(0.0f), Y(0.0f) {} - PointF(REAL x, REAL y): X(x), Y(y) {} - PointF(const PointF& point): X(point.X), Y(point.Y) {} - PointF(const SizeF& size): X(size.Width), Y(size.Height) {} - - BOOL Equals(const PointF& point) const { - return X == point.X && Y == point.Y; - } - PointF operator+(const PointF& point) const { - return PointF(X + point.X, Y + point.Y); - } - PointF operator-(const PointF& point) const { - return PointF(X - point.X, Y - point.Y); - } - #endif /* __cplusplus */ -} PointF; - -typedef struct Rect { - INT X; - INT Y; - INT Width; - INT Height; - - #ifdef __cplusplus - Rect(): X(0), Y(0), Width(0), Height(0) {} - Rect(const Point& location, const Size& size): - X(location.X), Y(location.Y), - Width(size.Width), Height(size.Height) {} - Rect(INT x, INT y, INT width, INT height): - X(x), Y(y), Width(width), Height(height) {} - - Rect* Clone() const { - return new Rect(X, Y, Width, Height); - } - BOOL Contains(INT x, INT y) const { - return X <= x && Y <= y && x < X+Width && y < Y+Height; - } - BOOL Contains(const Point& point) const { - return Contains(point.X, point.Y); - } - BOOL Contains(const Rect& rect) const { - return X <= rect.X && Y <= rect.Y - && rect.X+rect.Width <= X+Width - && rect.Y+rect.Height <= Y+Height; - } - BOOL Equals(const Rect& rect) const { - return X == rect.X && Y == rect.Y - && Width == rect.Width && Height == rect.Height; - } - INT GetBottom() const { - return Y+Height; - } - VOID GetBounds(Rect *rect) const { - if (rect != NULL) { - rect->X = X; - rect->Y = Y; - rect->Width = Width; - rect->Height = Height; - } - } - INT GetLeft() const { - return X; - } - VOID GetLocation(Point *point) const { - if (point != NULL) { - point->X = X; - point->Y = Y; - } - } - INT GetRight() const { - return X+Width; - } - VOID GetSize(Size *size) const { - if (size != NULL) { - size->Width = Width; - size->Height = Height; - } - } - INT GetTop() const { - return Y; - } - BOOL IsEmptyArea() const { - return Width <= 0 || Height <= 0; - } - VOID Inflate(INT dx, INT dy) { - X -= dx; - Y -= dy; - Width += 2*dx; - Height += 2*dy; - } - VOID Inflate(const Point& point) { - Inflate(point.X, point.Y); - } - static BOOL Intersect(Rect& c, const Rect& a, const Rect& b) { - INT intersectLeft = (a.X < b.X) ? b.X : a.X; - INT intersectTop = (a.Y < b.Y) ? b.Y : a.Y; - INT intersectRight = (a.GetRight() < b.GetRight()) - ? a.GetRight() : b.GetRight(); - INT intersectBottom = (a.GetBottom() < b.GetBottom()) - ? a.GetBottom() : b.GetBottom(); - c.X = intersectLeft; - c.Y = intersectTop; - c.Width = intersectRight - intersectLeft; - c.Height = intersectBottom - intersectTop; - return !c.IsEmptyArea(); - } - BOOL Intersect(const Rect& rect) { - return Intersect(*this, *this, rect); - } - BOOL IntersectsWith(const Rect& rc) const { - INT intersectLeft = (X < rc.X) ? rc.X : X; - INT intersectTop = (Y < rc.Y) ? rc.Y : Y; - INT intersectRight = (GetRight() < rc.GetRight()) - ? GetRight() : rc.GetRight(); - INT intersectBottom = (GetBottom() < rc.GetBottom()) - ? GetBottom() : rc.GetBottom(); - return intersectLeft < intersectRight - && intersectTop < intersectBottom; - } - VOID Offset(INT dx, INT dy) { - X += dx; - Y += dy; - } - VOID Offset(const Point& point) { - Offset(point.X, point.Y); - } - static BOOL Union(Rect& c, const Rect& a, const Rect& b) { - INT unionLeft = (a.X < b.X) ? a.X : b.X; - INT unionTop = (a.Y < b.Y) ? a.Y : b.Y; - INT unionRight = (a.GetRight() < b.GetRight()) - ? b.GetRight() : a.GetRight(); - INT unionBottom = (a.GetBottom() < b.GetBottom()) - ? b.GetBottom() : a.GetBottom(); - c.X = unionLeft; - c.Y = unionTop; - c.Width = unionRight - unionLeft; - c.Height = unionBottom - unionTop; - return !c.IsEmptyArea(); - } - #endif /* __cplusplus */ -} Rect; - -typedef struct RectF { - REAL X; - REAL Y; - REAL Width; - REAL Height; - - #ifdef __cplusplus - RectF(): X(0.0f), Y(0.0f), Width(0.0f), Height(0.0f) {} - RectF(const PointF& location, const SizeF& size): - X(location.X), Y(location.Y), - Width(size.Width), Height(size.Height) {} - RectF(REAL x, REAL y, REAL width, REAL height): - X(x), Y(y), Width(width), Height(height) {} - - RectF* Clone() const { - return new RectF(X, Y, Width, Height); - } - BOOL Contains(REAL x, REAL y) const { - return X <= x && Y <= y && x < X+Width && y < Y+Height; - } - BOOL Contains(const PointF& point) const { - return Contains(point.X, point.Y); - } - BOOL Contains(const RectF& rect) const { - return X <= rect.X && Y <= rect.Y - && rect.X+rect.Width <= X+Width - && rect.Y+rect.Height <= Y+Height; - } - BOOL Equals(const RectF& rect) const { - return X == rect.X && Y == rect.Y - && Width == rect.Width && Height == rect.Height; - } - REAL GetBottom() const { - return Y+Height; - } - VOID GetBounds(RectF *rect) const { - if (rect != NULL) { - rect->X = X; - rect->Y = Y; - rect->Width = Width; - rect->Height = Height; - } - } - REAL GetLeft() const { - return X; - } - VOID GetLocation(PointF *point) const { - if (point != NULL) { - point->X = X; - point->Y = Y; - } - } - REAL GetRight() const { - return X+Width; - } - VOID GetSize(SizeF *size) const { - if (size != NULL) { - size->Width = Width; - size->Height = Height; - } - } - REAL GetTop() const { - return Y; - } - BOOL IsEmptyArea() const { - return Width <= 0.0f || Height <= 0.0f; - } - VOID Inflate(REAL dx, REAL dy) { - X -= dx; - Y -= dy; - Width += 2*dx; - Height += 2*dy; - } - VOID Inflate(const PointF& point) { - Inflate(point.X, point.Y); - } - static BOOL Intersect(RectF& c, const RectF& a, const RectF& b) { - INT intersectLeft = (a.X < b.X) ? b.X : a.X; - INT intersectTop = (a.Y < b.Y) ? b.Y : a.Y; - INT intersectRight = (a.GetRight() < b.GetRight()) - ? a.GetRight() : b.GetRight(); - INT intersectBottom = (a.GetBottom() < b.GetBottom()) - ? a.GetBottom() : b.GetBottom(); - c.X = intersectLeft; - c.Y = intersectTop; - c.Width = intersectRight - intersectLeft; - c.Height = intersectBottom - intersectTop; - return !c.IsEmptyArea(); - } - BOOL Intersect(const RectF& rect) { - return Intersect(*this, *this, rect); - } - BOOL IntersectsWith(const RectF& rc) const { - INT intersectLeft = (X < rc.X) ? rc.X : X; - INT intersectTop = (Y < rc.Y) ? rc.Y : Y; - INT intersectRight = (GetRight() < rc.GetRight()) - ? GetRight() : rc.GetRight(); - INT intersectBottom = (GetBottom() < rc.GetBottom()) - ? GetBottom() : rc.GetBottom(); - return intersectLeft < intersectRight - && intersectTop < intersectBottom; - } - VOID Offset(REAL dx, REAL dy) { - X += dx; - Y += dy; - } - VOID Offset(const PointF& point) { - Offset(point.X, point.Y); - } - static BOOL Union(RectF& c, const RectF& a, const RectF& b) { - INT unionLeft = (a.X < b.X) ? a.X : b.X; - INT unionTop = (a.Y < b.Y) ? a.Y : b.Y; - INT unionRight = (a.GetRight() < b.GetRight()) - ? b.GetRight() : a.GetRight(); - INT unionBottom = (a.GetBottom() < b.GetBottom()) - ? b.GetBottom() : a.GetBottom(); - c.X = unionLeft; - c.Y = unionTop; - c.Width = unionRight - unionLeft; - c.Height = unionBottom - unionTop; - return !c.IsEmptyArea(); - } - #endif /* __cplusplus */ -} RectF; - -/* FIXME: Are descendants of this class, when compiled with g++, - binary compatible with MSVC++ code (especially GDIPLUS.DLL of course)? */ -#ifdef __cplusplus -struct GdiplusAbort { - virtual HRESULT __stdcall Abort(void) {} -}; -#else -typedef struct GdiplusAbort GdiplusAbort; /* incomplete type */ -#endif - -typedef struct CharacterRange { - INT First; - INT Length; - - #ifdef __cplusplus - CharacterRange(): First(0), Length(0) {} - CharacterRange(INT first, INT length): First(first), Length(length) {} - CharacterRange& operator=(const CharacterRange& rhs) { - /* This gracefully handles self-assignment */ - First = rhs.First; - Length = rhs.Length; - return *this; - } - #endif /* __cplusplus */ -} CharacterRange; - -typedef struct PathData { - INT Count; - PointF *Points; - BYTE *Types; - - #ifdef __cplusplus - friend class GraphicsPath; - - PathData(): Count(0), Points(NULL), Types(NULL) {} - ~PathData() { - FreeArrays(); - } -private: - /* used by GraphicsPath::GetPathData, defined in gdipluspath.h */ - Status AllocateArrays(INT capacity); - VOID FreeArrays(); - #endif /* __cplusplus */ -} PathData; - -/* Callback function types */ -/* FIXME: need a correct definition for these function pointer types */ -typedef void *DebugEventProc; -typedef BOOL CALLBACK (*EnumerateMetafileProc)(EmfPlusRecordType,UINT,UINT,const BYTE*,VOID*); -typedef void *DrawImageAbort; -typedef void *GetThumbnailImageAbort; - - -#endif /* __GDIPLUS_TYPES_H */ diff --git a/src/gdiplus4/gdiplus.h b/src/gdiplus4/gdiplus.h deleted file mode 100644 index 79366eae..00000000 --- a/src/gdiplus4/gdiplus.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * gdiplus.h - * - * GDI+ main header - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_H -#define __GDIPLUS_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#ifndef RC_INVOKED - -#include -#include -#include -#include - -#include - -#ifndef _COM_interface -#define _COM_interface struct -#endif - -typedef _COM_interface IStream IStream; -typedef _COM_interface IDirectDrawSurface7 IDirectDrawSurface7; - -#ifdef __cplusplus -namespace Gdiplus { -#endif - -typedef float REAL; -typedef SHORT INT16; -typedef WORD UINT16; - -#include "gdiplusenums.h" -#include "gdiplustypes.h" -#include "gdiplusgpstubs.h" -#include "gdiplusimaging.h" -#include "gdiplusinit.h" -#include "gdiplusmem.h" -#include "gdiplusmetaheader.h" -#include "gdipluspixelformats.h" -#include "gdipluscolor.h" -#include "gdipluscolormatrix.h" -#include "gdiplusflat.h" -#include "gdipluseffects.h" -#include "gdiplusimagecodec.h" - -#ifdef __cplusplus -#include "gdiplusbase.h" -#include "gdiplusheaders.h" -#include "gdiplusimageattributes.h" -#include "gdiplusmatrix.h" -#include "gdiplusbrush.h" -#include "gdiplusmetafile.h" -#include "gdipluspen.h" -#include "gdiplusstringformat.h" -#include "gdipluspath.h" -#include "gdiplusgraphics.h" -#include "gdipluslinecaps.h" -#include "gdiplusimpl.h" - -} /* namespace Gdiplus */ -#endif /* __cplusplus */ - -#endif /* !RC_INVOKED */ - -#endif /* __GDIPLUS_H */ diff --git a/src/gdiplus4/gdiplusbase.h b/src/gdiplus4/gdiplusbase.h deleted file mode 100644 index e0430d1f..00000000 --- a/src/gdiplus4/gdiplusbase.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * gdiplusbase.h - * - * GDI+ base class - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_BASE_H -#define __GDIPLUS_BASE_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#ifndef __cplusplus -#error "A C++ compiler is required to include gdiplusbase.h." -#endif - -class GdiplusBase -{ -public: - static void* operator new(size_t in_size) - { - return DllExports::GdipAlloc(in_size); - } - static void* operator new[](size_t in_size) - { - return DllExports::GdipAlloc(in_size); - } - static void operator delete(void *in_pVoid) - { - DllExports::GdipFree(in_pVoid); - } - static void operator delete[](void *in_pVoid) - { - DllExports::GdipFree(in_pVoid); - } -}; - -#endif /* __GDIPLUS_BASE_H */ diff --git a/src/gdiplus4/gdiplusbrush.h b/src/gdiplus4/gdiplusbrush.h deleted file mode 100644 index 62837059..00000000 --- a/src/gdiplus4/gdiplusbrush.h +++ /dev/null @@ -1,606 +0,0 @@ -/* - * gdiplusbrush.h - * - * GDI+ brush classes - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_BRUSH_H -#define __GDIPLUS_BRUSH_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#ifndef __cplusplus -#error "A C++ compiler is required to include gdiplusbrush.h." -#endif - -class Brush: public GdiplusBase -{ - friend class HatchBrush; - friend class LinearGradientBrush; - friend class PathGradientBrush; - friend class SolidBrush; - friend class TextureBrush; - friend class Graphics; - friend class Pen; - -public: - virtual ~Brush() - { - DllExports::GdipDeleteBrush(nativeBrush); - } - virtual Brush* Clone() const // each subclass must implement this - { - lastStatus = NotImplemented; - return NULL; - } - - Status GetLastStatus() const - { - Status result = lastStatus; - lastStatus = Ok; - return result; - } - BrushType GetType() const - { - BrushType result = BrushTypeSolidColor; - updateStatus(DllExports::GdipGetBrushType(nativeBrush, &result)); - return result; - } - -private: - Brush(): nativeBrush(NULL), lastStatus(Ok) {} - Brush(GpBrush *brush, Status status): - nativeBrush(brush), lastStatus(status) {} - Brush(const Brush& brush); - Brush& operator=(const Brush&); - - Status updateStatus(Status newStatus) const - { - if (newStatus != Ok) lastStatus = newStatus; - return newStatus; - } - - GpBrush *nativeBrush; - mutable Status lastStatus; -}; - -class HatchBrush: public Brush -{ -public: - HatchBrush(HatchStyle hatchStyle, - const Color& foreColor, - const Color& backColor = Color()) - { - GpHatch *nativeHatch = NULL; - lastStatus = DllExports::GdipCreateHatchBrush(hatchStyle, - foreColor.GetValue(), backColor.GetValue(), - &nativeHatch); - nativeBrush = nativeHatch; - } - virtual HatchBrush* Clone() const - { - GpBrush *cloneBrush = NULL; - Status status = updateStatus(DllExports::GdipCloneBrush( - nativeBrush, &cloneBrush)); - if (status == Ok) { - HatchBrush *result = - new HatchBrush(cloneBrush, lastStatus); - if (!result) { - DllExports::GdipDeleteBrush(cloneBrush); - updateStatus(OutOfMemory); - } - return result; - } else { - return NULL; - } - } - - Status GetBackgroundColor(Color *color) const - { - return updateStatus(DllExports::GdipGetHatchBackgroundColor( - (GpHatch*) nativeBrush, - color ? &color->Value : NULL)); - } - Status GetForegroundColor(Color *color) const - { - return updateStatus(DllExports::GdipGetHatchForegroundColor( - (GpHatch*) nativeBrush, - color ? &color->Value : NULL)); - } - HatchStyle GetHatchStyle() const - { - HatchStyle result; - updateStatus(DllExports::GdipGetHatchStyle( - (GpHatch*) nativeBrush, &result)); - return result; - } - -private: - HatchBrush(GpBrush *brush, Status status): Brush(brush, status) {} - HatchBrush(const HatchBrush& brush); - HatchBrush& operator=(const HatchBrush&); -}; - -class LinearGradientBrush: public Brush -{ -public: - LinearGradientBrush(const PointF& point1, const PointF& point2, - const Color& color1, const Color& color2) - { - GpLineGradient *nativeLineGradient = NULL; - lastStatus = DllExports::GdipCreateLineBrush( - &point1, &point2, - color1.GetValue(), color2.GetValue(), - WrapModeTile, &nativeLineGradient); - nativeBrush = nativeLineGradient; - } - LinearGradientBrush(const Point& point1, const Point& point2, - const Color& color1, const Color& color2) - { - GpLineGradient *nativeLineGradient = NULL; - lastStatus = DllExports::GdipCreateLineBrushI( - &point1, &point2, - color1.GetValue(), color2.GetValue(), - WrapModeTile, &nativeLineGradient); - nativeBrush = nativeLineGradient; - } - LinearGradientBrush(const RectF& rect, const Color& color1, - const Color& color2, LinearGradientMode mode) - { - GpLineGradient *nativeLineGradient = NULL; - lastStatus = DllExports::GdipCreateLineBrushFromRect( - &rect, color1.GetValue(), color2.GetValue(), - mode, WrapModeTile, &nativeLineGradient); - nativeBrush = nativeLineGradient; - } - LinearGradientBrush(const Rect& rect, const Color& color1, - const Color& color2, LinearGradientMode mode) - { - GpLineGradient *nativeLineGradient = NULL; - lastStatus = DllExports::GdipCreateLineBrushFromRectI( - &rect, color1.GetValue(), color2.GetValue(), - mode, WrapModeTile, &nativeLineGradient); - nativeBrush = nativeLineGradient; - } - LinearGradientBrush(const RectF& rect, const Color& color1, - const Color& color2, REAL angle, - BOOL isAngleScalable = FALSE) - { - GpLineGradient *nativeLineGradient = NULL; - lastStatus = DllExports::GdipCreateLineBrushFromRectWithAngle( - &rect, color1.GetValue(), color2.GetValue(), - angle, isAngleScalable, WrapModeTile, - &nativeLineGradient); - nativeBrush = nativeLineGradient; - } - LinearGradientBrush(const Rect& rect, const Color& color1, - const Color& color2, REAL angle, - BOOL isAngleScalable = FALSE) - { - GpLineGradient *nativeLineGradient = NULL; - lastStatus = DllExports::GdipCreateLineBrushFromRectWithAngleI( - &rect, color1.GetValue(), color2.GetValue(), - angle, isAngleScalable, WrapModeTile, - &nativeLineGradient); - nativeBrush = nativeLineGradient; - } - virtual LinearGradientBrush* Clone() const - { - GpBrush *cloneBrush = NULL; - Status status = updateStatus(DllExports::GdipCloneBrush( - nativeBrush, &cloneBrush)); - if (status == Ok) { - LinearGradientBrush *result = - new LinearGradientBrush(cloneBrush, lastStatus); - if (!result) { - DllExports::GdipDeleteBrush(cloneBrush); - updateStatus(OutOfMemory); - } - return result; - } else { - return NULL; - } - } - - Status GetBlend(REAL *blendFactors, REAL *blendPositions, - INT count) const - { - return updateStatus(DllExports::GdipGetLineBlend( - (GpLineGradient*) nativeBrush, - blendFactors, blendPositions, count)); - } - INT GetBlendCount() const - { - INT result = 0; - updateStatus(DllExports::GdipGetLineBlendCount( - (GpLineGradient*) nativeBrush, &result)); - return result; - } - BOOL GetGammaCorrection() const - { - BOOL result = FALSE; - updateStatus(DllExports::GdipGetLineGammaCorrection( - (GpLineGradient*) nativeBrush, &result)); - return result; - } - INT GetInterpolationColorCount() const - { - INT result = 0; - updateStatus(DllExports::GdipGetLinePresetBlendCount( - (GpLineGradient*) nativeBrush, &result)); - return result; - } - Status GetInterpolationColors(Color *presetColors, - REAL *blendPositions, INT count) const - { - if (!presetColors || count <= 0) - return lastStatus = InvalidParameter; - - ARGB *presetArgb = - (ARGB*) DllExports::GdipAlloc(count * sizeof(ARGB)); - if (!presetArgb) - return lastStatus = OutOfMemory; - - Status status = updateStatus(DllExports::GdipGetLinePresetBlend( - (GpLineGradient*) nativeBrush, presetArgb, - blendPositions, count)); - for (INT i = 0; i < count; ++i) { - presetColors[i].SetValue(presetArgb[i]); - } - DllExports::GdipFree((void*) presetArgb); - return status; - } - Status GetLinearColors(Color *colors) const - { - if (!colors) return lastStatus = InvalidParameter; - - ARGB colorsArgb[2]; - Status status = updateStatus(DllExports::GdipGetLineColors( - (GpLineGradient*) nativeBrush, colorsArgb)); - colors[0].SetValue(colorsArgb[0]); - colors[1].SetValue(colorsArgb[1]); - return status; - } - Status GetRectangle(RectF *rect) const - { - return updateStatus(DllExports::GdipGetLineRect( - (GpLineGradient*) nativeBrush, rect)); - } - Status GetRectangle(Rect *rect) const - { - return updateStatus(DllExports::GdipGetLineRectI( - (GpLineGradient*) nativeBrush, rect)); - } - Status GetTransform(Matrix *matrix) const - { - return updateStatus(DllExports::GdipGetLineTransform( - (GpLineGradient*) nativeBrush, - matrix ? matrix->nativeMatrix : NULL)); - } - WrapMode GetWrapMode() const - { - WrapMode wrapMode = WrapModeTile; - updateStatus(DllExports::GdipGetLineWrapMode( - (GpLineGradient*) nativeBrush, &wrapMode)); - return wrapMode; - } - Status MultiplyTransform(const Matrix *matrix, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipMultiplyLineTransform( - (GpLineGradient*) nativeBrush, - matrix ? matrix->nativeMatrix : NULL, order)); - } - Status ResetTransform() - { - return updateStatus(DllExports::GdipResetLineTransform( - (GpLineGradient*) nativeBrush)); - } - Status RotateTranform(REAL angle, MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipRotateLineTransform( - (GpLineGradient*) nativeBrush, angle, order)); - } - Status ScaleTransform(REAL sx, REAL sy, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipScaleLineTransform( - (GpLineGradient*) nativeBrush, sx, sy, order)); - } - Status SetBlend(const REAL *blendFactors, - const REAL *blendPositions, INT count) - { - return updateStatus(DllExports::GdipSetLineBlend( - (GpLineGradient*) nativeBrush, - blendFactors, blendPositions, count)); - } - Status SetBlendBellShape(REAL focus, REAL scale = 1.0f) - { - return updateStatus(DllExports::GdipSetLineSigmaBlend( - (GpLineGradient*) nativeBrush, - focus, scale)); - } - Status SetBlendTriangularShape(REAL focus, REAL scale = 1.0f) - { - return updateStatus(DllExports::GdipSetLineLinearBlend( - (GpLineGradient*) nativeBrush, - focus, scale)); - } - Status SetGammaCorrection(BOOL useGammaCorrection) - { - return updateStatus(DllExports::GdipSetLineGammaCorrection( - (GpLineGradient*) nativeBrush, - useGammaCorrection)); - } - Status SetInterpolationColors(const Color *presetColors, - const REAL *blendPositions, INT count) - { - if (!presetColors || count < 0) - return lastStatus = InvalidParameter; - - ARGB *presetArgb = - (ARGB*) DllExports::GdipAlloc(count * sizeof(ARGB)); - if (!presetArgb) - return lastStatus = OutOfMemory; - for (INT i = 0; i < count; ++i) { - presetArgb[i] = presetColors[i].GetValue(); - } - - Status status = updateStatus(DllExports::GdipSetLinePresetBlend( - (GpLineGradient*) nativeBrush, - presetArgb, blendPositions, count)); - DllExports::GdipFree((void*) presetArgb); - return status; - } - Status SetLinearColors(const Color& color1, const Color& color2) - { - return updateStatus(DllExports::GdipSetLineColors( - (GpLineGradient*) nativeBrush, - color1.GetValue(), color2.GetValue())); - } - Status SetTransform(const Matrix *matrix) - { - return updateStatus(DllExports::GdipSetLineTransform( - (GpLineGradient*) nativeBrush, - matrix ? matrix->nativeMatrix : NULL)); - } - Status SetWrapMode(WrapMode wrapMode) - { - return updateStatus(DllExports::GdipSetLineWrapMode( - (GpLineGradient*) nativeBrush, wrapMode)); - } - Status TranslateTransform(REAL dx, REAL dy, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipTranslateLineTransform( - (GpLineGradient*) nativeBrush, dx, dy, order)); - } - -private: - LinearGradientBrush(GpBrush *brush, Status status): Brush(brush, status) {} - LinearGradientBrush(const LinearGradientBrush& brush); - LinearGradientBrush& operator=(const LinearGradientBrush&); -}; - -class SolidBrush: public Brush -{ -public: - SolidBrush(const Color& color) - { - GpSolidFill *nativeSolidFill = NULL; - lastStatus = DllExports::GdipCreateSolidFill( - color.GetValue(), &nativeSolidFill); - nativeBrush = nativeSolidFill; - } - virtual SolidBrush* Clone() const - { - GpBrush *cloneBrush = NULL; - Status status = updateStatus(DllExports::GdipCloneBrush( - nativeBrush, &cloneBrush)); - if (status == Ok) { - SolidBrush *result = - new SolidBrush(cloneBrush, lastStatus); - if (!result) { - DllExports::GdipDeleteBrush(cloneBrush); - updateStatus(OutOfMemory); - } - return result; - } else { - return NULL; - } - } - - Status GetColor(Color *color) const - { - return updateStatus(DllExports::GdipGetSolidFillColor( - (GpSolidFill*) nativeBrush, - color ? &color->Value : NULL)); - } - Status SetColor(const Color& color) - { - return updateStatus(DllExports::GdipSetSolidFillColor( - (GpSolidFill*) nativeBrush, color.GetValue())); - } - -private: - SolidBrush(GpBrush *brush, Status status): Brush(brush, status) {} - SolidBrush(const SolidBrush&); - SolidBrush& operator=(const SolidBrush&); -}; - -class TextureBrush: public Brush -{ -public: - TextureBrush(Image *image, WrapMode wrapMode = WrapModeTile) - { - GpTexture *nativeTexture = NULL; - lastStatus = DllExports::GdipCreateTexture( - image ? image->nativeImage : NULL, - wrapMode, &nativeTexture); - nativeBrush = nativeTexture; - } - TextureBrush(Image *image, WrapMode wrapMode, - REAL dstX, REAL dstY, REAL dstWidth, REAL dstHeight) - { - GpTexture *nativeTexture = NULL; - lastStatus = DllExports::GdipCreateTexture2( - image ? image->nativeImage : NULL, - wrapMode, dstX, dstY, dstWidth, dstHeight, - &nativeTexture); - nativeBrush = nativeTexture; - } - TextureBrush(Image *image, WrapMode wrapMode, - INT dstX, INT dstY, INT dstWidth, INT dstHeight) - { - GpTexture *nativeTexture = NULL; - lastStatus = DllExports::GdipCreateTexture2I( - image ? image->nativeImage : NULL, - wrapMode, dstX, dstY, dstWidth, dstHeight, - &nativeTexture); - nativeBrush = nativeTexture; - } - TextureBrush(Image *image, WrapMode wrapMode, const RectF& dstRect) - { - GpTexture *nativeTexture = NULL; - lastStatus = DllExports::GdipCreateTexture2( - image ? image->nativeImage : NULL, wrapMode, - dstRect.X, dstRect.Y, - dstRect.Width, dstRect.Height, &nativeTexture); - nativeBrush = nativeTexture; - } - TextureBrush(Image *image, WrapMode wrapMode, const Rect& dstRect) - { - GpTexture *nativeTexture = NULL; - lastStatus = DllExports::GdipCreateTexture2I( - image ? image->nativeImage : NULL, wrapMode, - dstRect.X, dstRect.Y, - dstRect.Width, dstRect.Height, &nativeTexture); - nativeBrush = nativeTexture; - } - TextureBrush(Image *image, const RectF& dstRect, - ImageAttributes *imageAttributes = NULL) - { - GpTexture *nativeTexture = NULL; - lastStatus = DllExports::GdipCreateTextureIA( - image ? image->nativeImage : NULL, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL, - dstRect.X, dstRect.Y, - dstRect.Width, dstRect.Height, &nativeTexture); - nativeBrush = nativeTexture; - } - TextureBrush(Image *image, const Rect& dstRect, - ImageAttributes *imageAttributes = NULL) - { - GpTexture *nativeTexture = NULL; - lastStatus = DllExports::GdipCreateTextureIAI( - image ? image->nativeImage : NULL, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL, - dstRect.X, dstRect.Y, - dstRect.Width, dstRect.Height, &nativeTexture); - nativeBrush = nativeTexture; - } - virtual TextureBrush* Clone() const - { - GpBrush *cloneBrush = NULL; - Status status = updateStatus(DllExports::GdipCloneBrush( - nativeBrush, &cloneBrush)); - if (status == Ok) { - TextureBrush *result = - new TextureBrush(cloneBrush, lastStatus); - if (!result) { - DllExports::GdipDeleteBrush(cloneBrush); - updateStatus(OutOfMemory); - } - return result; - } else { - return NULL; - } - } - - //TODO: implement TextureBrush::GetImage() - //Image *GetImage() const - //{ - // // where is the Image allocated (static,member,new,other)? - // // GdipGetTextureImage just returns a GpImage* - // updateStatus(NotImplemented); - // return NULL; - //} - Status GetTransfrom(Matrix *matrix) const - { - return updateStatus(DllExports::GdipGetTextureTransform( - (GpTexture*) nativeBrush, - matrix ? matrix->nativeMatrix : NULL)); - } - WrapMode GetWrapMode() const - { - WrapMode result = WrapModeTile; - updateStatus(DllExports::GdipGetTextureWrapMode( - (GpTexture*) nativeBrush, &result)); - return result; - } - Status MultiplyTransform(const Matrix *matrix, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipMultiplyTextureTransform( - (GpTexture*) nativeBrush, - matrix ? matrix->nativeMatrix : NULL, order)); - } - Status ResetTransform() - { - return updateStatus(DllExports::GdipResetTextureTransform( - (GpTexture*) nativeBrush)); - } - Status RotateTransform(REAL angle, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipRotateTextureTransform( - (GpTexture*) nativeBrush, angle, order)); - } - Status ScaleTransform(REAL sx, REAL sy, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipScaleTextureTransform( - (GpTexture*) nativeBrush, sx, sy, order)); - } - Status SetTransform(const Matrix *matrix) - { - return updateStatus(DllExports::GdipSetTextureTransform( - (GpTexture*) nativeBrush, - matrix ? matrix->nativeMatrix : NULL)); - } - Status SetWrapMode(WrapMode wrapMode) - { - return updateStatus(DllExports::GdipSetTextureWrapMode( - (GpTexture*) nativeBrush, wrapMode)); - } - Status TranslateTransform(REAL dx, REAL dy, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipTranslateTextureTransform( - (GpTexture*) nativeBrush, dx, dy, order)); - } - -private: - TextureBrush(GpBrush *brush, Status status): Brush(brush, status) {} - TextureBrush(const TextureBrush&); - TextureBrush& operator=(const TextureBrush&); -}; - -#endif /* __GDIPLUS_BRUSH_H */ diff --git a/src/gdiplus4/gdipluscolor.h b/src/gdiplus4/gdipluscolor.h deleted file mode 100644 index 9f39e595..00000000 --- a/src/gdiplus4/gdipluscolor.h +++ /dev/null @@ -1,262 +0,0 @@ -/* - * gdipluscolor.h - * - * GDI+ color - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_COLOR_H -#define __GDIPLUS_COLOR_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -typedef enum ColorChannelFlags { - ColorChannelFlagsC = 0, - ColorChannelFlagsM = 1, - ColorChannelFlagsY = 2, - ColorChannelFlagsK = 3, - ColorChannelFlagsLast = 4 -} ColorChannelFlags; - -typedef struct Color -{ - #ifdef __cplusplus - private: - #endif - ARGB Value; - - #ifdef __cplusplus - public: - friend class Bitmap; - friend class Graphics; - friend class HatchBrush; - friend class PathGradientBrush; - friend class Pen; - friend class SolidBrush; - - static ARGB MakeARGB(BYTE a, BYTE r, BYTE g, BYTE b) - { - return (ARGB) ((((DWORD) a) << 24) | (((DWORD) r) << 16) - | (((DWORD) g) << 8) | ((DWORD) b)); - } - - static const ARGB AlphaMask = 0xFF000000UL; - - static const ARGB AliceBlue = 0xFFF0F8FFUL; - static const ARGB AntiqueWhite = 0xFFFAEBD7UL; - static const ARGB Aqua = 0xFF00FFFFUL; - static const ARGB Aquamarine = 0xFF7FFFD4UL; - static const ARGB Azure = 0xFFF0FFFFUL; - static const ARGB Beige = 0xFFF5F5DCUL; - static const ARGB Bisque = 0xFFFFE4C4UL; - static const ARGB Black = 0xFF000000UL; - static const ARGB BlanchedAlmond = 0xFFFFEBCDUL; - static const ARGB Blue = 0xFF0000FFUL; - static const ARGB BlueViolet = 0xFF8A2BE2UL; - static const ARGB Brown = 0xFFA52A2AUL; - static const ARGB BurlyWood = 0xFFDEB887UL; - static const ARGB CadetBlue = 0xFF5F9EA0UL; - static const ARGB Chartreuse = 0xFF7FFF00UL; - static const ARGB Chocolate = 0xFFD2691EUL; - static const ARGB Coral = 0xFFFF7F50UL; - static const ARGB CornflowerBlue = 0xFF6495EDUL; - static const ARGB Cornsilk = 0xFFFFF8DCUL; - static const ARGB Crimson = 0xFFDC143CUL; - static const ARGB Cyan = 0xFF00FFFFUL; - static const ARGB DarkBlue = 0xFF00008BUL; - static const ARGB DarkCyan = 0xFF008B8BUL; - static const ARGB DarkGoldenrod = 0xFFB8860BUL; - static const ARGB DarkGray = 0xFFA9A9A9UL; - static const ARGB DarkGreen = 0xFF006400UL; - static const ARGB DarkKhaki = 0xFFBDB76BUL; - static const ARGB DarkMagenta = 0xFF8B008BUL; - static const ARGB DarkOliveGreen = 0xFF556B2FUL; - static const ARGB DarkOrange = 0xFFFF8C00UL; - static const ARGB DarkOrchid = 0xFF9932CCUL; - static const ARGB DarkRed = 0xFF8B0000UL; - static const ARGB DarkSalmon = 0xFFE9967AUL; - static const ARGB DarkSeaGreen = 0xFF8FBC8FUL; - static const ARGB DarkSlateBlue = 0xFF483D8BUL; - static const ARGB DarkSlateGray = 0xFF2F4F4FUL; - static const ARGB DarkTurquoise = 0xFF00CED1UL; - static const ARGB DarkViolet = 0xFF9400D3UL; - static const ARGB DeepPink = 0xFFFF1493UL; - static const ARGB DeepSkyBlue = 0xFF00BFFFUL; - static const ARGB DimGray = 0xFF696969UL; - static const ARGB DodgerBlue = 0xFF1E90FFUL; - static const ARGB Firebrick = 0xFFB22222UL; - static const ARGB FloralWhite = 0xFFFFFAF0UL; - static const ARGB ForestGreen = 0xFF228B22UL; - static const ARGB Fuchsia = 0xFFFF00FFUL; - static const ARGB Gainsboro = 0xFFDCDCDCUL; - static const ARGB GhostWhite = 0xFFF8F8FFUL; - static const ARGB Gold = 0xFFFFD700UL; - static const ARGB Goldenrod = 0xFFDAA520UL; - static const ARGB Gray = 0xFF808080UL; - static const ARGB Green = 0xFF008000UL; - static const ARGB GreenYellow = 0xFFADFF2FUL; - static const ARGB Honeydew = 0xFFF0FFF0UL; - static const ARGB HotPink = 0xFFFF69B4UL; - static const ARGB IndianRed = 0xFFCD5C5CUL; - static const ARGB Indigo = 0xFF4B0082UL; - static const ARGB Ivory = 0xFFFFFFF0UL; - static const ARGB Khaki = 0xFFF0E68CUL; - static const ARGB Lavender = 0xFFE6E6FAUL; - static const ARGB LavenderBlush = 0xFFFFF0F5UL; - static const ARGB LawnGreen = 0xFF7CFC00UL; - static const ARGB LemonChiffon = 0xFFFFFACDUL; - static const ARGB LightBlue = 0xFFADD8E6UL; - static const ARGB LightCoral = 0xFFF08080UL; - static const ARGB LightCyan = 0xFFE0FFFFUL; - static const ARGB LightGoldenrodYellow = 0xFFFAFAD2UL; - static const ARGB LightGray = 0xFFD3D3D3UL; - static const ARGB LightGreen = 0xFF90EE90UL; - static const ARGB LightPink = 0xFFFFB6C1UL; - static const ARGB LightSalmon = 0xFFFFA07AUL; - static const ARGB LightSeaGreen = 0xFF20B2AAUL; - static const ARGB LightSkyBlue = 0xFF87CEFAUL; - static const ARGB LightSlateGray = 0xFF778899UL; - static const ARGB LightSteelBlue = 0xFFB0C4DEUL; - static const ARGB LightYellow = 0xFFFFFFE0UL; - static const ARGB Lime = 0xFF00FF00UL; - static const ARGB LimeGreen = 0xFF32CD32UL; - static const ARGB Linen = 0xFFFAF0E6UL; - static const ARGB Magenta = 0xFFFF00FFUL; - static const ARGB Maroon = 0xFF800000UL; - static const ARGB MediumAquamarine = 0xFF66CDAAUL; - static const ARGB MediumBlue = 0xFF0000CDUL; - static const ARGB MediumOrchid = 0xFFBA55D3UL; - static const ARGB MediumPurple = 0xFF9370DBUL; - static const ARGB MediumSeaGreen = 0xFF3CB371UL; - static const ARGB MediumSlateBlue = 0xFF7B68EEUL; - static const ARGB MediumSpringGreen = 0xFF00FA9AUL; - static const ARGB MediumTurquoise = 0xFF48D1CCUL; - static const ARGB MediumVioletRed = 0xFFC71585UL; - static const ARGB MidnightBlue = 0xFF191970UL; - static const ARGB MintCream = 0xFFF5FFFAUL; - static const ARGB MistyRose = 0xFFFFE4E1UL; - static const ARGB Moccasin = 0xFFFFE4B5UL; - static const ARGB NavajoWhite = 0xFFFFDEADUL; - static const ARGB Navy = 0xFF000080UL; - static const ARGB OldLace = 0xFFFDF5E6UL; - static const ARGB Olive = 0xFF808000UL; - static const ARGB OliveDrab = 0xFF6B8E23UL; - static const ARGB Orange = 0xFFFFA500UL; - static const ARGB OrangeRed = 0xFFFF4500UL; - static const ARGB Orchid = 0xFFDA70D6UL; - static const ARGB PaleGoldenrod = 0xFFEEE8AAUL; - static const ARGB PaleGreen = 0xFF98FB98UL; - static const ARGB PaleTurquoise = 0xFFAFEEEEUL; - static const ARGB PaleVioletRed = 0xFFDB7093UL; - static const ARGB PapayaWhip = 0xFFFFEFD5UL; - static const ARGB PeachPuff = 0xFFFFDAB9UL; - static const ARGB Peru = 0xFFCD853FUL; - static const ARGB Pink = 0xFFFFC0CBUL; - static const ARGB Plum = 0xFFDDA0DDUL; - static const ARGB PowderBlue = 0xFFB0E0E6UL; - static const ARGB Purple = 0xFF800080UL; - static const ARGB Red = 0xFFFF0000UL; - static const ARGB RosyBrown = 0xFFBC8F8FUL; - static const ARGB RoyalBlue = 0xFF4169E1UL; - static const ARGB SaddleBrown = 0xFF8B4513UL; - static const ARGB Salmon = 0xFFFA8072UL; - static const ARGB SandyBrown = 0xFFF4A460UL; - static const ARGB SeaGreen = 0xFF2E8B57UL; - static const ARGB SeaShell = 0xFFFFF5EEUL; - static const ARGB Sienna = 0xFFA0522DUL; - static const ARGB Silver = 0xFFC0C0C0UL; - static const ARGB SkyBlue = 0xFF87CEEBUL; - static const ARGB SlateBlue = 0xFF6A5ACDUL; - static const ARGB SlateGray = 0xFF708090UL; - static const ARGB Snow = 0xFFFFFAFAUL; - static const ARGB SpringGreen = 0xFF00FF7FUL; - static const ARGB SteelBlue = 0xFF4682B4UL; - static const ARGB Tan = 0xFFD2B48CUL; - static const ARGB Teal = 0xFF008080UL; - static const ARGB Thistle = 0xFFD8BFD8UL; - static const ARGB Tomato = 0xFFFF6347UL; - static const ARGB Transparent = 0x00FFFFFFUL; - static const ARGB Turquoise = 0xFF40E0D0UL; - static const ARGB Violet = 0xFFEE82EEUL; - static const ARGB Wheat = 0xFFF5DEB3UL; - static const ARGB White = 0xFFFFFFFFUL; - static const ARGB WhiteSmoke = 0xFFF5F5F5UL; - static const ARGB Yellow = 0xFFFFFF00UL; - static const ARGB YellowGreen = 0xFF9ACD32UL; - - Color(): Value(0xFF000000) {} - Color(ARGB argb): Value(argb) {} - Color(BYTE r, BYTE g, BYTE b): Value(MakeARGB(0xFF, r, g, b)) {} - Color(BYTE a, BYTE r, BYTE g, BYTE b): Value(MakeARGB(a, r, g, b)) {} - - BYTE GetA() const - { - return (BYTE) (Value >> 24); - } - BYTE GetAlpha() const - { - return (BYTE) (Value >> 24); - } - BYTE GetB() const - { - return (BYTE) Value; - } - BYTE GetBlue() const - { - return (BYTE) Value; - } - BYTE GetG() const - { - return (BYTE) (Value >> 8); - } - BYTE GetGreen() const - { - return (BYTE) (Value >> 8); - } - BYTE GetR() const - { - return (BYTE) (Value >> 16); - } - BYTE GetRed() const - { - return (BYTE) (Value >> 16); - } - ARGB GetValue() const - { - return Value; - } - VOID SetFromCOLORREF(COLORREF rgb) - { - BYTE r = (BYTE) rgb; - BYTE g = (BYTE) (rgb >> 8); - BYTE b = (BYTE) (rgb >> 16); - Value = MakeARGB(0xFF, r, g, b); - } - VOID SetValue(ARGB argb) - { - Value = argb; - } - COLORREF ToCOLORREF() const - { - return RGB(GetRed(), GetGreen(), GetBlue()); - } - #endif /* __cplusplus */ -} Color; - -#endif /* __GDIPLUS_COLOR_H */ diff --git a/src/gdiplus4/gdipluscolormatrix.h b/src/gdiplus4/gdipluscolormatrix.h deleted file mode 100644 index c01113dc..00000000 --- a/src/gdiplus4/gdipluscolormatrix.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * gdipluscolormatrix.h - * - * GDI+ color mappings - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_COLORMATRIX_H -#define __GDIPLUS_COLORMATRIX_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -typedef enum ColorAdjustType { - ColorAdjustTypeDefault = 0, - ColorAdjustTypeBitmap = 1, - ColorAdjustTypeBrush = 2, - ColorAdjustTypePen = 3, - ColorAdjustTypeText = 4, - ColorAdjustTypeCount = 5, - ColorAdjustTypeAny = 6 -} ColorAdjustType; - -typedef enum ColorMatrixFlags { - ColorMatrixFlagsDefault = 0, - ColorMatrixFlagsSkipGrays = 1, - ColorMatrixFlagsAltGray = 2 -} ColorMatrixFlags; - -typedef enum HistogramFormat { - HistogramFormatARGB = 0, - HistogramFormatPARGB = 1, - HistogramFormatRGB = 2, - HistogramFormatGray = 3, - HistogramFormatB = 4, - HistogramFormatG = 5, - HistogramFormatR = 6, - HistogramFormatA = 7 -} HistogramFormat; - -typedef struct ColorMap { - Color oldColor; - Color newColor; -} ColorMap; - -typedef struct ColorMatrix { - REAL m[5][5]; -} ColorMatrix; - -typedef BYTE ColorChannelLUT[256]; - -#endif /* __GDIPLUS_COLORMATRIX_H */ diff --git a/src/gdiplus4/gdipluseffects.h b/src/gdiplus4/gdipluseffects.h deleted file mode 100644 index 7f51aea8..00000000 --- a/src/gdiplus4/gdipluseffects.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - * gdipluseffects.h - * - * GDI+ filters and effects - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_EFFECTS_H -#define __GDIPLUS_EFFECTS_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -typedef enum CurveAdjustments { - AdjustExposure = 0, - AdjustDensity = 1, - AdjustContrast = 2, - AdjustHighlight = 3, - AdjustShadow = 4, - AdjustMidtone = 5, - AdjustWhiteSaturation = 6, - AdjustBlackSaturation = 7 -} CurveAdjustments; - -typedef enum CurveChannel { - CurveChannelAll = 0, - CurveChannelRed = 1, - CurveChannelGreen = 2, - CurveChannelBlue = 3 -} CurveChannel; - -typedef struct BlurParams { - REAL radius; - BOOL expandEdge; -} BlurParams; - -typedef struct BrightnessContrastParams { - INT brightnessLevel; - INT contrastLevel; -} BrightnessContrastParams; - -typedef struct ColorBalanceParams { - INT cyanRed; - INT magentaGreen; - INT yellowBlue; -} ColorBalanceParams; - -typedef struct ColorCurveParams { - CurveAdjustments adjustment; - CurveChannel channel; - INT adjustValue; -} ColorCurveParams; - -typedef struct ColorLUTParams { - ColorChannelLUT lutB; - ColorChannelLUT lutG; - ColorChannelLUT lutR; - ColorChannelLUT lutA; -} ColorLUTParams; - -typedef struct HueSaturationLightnessParams { - INT hueLevel; - INT saturationLevel; - INT lightnessLevel; -} HueSaturationLightnessParams; - -typedef struct LevelsParams { - INT highlight; - INT midtone; - INT shadow; -} LevelsParams; - -typedef struct RedEyeCorrectionParams { - UINT numberOfAreas; - RECT *areas; -} RedEyeCorrectionParams; - -typedef struct SharpenParams { - REAL radius; - REAL amount; -} SharpenParams; - -typedef struct TintParams { - INT hue; - INT amount; -} TintParams; - -extern const GUID BlurEffectGuid; /* ? */ -extern const GUID BrightnessContrastEffectGuid; /* ? */ -extern const GUID ColorBalanceEffectGuid; /* ? */ -extern const GUID ColorCurveEffectGuid; /* ? */ -extern const GUID ColorLUTEffectGuid; /* ? */ -extern const GUID ColorMatrixEffectGuid; /* ? */ -extern const GUID HueSaturationLightnessEffectGuid; /* ? */ -extern const GUID LevelsEffectGuid; /* ? */ -extern const GUID RedEyeCorrectionEffectGuid; /* ? */ -extern const GUID SharpenEffectGuid; /* ? */ -extern const GUID TintEffectGuid; /* ? */ - - -#endif /* __GDIPLUS_EFFECTS_H */ diff --git a/src/gdiplus4/gdiplusenums.h b/src/gdiplus4/gdiplusenums.h deleted file mode 100644 index e4e16563..00000000 --- a/src/gdiplus4/gdiplusenums.h +++ /dev/null @@ -1,755 +0,0 @@ -/* - * gdiplusenums.h - * - * GDI+ enumerations - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_ENUMS_H -#define __GDIPLUS_ENUMS_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -typedef enum BrushType { - BrushTypeSolidColor = 0, - BrushTypeHatchFill = 1, - BrushTypeTextureFill = 2, - BrushTypePathGradient = 3, - BrushTypeLinearGradient = 4 -} BrushType; - -typedef enum CombineMode { - CombineModeReplace = 0, - CombineModeIntersect = 1, - CombineModeUnion = 2, - CombineModeXor = 3, - CombineModeExclude = 4, - CombineModeComplement = 5 -} CombineMode; - -typedef enum CompositingMode { - CompositingModeSourceOver = 0, - CompositingModeSourceCopy = 1 -} CompositingMode; - -typedef enum CompositingQuality { - CompositingQualityDefault = 0, - CompositingQualityHighSpeed = 1, - CompositingQualityHighQuality = 2, - CompositingQualityGammaCorrected = 3, - CompositingQualityAssumeLinear = 4 -} CompositingQuality; - -typedef enum CoordinateSpace { - CoordinateSpaceWorld = 0, - CoordinateSpacePage = 1, - CoordinateSpaceDevice = 2 -} CoordinateSpace; - -typedef enum CustomLineCapType { - CustomLineCapTypeDefault = 0, - CustomLineCapTypeAdjustableArrow = 1 -} CustomLineCapType; - -typedef enum DashCap { - DashCapFlat = 0, - DashCapRound = 2, - DashCapTriangle = 3 -} DashCap; - -typedef enum DashStyle { - DashStyleSolid = 0, - DashStyleDash = 1, - DashStyleDot = 2, - DashStyleDashDot = 3, - DashStyleDashDotDot = 4, - DashStyleCustom = 5 -} DashStyle; - -typedef enum DitherType { - DitherTypeNone = 0, - DitherTypeSolid = 1, - DitherTypeOrdered4x4 = 2, - DitherTypeOrdered8x8 = 3, - DitherTypeOrdered16x16 = 4, - DitherTypeOrdered91x91 = 5, - DitherTypeSpiral4x4 = 6, - DitherTypeSpiral8x8 = 7, - DitherTypeDualSpiral4x4 = 8, - DitherTypeDualSpiral8x8 = 9, - DitherTypeErrorDiffusion = 10 -} DitherType; - -typedef enum DriverStringOptions { - DriverStringOptionsCmapLookup = 1, - DriverStringOptionsVertical = 2, - DriverStringOptionsRealizedAdvance = 4, - DriverStringOptionsLimitSubpixel = 8 -} DriverStringOptions; - -#define GDIP_WMF_RECORD_TO_EMFPLUS(meta) ((meta) | 0x10000) -#define GDIP_EMFPLUS_RECORD_BASE (0x4000) -typedef enum EmfPlusRecordType { - WmfRecordTypeSetBkColor = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETBKCOLOR), - WmfRecordTypeSetBkMode = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETBKMODE), - WmfRecordTypeSetMapMode = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETMAPMODE), - WmfRecordTypeSetROP2 = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETROP2), - WmfRecordTypeSetRelAbs = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETRELABS), - WmfRecordTypeSetPolyFillMode = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETPOLYFILLMODE), - WmfRecordTypeSetStretchBltMode = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETSTRETCHBLTMODE), - WmfRecordTypeSetTextCharExtra = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETTEXTCHAREXTRA), - WmfRecordTypeSetTextColor = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETTEXTCOLOR), - WmfRecordTypeSetTextJustification = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETTEXTJUSTIFICATION), - WmfRecordTypeSetWindowOrg = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETWINDOWORG), - WmfRecordTypeSetWindowExt = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETWINDOWEXT), - WmfRecordTypeSetViewportOrg = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETVIEWPORTORG), - WmfRecordTypeSetViewportExt = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETVIEWPORTEXT), - WmfRecordTypeOffsetWindowOrg = GDIP_WMF_RECORD_TO_EMFPLUS(META_OFFSETWINDOWORG), - WmfRecordTypeScaleWindowExt = GDIP_WMF_RECORD_TO_EMFPLUS(META_SCALEWINDOWEXT), - WmfRecordTypeOffsetViewportOrg = GDIP_WMF_RECORD_TO_EMFPLUS(META_OFFSETVIEWPORTORG), - WmfRecordTypeScaleViewportExt = GDIP_WMF_RECORD_TO_EMFPLUS(META_SCALEVIEWPORTEXT), - WmfRecordTypeLineTo = GDIP_WMF_RECORD_TO_EMFPLUS(META_LINETO), - WmfRecordTypeMoveTo = GDIP_WMF_RECORD_TO_EMFPLUS(META_MOVETO), - WmfRecordTypeExcludeClipRect = GDIP_WMF_RECORD_TO_EMFPLUS(META_EXCLUDECLIPRECT), - WmfRecordTypeIntersectClipRect = GDIP_WMF_RECORD_TO_EMFPLUS(META_INTERSECTCLIPRECT), - WmfRecordTypeArc = GDIP_WMF_RECORD_TO_EMFPLUS(META_ARC), - WmfRecordTypeEllipse = GDIP_WMF_RECORD_TO_EMFPLUS(META_ELLIPSE), - WmfRecordTypeFloodFill = GDIP_WMF_RECORD_TO_EMFPLUS(META_FLOODFILL), - WmfRecordTypePie = GDIP_WMF_RECORD_TO_EMFPLUS(META_PIE), - WmfRecordTypeRectangle = GDIP_WMF_RECORD_TO_EMFPLUS(META_RECTANGLE), - WmfRecordTypeRoundRect = GDIP_WMF_RECORD_TO_EMFPLUS(META_ROUNDRECT), - WmfRecordTypePatBlt = GDIP_WMF_RECORD_TO_EMFPLUS(META_PATBLT), - WmfRecordTypeSaveDC = GDIP_WMF_RECORD_TO_EMFPLUS(META_SAVEDC), - WmfRecordTypeSetPixel = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETPIXEL), - WmfRecordTypeOffsetClipRgn = GDIP_WMF_RECORD_TO_EMFPLUS(META_OFFSETCLIPRGN), - WmfRecordTypeTextOut = GDIP_WMF_RECORD_TO_EMFPLUS(META_TEXTOUT), - WmfRecordTypeBitBlt = GDIP_WMF_RECORD_TO_EMFPLUS(META_BITBLT), - WmfRecordTypeStretchBlt = GDIP_WMF_RECORD_TO_EMFPLUS(META_STRETCHBLT), - WmfRecordTypePolygon = GDIP_WMF_RECORD_TO_EMFPLUS(META_POLYGON), - WmfRecordTypePolyline = GDIP_WMF_RECORD_TO_EMFPLUS(META_POLYLINE), - WmfRecordTypeEscape = GDIP_WMF_RECORD_TO_EMFPLUS(META_ESCAPE), - WmfRecordTypeRestoreDC = GDIP_WMF_RECORD_TO_EMFPLUS(META_RESTOREDC), - WmfRecordTypeFillRegion = GDIP_WMF_RECORD_TO_EMFPLUS(META_FILLREGION), - WmfRecordTypeFrameRegion = GDIP_WMF_RECORD_TO_EMFPLUS(META_FRAMEREGION), - WmfRecordTypeInvertRegion = GDIP_WMF_RECORD_TO_EMFPLUS(META_INVERTREGION), - WmfRecordTypePaintRegion = GDIP_WMF_RECORD_TO_EMFPLUS(META_PAINTREGION), - WmfRecordTypeSelectClipRegion = GDIP_WMF_RECORD_TO_EMFPLUS(META_SELECTCLIPREGION), - WmfRecordTypeSelectObject = GDIP_WMF_RECORD_TO_EMFPLUS(META_SELECTOBJECT), - WmfRecordTypeSetTextAlign = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETTEXTALIGN), - WmfRecordTypeDrawText = GDIP_WMF_RECORD_TO_EMFPLUS(0x062F), - WmfRecordTypeChord = GDIP_WMF_RECORD_TO_EMFPLUS(META_CHORD), - WmfRecordTypeSetMapperFlags = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETMAPPERFLAGS), - WmfRecordTypeExtTextOut = GDIP_WMF_RECORD_TO_EMFPLUS(META_EXTTEXTOUT), - WmfRecordTypeSetDIBToDev = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETDIBTODEV), - WmfRecordTypeSelectPalette = GDIP_WMF_RECORD_TO_EMFPLUS(META_SELECTPALETTE), - WmfRecordTypeRealizePalette = GDIP_WMF_RECORD_TO_EMFPLUS(META_REALIZEPALETTE), - WmfRecordTypeAnimatePalette = GDIP_WMF_RECORD_TO_EMFPLUS(META_ANIMATEPALETTE), - WmfRecordTypeSetPalEntries = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETPALENTRIES), - WmfRecordTypePolyPolygon = GDIP_WMF_RECORD_TO_EMFPLUS(META_POLYPOLYGON), - WmfRecordTypeResizePalette = GDIP_WMF_RECORD_TO_EMFPLUS(META_RESIZEPALETTE), - WmfRecordTypeDIBBitBlt = GDIP_WMF_RECORD_TO_EMFPLUS(META_DIBBITBLT), - WmfRecordTypeDIBStretchBlt = GDIP_WMF_RECORD_TO_EMFPLUS(META_DIBSTRETCHBLT), - WmfRecordTypeDIBCreatePatternBrush = GDIP_WMF_RECORD_TO_EMFPLUS(META_DIBCREATEPATTERNBRUSH), - WmfRecordTypeStretchDIB = GDIP_WMF_RECORD_TO_EMFPLUS(META_STRETCHDIB), - WmfRecordTypeExtFloodFill = GDIP_WMF_RECORD_TO_EMFPLUS(META_EXTFLOODFILL), - WmfRecordTypeSetLayout = GDIP_WMF_RECORD_TO_EMFPLUS(0x0149), - WmfRecordTypeResetDC = GDIP_WMF_RECORD_TO_EMFPLUS(0x014C), - WmfRecordTypeStartDoc = GDIP_WMF_RECORD_TO_EMFPLUS(0x014D), - WmfRecordTypeStartPage = GDIP_WMF_RECORD_TO_EMFPLUS(0x004F), - WmfRecordTypeEndPage = GDIP_WMF_RECORD_TO_EMFPLUS(0x0050), - WmfRecordTypeAbortDoc = GDIP_WMF_RECORD_TO_EMFPLUS(0x0052), - WmfRecordTypeEndDoc = GDIP_WMF_RECORD_TO_EMFPLUS(0x005E), - WmfRecordTypeDeleteObject = GDIP_WMF_RECORD_TO_EMFPLUS(META_DELETEOBJECT), - WmfRecordTypeCreatePalette = GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEPALETTE), - WmfRecordTypeCreateBrush = GDIP_WMF_RECORD_TO_EMFPLUS(0x00F8), - WmfRecordTypeCreatePatternBrush = GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEPATTERNBRUSH), - WmfRecordTypeCreatePenIndirect = GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEPENINDIRECT), - WmfRecordTypeCreateFontIndirect = GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEFONTINDIRECT), - WmfRecordTypeCreateBrushIndirect = GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEBRUSHINDIRECT), - WmfRecordTypeCreateBitmapIndirect = GDIP_WMF_RECORD_TO_EMFPLUS(0x02FD), - WmfRecordTypeCreateBitmap = GDIP_WMF_RECORD_TO_EMFPLUS(0x06FE), - WmfRecordTypeCreateRegion = GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEREGION), - EmfRecordTypeHeader = EMR_HEADER, - EmfRecordTypePolyBezier = EMR_POLYBEZIER, - EmfRecordTypePolygon = EMR_POLYGON, - EmfRecordTypePolyline = EMR_POLYLINE, - EmfRecordTypePolyBezierTo = EMR_POLYBEZIERTO, - EmfRecordTypePolyLineTo = EMR_POLYLINETO, - EmfRecordTypePolyPolyline = EMR_POLYPOLYLINE, - EmfRecordTypePolyPolygon = EMR_POLYPOLYGON, - EmfRecordTypeSetWindowExtEx = EMR_SETWINDOWEXTEX, - EmfRecordTypeSetWindowOrgEx = EMR_SETWINDOWORGEX, - EmfRecordTypeSetViewportExtEx = EMR_SETVIEWPORTEXTEX, - EmfRecordTypeSetViewportOrgEx = EMR_SETVIEWPORTORGEX, - EmfRecordTypeSetBrushOrgEx = EMR_SETBRUSHORGEX, - EmfRecordTypeEOF = EMR_EOF, - EmfRecordTypeSetPixelV = EMR_SETPIXELV, - EmfRecordTypeSetMapperFlags = EMR_SETMAPPERFLAGS, - EmfRecordTypeSetMapMode = EMR_SETMAPMODE, - EmfRecordTypeSetBkMode = EMR_SETBKMODE, - EmfRecordTypeSetPolyFillMode = EMR_SETPOLYFILLMODE, - EmfRecordTypeSetROP2 = EMR_SETROP2, - EmfRecordTypeSetStretchBltMode = EMR_SETSTRETCHBLTMODE, - EmfRecordTypeSetTextAlign = EMR_SETTEXTALIGN, - EmfRecordTypeSetColorAdjustment = EMR_SETCOLORADJUSTMENT, - EmfRecordTypeSetTextColor = EMR_SETTEXTCOLOR, - EmfRecordTypeSetBkColor = EMR_SETBKCOLOR, - EmfRecordTypeOffsetClipRgn = EMR_OFFSETCLIPRGN, - EmfRecordTypeMoveToEx = EMR_MOVETOEX, - EmfRecordTypeSetMetaRgn = EMR_SETMETARGN, - EmfRecordTypeExcludeClipRect = EMR_EXCLUDECLIPRECT, - EmfRecordTypeIntersectClipRect = EMR_INTERSECTCLIPRECT, - EmfRecordTypeScaleViewportExtEx = EMR_SCALEVIEWPORTEXTEX, - EmfRecordTypeScaleWindowExtEx = EMR_SCALEWINDOWEXTEX, - EmfRecordTypeSaveDC = EMR_SAVEDC, - EmfRecordTypeRestoreDC = EMR_RESTOREDC, - EmfRecordTypeSetWorldTransform = EMR_SETWORLDTRANSFORM, - EmfRecordTypeModifyWorldTransform = EMR_MODIFYWORLDTRANSFORM, - EmfRecordTypeSelectObject = EMR_SELECTOBJECT, - EmfRecordTypeCreatePen = EMR_CREATEPEN, - EmfRecordTypeCreateBrushIndirect = EMR_CREATEBRUSHINDIRECT, - EmfRecordTypeDeleteObject = EMR_DELETEOBJECT, - EmfRecordTypeAngleArc = EMR_ANGLEARC, - EmfRecordTypeEllipse = EMR_ELLIPSE, - EmfRecordTypeRectangle = EMR_RECTANGLE, - EmfRecordTypeRoundRect = EMR_ROUNDRECT, - EmfRecordTypeArc = EMR_ARC, - EmfRecordTypeChord = EMR_CHORD, - EmfRecordTypePie = EMR_PIE, - EmfRecordTypeSelectPalette = EMR_SELECTPALETTE, - EmfRecordTypeCreatePalette = EMR_CREATEPALETTE, - EmfRecordTypeSetPaletteEntries = EMR_SETPALETTEENTRIES, - EmfRecordTypeResizePalette = EMR_RESIZEPALETTE, - EmfRecordTypeRealizePalette = EMR_REALIZEPALETTE, - EmfRecordTypeExtFloodFill = EMR_EXTFLOODFILL, - EmfRecordTypeLineTo = EMR_LINETO, - EmfRecordTypeArcTo = EMR_ARCTO, - EmfRecordTypePolyDraw = EMR_POLYDRAW, - EmfRecordTypeSetArcDirection = EMR_SETARCDIRECTION, - EmfRecordTypeSetMiterLimit = EMR_SETMITERLIMIT, - EmfRecordTypeBeginPath = EMR_BEGINPATH, - EmfRecordTypeEndPath = EMR_ENDPATH, - EmfRecordTypeCloseFigure = EMR_CLOSEFIGURE, - EmfRecordTypeFillPath = EMR_FILLPATH, - EmfRecordTypeStrokeAndFillPath = EMR_STROKEANDFILLPATH, - EmfRecordTypeStrokePath = EMR_STROKEPATH, - EmfRecordTypeFlattenPath = EMR_FLATTENPATH, - EmfRecordTypeWidenPath = EMR_WIDENPATH, - EmfRecordTypeSelectClipPath = EMR_SELECTCLIPPATH, - EmfRecordTypeAbortPath = EMR_ABORTPATH, - EmfRecordTypeReserved_069 = 69, - EmfRecordTypeGdiComment = EMR_GDICOMMENT, - EmfRecordTypeFillRgn = EMR_FILLRGN, - EmfRecordTypeFrameRgn = EMR_FRAMERGN, - EmfRecordTypeInvertRgn = EMR_INVERTRGN, - EmfRecordTypePaintRgn = EMR_PAINTRGN, - EmfRecordTypeExtSelectClipRgn = EMR_EXTSELECTCLIPRGN, - EmfRecordTypeBitBlt = EMR_BITBLT, - EmfRecordTypeStretchBlt = EMR_STRETCHBLT, - EmfRecordTypeMaskBlt = EMR_MASKBLT, - EmfRecordTypePlgBlt = EMR_PLGBLT, - EmfRecordTypeSetDIBitsToDevice = EMR_SETDIBITSTODEVICE, - EmfRecordTypeStretchDIBits = EMR_STRETCHDIBITS, - EmfRecordTypeExtCreateFontIndirect = EMR_EXTCREATEFONTINDIRECTW, - EmfRecordTypeExtTextOutA = EMR_EXTTEXTOUTA, - EmfRecordTypeExtTextOutW = EMR_EXTTEXTOUTW, - EmfRecordTypePolyBezier16 = EMR_POLYBEZIER16, - EmfRecordTypePolygon16 = EMR_POLYGON16, - EmfRecordTypePolyline16 = EMR_POLYLINE16, - EmfRecordTypePolyBezierTo16 = EMR_POLYBEZIERTO16, - EmfRecordTypePolylineTo16 = EMR_POLYLINETO16, - EmfRecordTypePolyPolyline16 = EMR_POLYPOLYLINE16, - EmfRecordTypePolyPolygon16 = EMR_POLYPOLYGON16, - EmfRecordTypePolyDraw16 = EMR_POLYDRAW16, - EmfRecordTypeCreateMonoBrush = EMR_CREATEMONOBRUSH, - EmfRecordTypeCreateDIBPatternBrushPt = EMR_CREATEDIBPATTERNBRUSHPT, - EmfRecordTypeExtCreatePen = EMR_EXTCREATEPEN, - EmfRecordTypePolyTextOutA = EMR_POLYTEXTOUTA, - EmfRecordTypePolyTextOutW = EMR_POLYTEXTOUTW, - EmfRecordTypeSetICMMode = 98, - EmfRecordTypeCreateColorSpace = 99, - EmfRecordTypeSetColorSpace = 100, - EmfRecordTypeDeleteColorSpace = 101, - EmfRecordTypeGLSRecord = 102, - EmfRecordTypeGLSBoundedRecord = 103, - EmfRecordTypePixelFormat = 104, - EmfRecordTypeDrawEscape = 105, - EmfRecordTypeExtEscape = 106, - EmfRecordTypeStartDoc = 107, - EmfRecordTypeSmallTextOut = 108, - EmfRecordTypeForceUFIMapping = 109, - EmfRecordTypeNamedEscape = 110, - EmfRecordTypeColorCorrectPalette = 111, - EmfRecordTypeSetICMProfileA = 112, - EmfRecordTypeSetICMProfileW = 113, - EmfRecordTypeAlphaBlend = 114, - EmfRecordTypeSetLayout = 115, - EmfRecordTypeTransparentBlt = 116, - EmfRecordTypeReserved_117 = 117, - EmfRecordTypeGradientFill = 118, - EmfRecordTypeSetLinkedUFIs = 119, - EmfRecordTypeSetTextJustification = 120, - EmfRecordTypeColorMatchToTargetW = 121, - EmfRecordTypeCreateColorSpaceW = 122, - EmfRecordTypeMax = 122, - EmfRecordTypeMin = 1, - EmfPlusRecordTypeInvalid = GDIP_EMFPLUS_RECORD_BASE, - EmfPlusRecordTypeHeader, - EmfPlusRecordTypeEndOfFile, - EmfPlusRecordTypeComment, - EmfPlusRecordTypeGetDC, - EmfPlusRecordTypeMultiFormatStart, - EmfPlusRecordTypeMultiFormatSection, - EmfPlusRecordTypeMultiFormatEnd, - EmfPlusRecordTypeObject, - EmfPlusRecordTypeClear, - EmfPlusRecordTypeFillRects, - EmfPlusRecordTypeDrawRects, - EmfPlusRecordTypeFillPolygon, - EmfPlusRecordTypeDrawLines, - EmfPlusRecordTypeFillEllipse, - EmfPlusRecordTypeDrawEllipse, - EmfPlusRecordTypeFillPie, - EmfPlusRecordTypeDrawPie, - EmfPlusRecordTypeDrawArc, - EmfPlusRecordTypeFillRegion, - EmfPlusRecordTypeFillPath, - EmfPlusRecordTypeDrawPath, - EmfPlusRecordTypeFillClosedCurve, - EmfPlusRecordTypeDrawClosedCurve, - EmfPlusRecordTypeDrawCurve, - EmfPlusRecordTypeDrawBeziers, - EmfPlusRecordTypeDrawImage, - EmfPlusRecordTypeDrawImagePoints, - EmfPlusRecordTypeDrawString, - EmfPlusRecordTypeSetRenderingOrigin, - EmfPlusRecordTypeSetAntiAliasMode, - EmfPlusRecordTypeSetTextRenderingHint, - EmfPlusRecordTypeSetTextContrast, - EmfPlusRecordTypeSetGammaValue, - EmfPlusRecordTypeSetInterpolationMode, - EmfPlusRecordTypeSetPixelOffsetMode, - EmfPlusRecordTypeSetCompositingMode, - EmfPlusRecordTypeSetCompositingQuality, - EmfPlusRecordTypeSave, - EmfPlusRecordTypeRestore, - EmfPlusRecordTypeBeginContainer, - EmfPlusRecordTypeBeginContainerNoParams, - EmfPlusRecordTypeEndContainer, - EmfPlusRecordTypeSetWorldTransform, - EmfPlusRecordTypeResetWorldTransform, - EmfPlusRecordTypeMultiplyWorldTransform, - EmfPlusRecordTypeTranslateWorldTransform, - EmfPlusRecordTypeScaleWorldTransform, - EmfPlusRecordTypeRotateWorldTransform, - EmfPlusRecordTypeSetPageTransform, - EmfPlusRecordTypeResetClip, - EmfPlusRecordTypeSetClipRect, - EmfPlusRecordTypeSetClipPath, - EmfPlusRecordTypeSetClipRegion, - EmfPlusRecordTypeOffsetClip, - EmfPlusRecordTypeDrawDriverString, - EmfPlusRecordTypeStrokeFillPath, - EmfPlusRecordTypeSerializableObject, - EmfPlusRecordTypeSetTSGraphics, - EmfPlusRecordTypeSetTSClip, - EmfPlusRecordTotal, - EmfPlusRecordTypeMax = EmfPlusRecordTotal-1, - EmfPlusRecordTypeMin = EmfPlusRecordTypeHeader -} EmfPlusRecordType; - -typedef enum EmfToWmfBitsFlags { - EmfToWmfBitsFlagsDefault = 0, - EmfToWmfBitsFlagsEmbedEmf = 1, - EmfToWmfBitsFlagsIncludePlaceable = 2, - EmfToWmfBitsFlagsNoXORClip = 4 -} EmfToWmfBitsFlags; - -typedef enum EmfType { - EmfTypeEmfOnly = 3, - EmfTypeEmfPlusOnly = 4, - EmfTypeEmfPlusDual = 5 -} EmfType; - -typedef enum EncoderParameterValueType { - EncoderParameterValueTypeByte = 1, - EncoderParameterValueTypeASCII = 2, - EncoderParameterValueTypeShort = 3, - EncoderParameterValueTypeLong = 4, - EncoderParameterValueTypeRational = 5, - EncoderParameterValueTypeLongRange = 6, - EncoderParameterValueTypeUndefined = 7, - EncoderParameterValueTypeRationalRange = 8, - EncoderParameterValueTypePointer = 9 -} EncoderParameterValueType; - -typedef enum EncoderValue { - EncoderValueColorTypeCMYK = 0, - EncoderValueColorTypeYCCK = 1, - EncoderValueCompressionLZW = 2, - EncoderValueCompressionCCITT3 = 3, - EncoderValueCompressionCCITT4 = 4, - EncoderValueCompressionRle = 5, - EncoderValueCompressionNone = 6, - EncoderValueScanMethodInterlaced = 7, - EncoderValueScanMethodNonInterlaced = 8, - EncoderValueVersionGif87 = 9, - EncoderValueVersionGif89 = 10, - EncoderValueRenderProgressive = 11, - EncoderValueRenderNonProgressive = 12, - EncoderValueTransformRotate90 = 13, - EncoderValueTransformRotate180 = 14, - EncoderValueTransformRotate270 = 15, - EncoderValueTransformFlipHorizontal = 16, - EncoderValueTransformFlipVertical = 17, - EncoderValueMultiFrame = 18, - EncoderValueLastFrame = 19, - EncoderValueFlush = 20, - EncoderValueFrameDimensionTime = 21, - EncoderValueFrameDimensionResolution = 22, - EncoderValueFrameDimensionPage = 23 -} EncoderValue; - -typedef enum FillMode { - FillModeAlternate = 0, - FillModeWinding = 1 -} FillMode; - -typedef enum FlushIntention { - FlushIntentionFlush = 0, - FlushIntentionSync = 1 -} FlushIntention; - -typedef enum FontStyle { - FontStyleRegular = 0, - FontStyleBold = 1, - FontStyleItalic = 2, - FontStyleBoldItalic = 3, - FontStyleUnderline = 4, - FontStyleStrikeout = 8 -} FontStyle; - -typedef enum HatchStyle { - HatchStyleHorizontal = 0, - HatchStyleVertical = 1, - HatchStyleForwardDiagonal = 2, - HatchStyleBackwardDiagonal = 3, - HatchStyleCross = 4, - HatchStyleLargeGrid = 4, - HatchStyleDiagonalCross = 5, - HatchStyle05Percent = 6, - HatchStyle10Percent = 7, - HatchStyle20Percent = 8, - HatchStyle25Percent = 9, - HatchStyle30Percent = 10, - HatchStyle40Percent = 11, - HatchStyle50Percent = 12, - HatchStyle60Percent = 13, - HatchStyle70Percent = 14, - HatchStyle75Percent = 15, - HatchStyle80Percent = 16, - HatchStyle90Percent = 17, - HatchStyleLightDownwardDiagonal = 18, - HatchStyleLightUpwardDiagonal = 19, - HatchStyleDarkDownwardDiagonal = 20, - HatchStyleDarkUpwardDiagonal = 21, - HatchStyleWideDownwardDiagonal = 22, - HatchStyleWideUpwardDiagonal = 23, - HatchStyleLightVertical = 24, - HatchStyleLightHorizontal = 25, - HatchStyleNarrowVertical = 26, - HatchStyleNarrowHorizontal = 27, - HatchStyleDarkVertical = 28, - HatchStyleDarkHorizontal = 29, - HatchStyleDashedDownwardDiagonal = 30, - HatchStyleDashedUpwardDiagonal = 31, - HatchStyleDashedHorizontal = 32, - HatchStyleDashedVertical = 33, - HatchStyleSmallConfetti = 34, - HatchStyleLargeConfetti = 35, - HatchStyleZigZag = 36, - HatchStyleWave = 37, - HatchStyleDiagonalBrick = 38, - HatchStyleHorizontalBrick = 39, - HatchStyleWeave = 40, - HatchStylePlaid = 41, - HatchStyleDivot = 42, - HatchStyleDottedGrid = 43, - HatchStyleDottedDiamond = 44, - HatchStyleShingle = 45, - HatchStyleTrellis = 46, - HatchStyleSphere = 47, - HatchStyleSmallGrid = 48, - HatchStyleSmallCheckerBoard = 49, - HatchStyleLargeCheckerBoard = 50, - HatchStyleOutlinedDiamond = 51, - HatchStyleSolidDiamond = 52, - HatchStyleTotal = 53, - HatchStyleMin = HatchStyleHorizontal, - HatchStyleMax = HatchStyleTotal - 1 -} HatchStyle; - -typedef enum HotkeyPrefix { - HotkeyPrefixNone = 0, - HotkeyPrefixShow = 1, - HotkeyPrefixHide = 2 -} HotkeyPrefix; - -typedef enum ImageType { - ImageTypeUnknown = 0, - ImageTypeBitmap = 1, - ImageTypeMetafile = 2 -} ImageType; - -/* TODO: InterpolationMode */ -typedef enum InterpolationMode { - /*InterpolationModeInvalid = QualityModeInvalid,*/ - InterpolationModeDefault = 0, - InterpolationModeLowQuality = 1, - InterpolationModeHighQuality = 2, - InterpolationModeBilinear = 3, - InterpolationModeBicubic = 4, - InterpolationModeNearestNeighbor = 5, - InterpolationModeHighQualityBilinear = 6, - InterpolationModeHighQualityBicubic = 7 -} InterpolationMode; - -typedef enum LinearGradientMode { - LinearGradientModeHorizontal = 0, - LinearGradientModeVertical = 1, - LinearGradientModeForwardDiagonal = 2, - LinearGradientModeBackwardDiagonal = 3 -} LinearGradientMode; - -typedef enum LineCap { - LineCapFlat = 0, - LineCapSquare = 1, - LineCapRound = 2, - LineCapTriangle = 3, - LineCapNoAnchor = 16, - LineCapSquareAnchor = 17, - LineCapRoundAnchor = 18, - LineCapDiamondAnchor = 19, - LineCapArrowAnchor = 20, - LineCapCustom = 255 -} LineCap; - -typedef enum LineJoin { - LineJoinMiter = 0, - LineJoinBevel = 1, - LineJoinRound = 2, - LineJoinMiterClipped = 3 -} LineJoin; - -typedef enum MatrixOrder { - MatrixOrderPrepend = 0, - MatrixOrderAppend = 1 -} MatrixOrder; - -typedef enum MetafileFrameUnit { - MetafileFrameUnitPixel = 2, - MetafileFrameUnitPoint = 3, - MetafileFrameUnitInch = 4, - MetafileFrameUnitDocument = 5, - MetafileFrameUnitMillimeter = 6, - MetafileFrameUnitGdi = 7 -} MetafileFrameUnit; - -typedef enum MetafileType { - MetafileTypeInvalid = 0, - MetafileTypeWmf = 1, - MetafileTypeWmfPlaceable = 2, - MetafileTypeEmf = 3, - MetafileTypeEmfPlusOnly = 4, - MetafileTypeEmfPlusDual = 5 -} MetafileType; - -typedef enum ObjectType { - ObjectTypeInvalid = 0, - ObjectTypeBrush = 1, - ObjectTypePen = 2, - ObjectTypePath = 3, - ObjectTypeRegion = 4, - ObjectTypeFont = 5, - ObjectTypeStringFormat = 6, - ObjectTypeImageAttributes = 7, - ObjectTypeCustomLineCap = 8, - ObjectTypeGraphics = 9, - ObjectTypeMin = ObjectTypeBrush, - ObjectTypeMax = ObjectTypeGraphics -} ObjectType; - -typedef enum PathPointType { - PathPointTypeStart = 0x00, - PathPointTypeLine = 0x01, - PathPointTypeBezier = 0x03, - PathPointTypeBezier3 = 0x03, - PathPointTypePathTypeMask = 0x07, - PathPointTypePathDashMode = 0x10, - PathPointTypePathMarker = 0x20, - PathPointTypeCloseSubpath = 0x80 -} PathPointType; - -typedef enum PenAlignment { - PenAlignmentCenter = 0, - PenAlignmentInset = 1 -} PenAlignment; - -typedef enum PenType { - PenTypeUnknown = -1, - PenTypeSolidColor = 0, - PenTypeHatchFill = 1, - PenTypeTextureFill = 2, - PenTypePathGradient = 3, - PenTypeLinearGradient = 4 -} PenType; - -/* TODO: PixelOffsetMode */ -typedef enum PixelOffsetMode { - /*PixelOffsetModeInvalid = QualityModeInvalid,*/ - PixelOffsetModeDefault = 0, - PixelOffsetModeHighSpeed = 1, - PixelOffsetModeHighQuality = 2, - PixelOffsetModeNone = 3, - PixelOffsetModeHalf = 4 -} PixelOffsetMode; - -/* TODO: QualityMode */ -typedef enum QualityMode { - /*QualityModeInvalid = ?,*/ - QualityModeDefault = 0, - QualityModeLow = 1, - QualityModeHigh = 2 -} QualityMode; - -/* TODO: SmoothingMode */ -typedef enum SmoothingMode { - /*SmoothingModeInvalid = QualityModeInvalid,*/ - SmoothingModeDefault = 0, - SmoothingModeHighSpeed = 1, - SmoothingModeHighQuality = 2, - SmoothingModeNone = 3, - SmoothingModeAntiAlias8x4 = 4, - SmoothingModeAntiAlias = 4, - SmoothingModeAntiAlias8x8 = 5 -} SmoothingMode; - -typedef enum StringAlignment { - StringAlignmentNear = 0, - StringAlignmentCenter = 1, - StringAlignmentFar = 2 -} StringAlignment; - -typedef enum StringDigitSubstitute { - StringDigitSubstituteUser = 0, - StringDigitSubstituteNone = 1, - StringDigitSubstituteNational = 2, - StringDigitSubstituteTraditional = 3 -} StringDigitSubstitute; - -typedef enum StringFormatFlags { - StringFormatFlagsDirectionRightToLeft = 0x00000001, - StringFormatFlagsDirectionVertical = 0x00000002, - StringFormatFlagsNoFitBlackBox = 0x00000004, - StringFormatFlagsDisplayFormatControl = 0x00000020, - StringFormatFlagsNoFontFallback = 0x00000400, - StringFormatFlagsMeasureTrailingSpaces = 0x00000800, - StringFormatFlagsNoWrap = 0x00001000, - StringFormatFlagsLineLimit = 0x00002000, - StringFormatFlagsNoClip = 0x00004000 -} StringFormatFlags; - -typedef enum StringTrimming { - StringTrimmingNone = 0, - StringTrimmingCharacter = 1, - StringTrimmingWord = 2, - StringTrimmingEllipsisCharacter = 3, - StringTrimmingEllipsisWord = 4, - StringTrimmingEllipsisPath = 5 -} StringTrimming; - -typedef enum TextRenderingHint { - TextRenderingHintSystemDefault = 0, - TextRenderingHintSingleBitPerPixelGridFit = 1, - TextRenderingHintSingleBitPerPixel = 2, - TextRenderingHintAntiAliasGridFit = 3, - TextRenderingHintAntiAlias = 4, - TextRenderingHintClearTypeGridFit = 5 -} TextRenderingHint; - -typedef enum Unit { - UnitWorld = 0, - UnitDisplay = 1, - UnitPixel = 2, - UnitPoint = 3, - UnitInch = 4, - UnitDocument = 5, - UnitMillimeter = 6 -} Unit; - -typedef enum WarpMode { - WarpModePerspective = 0, - WarpModeBilinear = 1 -} WarpMode; - -typedef enum WrapMode { - WrapModeTile = 0, - WrapModeTileFlipX = 1, - WrapModeTileFlipY = 2, - WrapModeTileFlipXY = 3, - WrapModeClamp = 4 -} WrapMode; - -typedef enum GpTestControlEnum { - TestControlForceBilinear = 0, - TestControlForceNoICM = 1, - TestControlGetBuildNumber = 2 -} GpTestControlEnum; - -/* Opaque handles to information blocks on an internal GDI+ stack. */ -typedef DWORD GraphicsContainer; -typedef DWORD GraphicsState; - -/* Default flatness for GraphicsPath methods Flatten, Outline, Warp, Widen */ -/* FIXME: Is FlatnessDefault = 0.25f correct? */ -#ifdef __cplusplus -const REAL FlatnessDefault = 0.25f; -#else -#define FlatnessDefault ((REAL) 0.25f) -#endif - -static __inline__ BOOL ObjectTypeIsValid(ObjectType type) -{ - switch (type) { - case ObjectTypeBrush: - case ObjectTypePen: - case ObjectTypePath: - case ObjectTypeRegion: - case ObjectTypeFont: - case ObjectTypeStringFormat: - case ObjectTypeImageAttributes: - case ObjectTypeCustomLineCap: - case ObjectTypeGraphics: - return TRUE; - default: - return FALSE; - } -} - -#endif /* __GDIPLUS_ENUMS_H */ diff --git a/src/gdiplus4/gdiplusflat.h b/src/gdiplus4/gdiplusflat.h deleted file mode 100644 index 57478340..00000000 --- a/src/gdiplus4/gdiplusflat.h +++ /dev/null @@ -1,722 +0,0 @@ -/* - * gdiplusflat.h - * - * GDI+ Flat API - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_FLAT_H -#define __GDIPLUS_FLAT_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#ifdef __cplusplus -namespace DllExports { -extern "C" { -#endif - -/* AdjustableArrowCap functions */ -GpStatus WINGDIPAPI GdipCreateAdjustableArrowCap(REAL,REAL,BOOL,GpAdjustableArrowCap**); -GpStatus WINGDIPAPI GdipSetAdjustableArrowCapHeight(GpAdjustableArrowCap*,REAL); -GpStatus WINGDIPAPI GdipGetAdjustableArrowCapHeight(GpAdjustableArrowCap*,REAL*); -GpStatus WINGDIPAPI GdipSetAdjustableArrowCapWidth(GpAdjustableArrowCap*,REAL); -GpStatus WINGDIPAPI GdipGetAdjustableArrowCapWidth(GpAdjustableArrowCap*,REAL*); -GpStatus WINGDIPAPI GdipSetAdjustableArrowCapMiddleInset(GpAdjustableArrowCap*,REAL); -GpStatus WINGDIPAPI GdipGetAdjustableArrowCapMiddleInset(GpAdjustableArrowCap*,REAL*); -GpStatus WINGDIPAPI GdipSetAdjustableArrowCapFillState(GpAdjustableArrowCap*,BOOL); -GpStatus WINGDIPAPI GdipGetAdjustableArrowCapFillState(GpAdjustableArrowCap*,BOOL*); - -/* Bitmap functions */ -GpStatus WINGDIPAPI GdipCreateBitmapFromStream(IStream*,GpBitmap**); -GpStatus WINGDIPAPI GdipCreateBitmapFromFile(GDIPCONST WCHAR*,GpBitmap**); -GpStatus WINGDIPAPI GdipCreateBitmapFromStreamICM(IStream*,GpBitmap**); -GpStatus WINGDIPAPI GdipCreateBitmapFromFileICM(GDIPCONST WCHAR*,GpBitmap**); -GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT,INT,INT,PixelFormat,BYTE*,GpBitmap**); -GpStatus WINGDIPAPI GdipCreateBitmapFromGraphics(INT,INT,GpGraphics*,GpBitmap**); -GpStatus WINGDIPAPI GdipCreateBitmapFromDirectDrawSurface(IDirectDrawSurface7*,GpBitmap**); -GpStatus WINGDIPAPI GdipCreateBitmapFromGdiDib(GDIPCONST BITMAPINFO*,VOID*,GpBitmap**); -GpStatus WINGDIPAPI GdipCreateBitmapFromHBITMAP(HBITMAP,HPALETTE,GpBitmap**); -GpStatus WINGDIPAPI GdipCreateHBITMAPFromBitmap(GpBitmap*,HBITMAP*,ARGB); -GpStatus WINGDIPAPI GdipCreateBitmapFromHICON(HICON,GpBitmap**); -GpStatus WINGDIPAPI GdipCreateHICONFromBitmap(GpBitmap*,HICON*); -GpStatus WINGDIPAPI GdipCreateBitmapFromResource(HINSTANCE,GDIPCONST WCHAR*,GpBitmap**); -GpStatus WINGDIPAPI GdipCloneBitmapArea(REAL,REAL,REAL,REAL,PixelFormat,GpBitmap*,GpBitmap**); -GpStatus WINGDIPAPI GdipCloneBitmapAreaI(INT,INT,INT,INT,PixelFormat,GpBitmap*,GpBitmap**); -GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap*,GDIPCONST GpRect*,UINT,PixelFormat,BitmapData*); -GpStatus WINGDIPAPI GdipBitmapUnlockBits(GpBitmap*,BitmapData*); -GpStatus WINGDIPAPI GdipBitmapGetPixel(GpBitmap*,INT,INT,ARGB*); -GpStatus WINGDIPAPI GdipBitmapSetPixel(GpBitmap*,INT,INT,ARGB); -GpStatus WINGDIPAPI GdipBitmapSetResolution(GpBitmap*,REAL,REAL); -GpStatus WINGDIPAPI GdipBitmapConvertFormat(GpBitmap*,PixelFormat,DitherType,PaletteType,ColorPalette*,REAL); -GpStatus WINGDIPAPI GdipInitializePalette(ColorPalette*,PaletteType,INT,BOOL,GpBitmap*); -GpStatus WINGDIPAPI GdipBitmapApplyEffect(GpBitmap*,CGpEffect*,RECT*,BOOL,VOID**,INT*); -GpStatus WINGDIPAPI GdipBitmapCreateApplyEffect(GpBitmap**,INT,CGpEffect*,RECT*,RECT*,GpBitmap**,BOOL,VOID**,INT*); -GpStatus WINGDIPAPI GdipBitmapGetHistogram(GpBitmap*,HistogramFormat,UINT,UINT*,UINT*,UINT*,UINT*); -GpStatus WINGDIPAPI GdipBitmapGetHistogramSize(HistogramFormat,UINT*); - -/* Brush functions */ -GpStatus WINGDIPAPI GdipCloneBrush(GpBrush*,GpBrush**); -GpStatus WINGDIPAPI GdipDeleteBrush(GpBrush*); -GpStatus WINGDIPAPI GdipGetBrushType(GpBrush*,GpBrushType*); - -/* CachedBitmap functions */ -GpStatus WINGDIPAPI GdipCreateCachedBitmap(GpBitmap*,GpGraphics*,GpCachedBitmap**); -GpStatus WINGDIPAPI GdipDeleteCachedBitmap(GpCachedBitmap*); -GpStatus WINGDIPAPI GdipDrawCachedBitmap(GpGraphics*,GpCachedBitmap*,INT,INT); - -/* CustomLineCap functions */ -GpStatus WINGDIPAPI GdipCreateCustomLineCap(GpPath*,GpPath*,GpLineCap,REAL,GpCustomLineCap**); -GpStatus WINGDIPAPI GdipDeleteCustomLineCap(GpCustomLineCap*); -GpStatus WINGDIPAPI GdipCloneCustomLineCap(GpCustomLineCap*,GpCustomLineCap**); -GpStatus WINGDIPAPI GdipGetCustomLineCapType(GpCustomLineCap*,CustomLineCapType*); -GpStatus WINGDIPAPI GdipSetCustomLineCapStrokeCaps(GpCustomLineCap*,GpLineCap,GpLineCap); -GpStatus WINGDIPAPI GdipGetCustomLineCapStrokeCaps(GpCustomLineCap*,GpLineCap*,GpLineCap*); -GpStatus WINGDIPAPI GdipSetCustomLineCapStrokeJoin(GpCustomLineCap*,GpLineJoin); -GpStatus WINGDIPAPI GdipGetCustomLineCapStrokeJoin(GpCustomLineCap*,GpLineJoin*); -GpStatus WINGDIPAPI GdipSetCustomLineCapBaseCap(GpCustomLineCap*,GpLineCap); -GpStatus WINGDIPAPI GdipGetCustomLineCapBaseCap(GpCustomLineCap*,GpLineCap*); -GpStatus WINGDIPAPI GdipSetCustomLineCapBaseInset(GpCustomLineCap*,REAL); -GpStatus WINGDIPAPI GdipGetCustomLineCapBaseInset(GpCustomLineCap*,REAL*); -GpStatus WINGDIPAPI GdipSetCustomLineCapWidthScale(GpCustomLineCap*,REAL); -GpStatus WINGDIPAPI GdipGetCustomLineCapWidthScale(GpCustomLineCap*,REAL*); - -/* Effect functions */ -GpStatus WINGDIPAPI GdipCreateEffect(GDIPCONST GUID,CGpEffect**); -GpStatus WINGDIPAPI GdipDeleteEffect(CGpEffect*); -GpStatus WINGDIPAPI GdipGetEffectParameterSize(CGpEffect*,UINT*); -GpStatus WINGDIPAPI GdipSetEffectParameters(CGpEffect*,GDIPCONST VOID*,UINT); -GpStatus WINGDIPAPI GdipGetEffectParameters(CGpEffect*,UINT*,VOID*); - -/* Font functions */ -GpStatus WINGDIPAPI GdipCreateFontFromDC(HDC,GpFont**); -GpStatus WINGDIPAPI GdipCreateFontFromLogfontA(HDC,GDIPCONST LOGFONTA*,GpFont**); -GpStatus WINGDIPAPI GdipCreateFontFromLogfontW(HDC,GDIPCONST LOGFONTW*,GpFont**); -GpStatus WINGDIPAPI GdipCreateFont(GDIPCONST GpFontFamily*,REAL,INT,Unit,GpFont**); -GpStatus WINGDIPAPI GdipCloneFont(GpFont*,GpFont**); -GpStatus WINGDIPAPI GdipDeleteFont(GpFont*); -GpStatus WINGDIPAPI GdipGetFamily(GpFont*,GpFontFamily**); -GpStatus WINGDIPAPI GdipGetFontStyle(GpFont*,INT*); -GpStatus WINGDIPAPI GdipGetFontSize(GpFont*,REAL*); -GpStatus WINGDIPAPI GdipGetFontUnit(GpFont*,Unit*); -GpStatus WINGDIPAPI GdipGetFontHeight(GDIPCONST GpFont*,GDIPCONST GpGraphics*,REAL*); -GpStatus WINGDIPAPI GdipGetFontHeightGivenDPI(GDIPCONST GpFont*,REAL,REAL*); -GpStatus WINGDIPAPI GdipGetLogFontA(GpFont*,GpGraphics*,LOGFONTA*); -GpStatus WINGDIPAPI GdipGetLogFontW(GpFont*,GpGraphics*,LOGFONTW*); -GpStatus WINGDIPAPI GdipNewInstalledFontCollection(GpFontCollection**); -GpStatus WINGDIPAPI GdipNewPrivateFontCollection(GpFontCollection**); -GpStatus WINGDIPAPI GdipDeletePrivateFontCollection(GpFontCollection**); -GpStatus WINGDIPAPI GdipGetFontCollectionFamilyCount(GpFontCollection*,INT*); -GpStatus WINGDIPAPI GdipGetFontCollectionFamilyList(GpFontCollection*,INT,GpFontFamily**,INT*); -GpStatus WINGDIPAPI GdipPrivateAddFontFile(GpFontCollection*,GDIPCONST WCHAR*); -GpStatus WINGDIPAPI GdipPrivateAddMemoryFont(GpFontCollection*,GDIPCONST void*,INT); - -/* FontFamily functions */ -GpStatus WINGDIPAPI GdipCreateFontFamilyFromName(GDIPCONST WCHAR*,GpFontCollection*,GpFontFamily**); -GpStatus WINGDIPAPI GdipDeleteFontFamily(GpFontFamily*); -GpStatus WINGDIPAPI GdipCloneFontFamily(GpFontFamily*,GpFontFamily**); -GpStatus WINGDIPAPI GdipGetGenericFontFamilySansSerif(GpFontFamily**); -GpStatus WINGDIPAPI GdipGetGenericFontFamilySerif(GpFontFamily**); -GpStatus WINGDIPAPI GdipGetGenericFontFamilyMonospace(GpFontFamily**); -GpStatus WINGDIPAPI GdipGetFamilyName(GDIPCONST GpFontFamily*,WCHAR[LF_FACESIZE],LANGID); -GpStatus WINGDIPAPI GdipIsStyleAvailable(GDIPCONST GpFontFamily*,INT,BOOL*); -GpStatus WINGDIPAPI GdipFontCollectionEnumerable(GpFontCollection*,GpGraphics*,INT*); -GpStatus WINGDIPAPI GdipFontCollectionEnumerate(GpFontCollection*,INT,GpFontFamily**,INT*,GpGraphics*); -GpStatus WINGDIPAPI GdipGetEmHeight(GDIPCONST GpFontFamily*,INT,UINT16*); -GpStatus WINGDIPAPI GdipGetCellAscent(GDIPCONST GpFontFamily*,INT,UINT16*); -GpStatus WINGDIPAPI GdipGetCellDescent(GDIPCONST GpFontFamily*,INT,UINT16*); -GpStatus WINGDIPAPI GdipGetLineSpacing(GDIPCONST GpFontFamily*,INT,UINT16*); - -/* Graphics functions */ -GpStatus WINGDIPAPI GdipFlush(GpGraphics*,GpFlushIntention); -GpStatus WINGDIPAPI GdipCreateFromHDC(HDC,GpGraphics**); -GpStatus WINGDIPAPI GdipCreateFromHDC2(HDC,HANDLE,GpGraphics**); -GpStatus WINGDIPAPI GdipCreateFromHWND(HWND,GpGraphics**); -GpStatus WINGDIPAPI GdipCreateFromHWNDICM(HWND,GpGraphics**); -GpStatus WINGDIPAPI GdipDeleteGraphics(GpGraphics*); -GpStatus WINGDIPAPI GdipGetDC(GpGraphics*,HDC*); -GpStatus WINGDIPAPI GdipReleaseDC(GpGraphics*,HDC); -GpStatus WINGDIPAPI GdipSetCompositingMode(GpGraphics*,CompositingMode); -GpStatus WINGDIPAPI GdipGetCompositingMode(GpGraphics*,CompositingMode*); -GpStatus WINGDIPAPI GdipSetRenderingOrigin(GpGraphics*,INT,INT); -GpStatus WINGDIPAPI GdipGetRenderingOrigin(GpGraphics*,INT*,INT*); -GpStatus WINGDIPAPI GdipSetCompositingQuality(GpGraphics*,CompositingQuality); -GpStatus WINGDIPAPI GdipGetCompositingQuality(GpGraphics*,CompositingQuality*); -GpStatus WINGDIPAPI GdipSetSmoothingMode(GpGraphics*,SmoothingMode); -GpStatus WINGDIPAPI GdipGetSmoothingMode(GpGraphics*,SmoothingMode*); -GpStatus WINGDIPAPI GdipSetPixelOffsetMode(GpGraphics*,PixelOffsetMode); -GpStatus WINGDIPAPI GdipGetPixelOffsetMode(GpGraphics*,PixelOffsetMode*); -GpStatus WINGDIPAPI GdipSetTextRenderingHint(GpGraphics*,TextRenderingHint); -GpStatus WINGDIPAPI GdipGetTextRenderingHint(GpGraphics*,TextRenderingHint*); -GpStatus WINGDIPAPI GdipSetTextContrast(GpGraphics*,UINT); -GpStatus WINGDIPAPI GdipGetTextContrast(GpGraphics*,UINT*); -GpStatus WINGDIPAPI GdipSetInterpolationMode(GpGraphics*,InterpolationMode); -GpStatus WINGDIPAPI GdipGraphicsSetAbort(GpGraphics*,GdiplusAbort*); -GpStatus WINGDIPAPI GdipGetInterpolationMode(GpGraphics*,InterpolationMode*); -GpStatus WINGDIPAPI GdipSetWorldTransform(GpGraphics*,GpMatrix*); -GpStatus WINGDIPAPI GdipResetWorldTransform(GpGraphics*); -GpStatus WINGDIPAPI GdipMultiplyWorldTransform(GpGraphics*,GDIPCONST GpMatrix*,GpMatrixOrder); -GpStatus WINGDIPAPI GdipTranslateWorldTransform(GpGraphics*,REAL,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipScaleWorldTransform(GpGraphics*,REAL,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipRotateWorldTransform(GpGraphics*,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipGetWorldTransform(GpGraphics*,GpMatrix*); -GpStatus WINGDIPAPI GdipResetPageTransform(GpGraphics*); -GpStatus WINGDIPAPI GdipGetPageUnit(GpGraphics*,GpUnit*); -GpStatus WINGDIPAPI GdipGetPageScale(GpGraphics*,REAL*); -GpStatus WINGDIPAPI GdipSetPageUnit(GpGraphics*,GpUnit); -GpStatus WINGDIPAPI GdipSetPageScale(GpGraphics*,REAL); -GpStatus WINGDIPAPI GdipGetDpiX(GpGraphics*,REAL*); -GpStatus WINGDIPAPI GdipGetDpiY(GpGraphics*,REAL*); -GpStatus WINGDIPAPI GdipTransformPoints(GpGraphics*,GpCoordinateSpace,GpCoordinateSpace,GpPointF*,INT); -GpStatus WINGDIPAPI GdipTransformPointsI(GpGraphics*,GpCoordinateSpace,GpCoordinateSpace,GpPoint*,INT); -GpStatus WINGDIPAPI GdipGetNearestColor(GpGraphics*,ARGB*); -HPALETTE WINGDIPAPI GdipCreateHalftonePalette(void); -GpStatus WINGDIPAPI GdipDrawLine(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipDrawLineI(GpGraphics*,GpPen*,INT,INT,INT,INT); -GpStatus WINGDIPAPI GdipDrawLines(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT); -GpStatus WINGDIPAPI GdipDrawLinesI(GpGraphics*,GpPen*,GDIPCONST GpPoint*,INT); -GpStatus WINGDIPAPI GdipDrawArc(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipDrawArcI(GpGraphics*,GpPen*,INT,INT,INT,INT,REAL,REAL); -GpStatus WINGDIPAPI GdipDrawBezier(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipDrawBezierI(GpGraphics*,GpPen*,INT,INT,INT,INT,INT,INT,INT,INT); -GpStatus WINGDIPAPI GdipDrawBeziers(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT); -GpStatus WINGDIPAPI GdipDrawBeziersI(GpGraphics*,GpPen*,GDIPCONST GpPoint*,INT); -GpStatus WINGDIPAPI GdipDrawRectangle(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipDrawRectangleI(GpGraphics*,GpPen*,INT,INT,INT,INT); -GpStatus WINGDIPAPI GdipDrawRectangles(GpGraphics*,GpPen*,GDIPCONST GpRectF*,INT); -GpStatus WINGDIPAPI GdipDrawRectanglesI(GpGraphics*,GpPen*,GDIPCONST GpRect*,INT); -GpStatus WINGDIPAPI GdipDrawEllipse(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipDrawEllipseI(GpGraphics*,GpPen*,INT,INT,INT,INT); -GpStatus WINGDIPAPI GdipDrawPie(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipDrawPieI(GpGraphics*,GpPen*,INT,INT,INT,INT,REAL,REAL); -GpStatus WINGDIPAPI GdipDrawPolygon(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT); -GpStatus WINGDIPAPI GdipDrawPolygonI(GpGraphics*,GpPen*,GDIPCONST GpPoint*,INT); -GpStatus WINGDIPAPI GdipDrawPath(GpGraphics*,GpPen*,GpPath*); -GpStatus WINGDIPAPI GdipDrawCurve(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT); -GpStatus WINGDIPAPI GdipDrawCurveI(GpGraphics*,GpPen*,GDIPCONST GpPoint*,INT); -GpStatus WINGDIPAPI GdipDrawCurve2(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT,REAL); -GpStatus WINGDIPAPI GdipDrawCurve2I(GpGraphics*,GpPen*,GDIPCONST GpPoint*,INT,REAL); -GpStatus WINGDIPAPI GdipDrawCurve3(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT,INT,INT,REAL); -GpStatus WINGDIPAPI GdipDrawCurve3I(GpGraphics*,GpPen*,GDIPCONST GpPoint*,INT,INT,INT,REAL); -GpStatus WINGDIPAPI GdipDrawClosedCurve(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT); -GpStatus WINGDIPAPI GdipDrawClosedCurveI(GpGraphics*,GpPen*,GDIPCONST GpPoint*,INT); -GpStatus WINGDIPAPI GdipDrawClosedCurve2(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT,REAL); -GpStatus WINGDIPAPI GdipDrawClosedCurve2I(GpGraphics*,GpPen*,GDIPCONST GpPoint*,INT,REAL); -GpStatus WINGDIPAPI GdipGraphicsClear(GpGraphics*,ARGB); -GpStatus WINGDIPAPI GdipFillRectangle(GpGraphics*,GpBrush*,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipFillRectangleI(GpGraphics*,GpBrush*,INT,INT,INT,INT); -GpStatus WINGDIPAPI GdipFillRectangles(GpGraphics*,GpBrush*,GDIPCONST GpRectF*,INT); -GpStatus WINGDIPAPI GdipFillRectanglesI(GpGraphics*,GpBrush*,GDIPCONST GpRect*,INT); -GpStatus WINGDIPAPI GdipFillPolygon(GpGraphics*,GpBrush*,GDIPCONST GpPointF*,INT,GpFillMode); -GpStatus WINGDIPAPI GdipFillPolygonI(GpGraphics*,GpBrush*,GDIPCONST GpPoint*,INT,GpFillMode); -GpStatus WINGDIPAPI GdipFillPolygon2(GpGraphics*,GpBrush*,GDIPCONST GpPointF*,INT); -GpStatus WINGDIPAPI GdipFillPolygon2I(GpGraphics*,GpBrush*,GDIPCONST GpPoint*,INT); -GpStatus WINGDIPAPI GdipFillEllipse(GpGraphics*,GpBrush*,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipFillEllipseI(GpGraphics*,GpBrush*,INT,INT,INT,INT); -GpStatus WINGDIPAPI GdipFillPie(GpGraphics*,GpBrush*,REAL,REAL,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipFillPieI(GpGraphics*,GpBrush*,INT,INT,INT,INT,REAL,REAL); -GpStatus WINGDIPAPI GdipFillPath(GpGraphics*,GpBrush*,GpPath*); -GpStatus WINGDIPAPI GdipFillClosedCurve(GpGraphics*,GpBrush*,GDIPCONST GpPointF*,INT); -GpStatus WINGDIPAPI GdipFillClosedCurveI(GpGraphics*,GpBrush*,GDIPCONST GpPoint*,INT); -GpStatus WINGDIPAPI GdipFillClosedCurve2(GpGraphics*,GpBrush*,GDIPCONST GpPointF*,INT,REAL,GpFillMode); -GpStatus WINGDIPAPI GdipFillClosedCurve2I(GpGraphics*,GpBrush*,GDIPCONST GpPoint*,INT,REAL,GpFillMode); -GpStatus WINGDIPAPI GdipFillRegion(GpGraphics*,GpBrush*,GpRegion*); -GpStatus WINGDIPAPI GdipDrawImage(GpGraphics*,GpImage*,REAL,REAL); -GpStatus WINGDIPAPI GdipDrawImageI(GpGraphics*,GpImage*,INT,INT); -GpStatus WINGDIPAPI GdipDrawImageRect(GpGraphics*,GpImage*,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipDrawImageRectI(GpGraphics*,GpImage*,INT,INT,INT,INT); -GpStatus WINGDIPAPI GdipDrawImagePoints(GpGraphics*,GpImage*,GDIPCONST GpPointF*,INT); -GpStatus WINGDIPAPI GdipDrawImagePointsI(GpGraphics*,GpImage*,GDIPCONST GpPoint*,INT); -GpStatus WINGDIPAPI GdipDrawImagePointRect(GpGraphics*,GpImage*,REAL,REAL,REAL,REAL,REAL,REAL,GpUnit); -GpStatus WINGDIPAPI GdipDrawImagePointRectI(GpGraphics*,GpImage*,INT,INT,INT,INT,INT,INT,GpUnit); -GpStatus WINGDIPAPI GdipDrawImageRectRect(GpGraphics*,GpImage*,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL,GpUnit,GDIPCONST GpImageAttributes*,DrawImageAbort,VOID*); -GpStatus WINGDIPAPI GdipDrawImageRectRectI(GpGraphics*,GpImage*,INT,INT,INT,INT,INT,INT,INT,INT,GpUnit,GDIPCONST GpImageAttributes*,DrawImageAbort,VOID*); -GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics*,GpImage*,GDIPCONST GpPointF*,INT,REAL,REAL,REAL,REAL,GpUnit,GDIPCONST GpImageAttributes*,DrawImageAbort,VOID*); -GpStatus WINGDIPAPI GdipDrawImagePointsRectI(GpGraphics*,GpImage*,GDIPCONST GpPoint*,INT,INT,INT,INT,INT,GpUnit,GDIPCONST GpImageAttributes*,DrawImageAbort,VOID*); -GpStatus WINGDIPAPI GdipDrawImageFX(GpGraphics*,GpImage*,GpRectF*,GpMatrix*,CGpEffect*,GpImageAttributes*,GpUnit); -#ifdef __cplusplus -GpStatus WINGDIPAPI GdipEnumerateMetafileDestPoint(GpGraphics*,GDIPCONST GpMetafile*,GDIPCONST PointF&,EnumerateMetafileProc,VOID*,GDIPCONST GpImageAttributes*); -GpStatus WINGDIPAPI GdipEnumerateMetafileDestPointI(GpGraphics*,GDIPCONST GpMetafile*,GDIPCONST Point&,EnumerateMetafileProc,VOID*,GDIPCONST GpImageAttributes*); -GpStatus WINGDIPAPI GdipEnumerateMetafileDestRect(GpGraphics*,GDIPCONST GpMetafile*,GDIPCONST RectF&,EnumerateMetafileProc,VOID*,GDIPCONST GpImageAttributes*); -GpStatus WINGDIPAPI GdipEnumerateMetafileDestRectI(GpGraphics*,GDIPCONST GpMetafile*,GDIPCONST Rect&,EnumerateMetafileProc,VOID*,GDIPCONST GpImageAttributes*); -#endif -GpStatus WINGDIPAPI GdipEnumerateMetafileDestPoints(GpGraphics*,GDIPCONST GpMetafile*,GDIPCONST PointF*,INT,EnumerateMetafileProc,VOID*,GDIPCONST GpImageAttributes*); -GpStatus WINGDIPAPI GdipEnumerateMetafileDestPointsI(GpGraphics*,GDIPCONST GpMetafile*,GDIPCONST Point*,INT,EnumerateMetafileProc,VOID*,GDIPCONST GpImageAttributes*); -#ifdef __cplusplus -GpStatus WINGDIPAPI GdipEnumerateMetafileSrcRectDestPoint(GpGraphics*,GDIPCONST GpMetafile*,GDIPCONST PointF&,GDIPCONST RectF&,Unit,EnumerateMetafileProc,VOID*,GDIPCONST GpImageAttributes*); -GpStatus WINGDIPAPI GdipEnumerateMetafileSrcRectDestPointI(GpGraphics*,GDIPCONST GpMetafile*,GDIPCONST Point&,GDIPCONST Rect&,Unit,EnumerateMetafileProc,VOID*,GDIPCONST GpImageAttributes*); -GpStatus WINGDIPAPI GdipEnumerateMetafileSrcRectDestRect(GpGraphics*,GDIPCONST GpMetafile*,GDIPCONST RectF&,GDIPCONST RectF&,Unit,EnumerateMetafileProc,VOID*,GDIPCONST GpImageAttributes*); -GpStatus WINGDIPAPI GdipEnumerateMetafileSrcRectDestRectI(GpGraphics*,GDIPCONST GpMetafile*,GDIPCONST Rect&,GDIPCONST Rect&,Unit,EnumerateMetafileProc,VOID*,GDIPCONST GpImageAttributes*); -GpStatus WINGDIPAPI GdipEnumerateMetafileSrcRectDestPoints(GpGraphics*,GDIPCONST GpMetafile*,GDIPCONST PointF*,INT,GDIPCONST RectF&,Unit,EnumerateMetafileProc,VOID*,GDIPCONST GpImageAttributes*); -GpStatus WINGDIPAPI GdipEnumerateMetafileSrcRectDestPointsI(GpGraphics*,GDIPCONST GpMetafile*,GDIPCONST Point*,INT,GDIPCONST Rect&,Unit,EnumerateMetafileProc,VOID*,GDIPCONST GpImageAttributes*); -#endif -GpStatus WINGDIPAPI GdipSetClipGraphics(GpGraphics*,GpGraphics*,CombineMode); -GpStatus WINGDIPAPI GdipSetClipRect(GpGraphics*,REAL,REAL,REAL,REAL,CombineMode); -GpStatus WINGDIPAPI GdipSetClipRectI(GpGraphics*,INT,INT,INT,INT,CombineMode); -GpStatus WINGDIPAPI GdipSetClipPath(GpGraphics*,GpPath*,CombineMode); -GpStatus WINGDIPAPI GdipSetClipRegion(GpGraphics*,GpRegion*,CombineMode); -GpStatus WINGDIPAPI GdipSetClipHrgn(GpGraphics*,HRGN,CombineMode); -GpStatus WINGDIPAPI GdipResetClip(GpGraphics*); -GpStatus WINGDIPAPI GdipTranslateClip(GpGraphics*,REAL,REAL); -GpStatus WINGDIPAPI GdipTranslateClipI(GpGraphics*,INT,INT); -GpStatus WINGDIPAPI GdipGetClip(GpGraphics*,GpRegion*); -GpStatus WINGDIPAPI GdipGetClipBounds(GpGraphics*,GpRectF*); -GpStatus WINGDIPAPI GdipGetClipBoundsI(GpGraphics*,GpRect*); -GpStatus WINGDIPAPI GdipIsClipEmpty(GpGraphics*,BOOL*); -GpStatus WINGDIPAPI GdipGetVisibleClipBounds(GpGraphics*,GpRectF*); -GpStatus WINGDIPAPI GdipGetVisibleClipBoundsI(GpGraphics*,GpRect*); -GpStatus WINGDIPAPI GdipIsVisibleClipEmpty(GpGraphics*,BOOL*); -GpStatus WINGDIPAPI GdipIsVisiblePoint(GpGraphics*,REAL,REAL,BOOL*); -GpStatus WINGDIPAPI GdipIsVisiblePointI(GpGraphics*,INT,INT,BOOL*); -GpStatus WINGDIPAPI GdipIsVisibleRect(GpGraphics*,REAL,REAL,REAL,REAL,BOOL*); -GpStatus WINGDIPAPI GdipIsVisibleRectI(GpGraphics*,INT,INT,INT,INT,BOOL*); -GpStatus WINGDIPAPI GdipSaveGraphics(GpGraphics*,GraphicsState*); -GpStatus WINGDIPAPI GdipRestoreGraphics(GpGraphics*,GraphicsState); -GpStatus WINGDIPAPI GdipBeginContainer(GpGraphics*,GDIPCONST GpRectF*,GDIPCONST GpRectF*,GpUnit,GraphicsContainer*); -GpStatus WINGDIPAPI GdipBeginContainerI(GpGraphics*,GDIPCONST GpRect*,GDIPCONST GpRect*,GpUnit,GraphicsContainer*); -GpStatus WINGDIPAPI GdipBeginContainer2(GpGraphics*,GraphicsContainer*); -GpStatus WINGDIPAPI GdipEndContainer(GpGraphics*,GraphicsContainer); -GpStatus WINGDIPAPI GdipComment(GpGraphics*,UINT,GDIPCONST BYTE*); - -/* GraphicsPath functions */ -GpStatus WINGDIPAPI GdipCreatePath(GpFillMode,GpPath**); -GpStatus WINGDIPAPI GdipCreatePath2(GDIPCONST GpPointF*,GDIPCONST BYTE*,INT,GpFillMode,GpPath**); -GpStatus WINGDIPAPI GdipCreatePath2I(GDIPCONST GpPoint*,GDIPCONST BYTE*,INT,GpFillMode,GpPath**); -GpStatus WINGDIPAPI GdipClonePath(GpPath*,GpPath**); -GpStatus WINGDIPAPI GdipDeletePath(GpPath*); -GpStatus WINGDIPAPI GdipResetPath(GpPath*); -GpStatus WINGDIPAPI GdipGetPointCount(GpPath*,INT*); -GpStatus WINGDIPAPI GdipGetPathTypes(GpPath*,BYTE*,INT); -GpStatus WINGDIPAPI GdipGetPathPoints(GpPath*,GpPointF*,INT); -GpStatus WINGDIPAPI GdipGetPathPointsI(GpPath*,GpPoint*,INT); -GpStatus WINGDIPAPI GdipGetPathFillMode(GpPath*,GpFillMode*); -GpStatus WINGDIPAPI GdipSetPathFillMode(GpPath*,GpFillMode); -GpStatus WINGDIPAPI GdipGetPathData(GpPath*,GpPathData*); -GpStatus WINGDIPAPI GdipStartPathFigure(GpPath*); -GpStatus WINGDIPAPI GdipClosePathFigure(GpPath*); -GpStatus WINGDIPAPI GdipClosePathFigures(GpPath*); -GpStatus WINGDIPAPI GdipSetPathMarker(GpPath*); -GpStatus WINGDIPAPI GdipClearPathMarkers(GpPath*); -GpStatus WINGDIPAPI GdipReversePath(GpPath*); -GpStatus WINGDIPAPI GdipGetPathLastPoint(GpPath*,GpPointF*); -GpStatus WINGDIPAPI GdipAddPathLine(GpPath*,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipAddPathLine2(GpPath*,GDIPCONST GpPointF*,INT); -GpStatus WINGDIPAPI GdipAddPathArc(GpPath*,REAL,REAL,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipAddPathBezier(GpPath*,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipAddPathBeziers(GpPath*,GDIPCONST GpPointF*,INT); -GpStatus WINGDIPAPI GdipAddPathCurve(GpPath*,GDIPCONST GpPointF*,INT); -GpStatus WINGDIPAPI GdipAddPathCurve2(GpPath*,GDIPCONST GpPointF*,INT,REAL); -GpStatus WINGDIPAPI GdipAddPathCurve3(GpPath*,GDIPCONST GpPointF*,INT,INT,INT,REAL); -GpStatus WINGDIPAPI GdipAddPathClosedCurve(GpPath*,GDIPCONST GpPointF*,INT); -GpStatus WINGDIPAPI GdipAddPathClosedCurve2(GpPath*,GDIPCONST GpPointF*,INT,REAL); -GpStatus WINGDIPAPI GdipAddPathRectangle(GpPath*,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipAddPathRectangles(GpPath*,GDIPCONST GpRectF*,INT); -GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath*,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipAddPathPie(GpPath*,REAL,REAL,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipAddPathPolygon(GpPath*,GDIPCONST GpPointF*,INT); -GpStatus WINGDIPAPI GdipAddPathPath(GpPath*,GDIPCONST GpPath*,BOOL); -GpStatus WINGDIPAPI GdipAddPathString(GpPath*,GDIPCONST WCHAR*,INT,GDIPCONST GpFontFamily*,INT,REAL,GDIPCONST RectF*,GDIPCONST GpStringFormat*); -GpStatus WINGDIPAPI GdipAddPathStringI(GpPath*,GDIPCONST WCHAR*,INT,GDIPCONST GpFontFamily*,INT,REAL,GDIPCONST Rect*,GDIPCONST GpStringFormat*); -GpStatus WINGDIPAPI GdipAddPathLineI(GpPath*,INT,INT,INT,INT); -GpStatus WINGDIPAPI GdipAddPathLine2I(GpPath*,GDIPCONST GpPoint*,INT); -GpStatus WINGDIPAPI GdipAddPathArcI(GpPath*,INT,INT,INT,INT,REAL,REAL); -GpStatus WINGDIPAPI GdipAddPathBezierI(GpPath*,INT,INT,INT,INT,INT,INT,INT,INT); -GpStatus WINGDIPAPI GdipAddPathBeziersI(GpPath*,GDIPCONST GpPoint*,INT); -GpStatus WINGDIPAPI GdipAddPathCurveI(GpPath*,GDIPCONST GpPoint*,INT); -GpStatus WINGDIPAPI GdipAddPathCurve2I(GpPath*,GDIPCONST GpPoint*,INT,REAL); -GpStatus WINGDIPAPI GdipAddPathCurve3I(GpPath*,GDIPCONST GpPoint*,INT,INT,INT,REAL); -GpStatus WINGDIPAPI GdipAddPathClosedCurveI(GpPath*,GDIPCONST GpPoint*,INT); -GpStatus WINGDIPAPI GdipAddPathClosedCurve2I(GpPath*,GDIPCONST GpPoint*,INT,REAL); -GpStatus WINGDIPAPI GdipAddPathRectangleI(GpPath*,INT,INT,INT,INT); -GpStatus WINGDIPAPI GdipAddPathRectanglesI(GpPath*,GDIPCONST GpRect*,INT); -GpStatus WINGDIPAPI GdipAddPathEllipseI(GpPath*,INT,INT,INT,INT); -GpStatus WINGDIPAPI GdipAddPathPieI(GpPath*,INT,INT,INT,INT,REAL,REAL); -GpStatus WINGDIPAPI GdipAddPathPolygonI(GpPath*,GDIPCONST GpPoint*,INT); -GpStatus WINGDIPAPI GdipFlattenPath(GpPath*,GpMatrix*,REAL); -GpStatus WINGDIPAPI GdipWindingModeOutline(GpPath*,GpMatrix*,REAL); -GpStatus WINGDIPAPI GdipWidenPath(GpPath*,GpPen*,GpMatrix*,REAL); -GpStatus WINGDIPAPI GdipWarpPath(GpPath*,GpMatrix*,GDIPCONST GpPointF*,INT,REAL,REAL,REAL,REAL,WarpMode,REAL); -GpStatus WINGDIPAPI GdipTransformPath(GpPath*,GpMatrix*); -GpStatus WINGDIPAPI GdipGetPathWorldBounds(GpPath*,GpRectF*,GDIPCONST GpMatrix*,GDIPCONST GpPen*); -GpStatus WINGDIPAPI GdipGetPathWorldBoundsI(GpPath*,GpRect*,GDIPCONST GpMatrix*,GDIPCONST GpPen*); -GpStatus WINGDIPAPI GdipIsVisiblePathPoint(GpPath*,REAL,REAL,GpGraphics*,BOOL*); -GpStatus WINGDIPAPI GdipIsVisiblePathPointI(GpPath*,INT,INT,GpGraphics*,BOOL*); -GpStatus WINGDIPAPI GdipIsOutlineVisiblePathPoint(GpPath*,REAL,REAL,GpPen*,GpGraphics*,BOOL*); -GpStatus WINGDIPAPI GdipIsOutlineVisiblePathPointI(GpPath*,INT,INT,GpPen*,GpGraphics*,BOOL*); - -/* HatchBrush functions */ -GpStatus WINGDIPAPI GdipCreateHatchBrush(GpHatchStyle,ARGB,ARGB,GpHatch**); -GpStatus WINGDIPAPI GdipGetHatchStyle(GpHatch*,GpHatchStyle*); -GpStatus WINGDIPAPI GdipGetHatchForegroundColor(GpHatch*,ARGB*); -GpStatus WINGDIPAPI GdipGetHatchBackgroundColor(GpHatch*,ARGB*); - -/* Image functions */ -GpStatus WINGDIPAPI GdipLoadImageFromStream(IStream*,GpImage**); -GpStatus WINGDIPAPI GdipLoadImageFromFile(GDIPCONST WCHAR*,GpImage**); -GpStatus WINGDIPAPI GdipLoadImageFromStreamICM(IStream*,GpImage**); -GpStatus WINGDIPAPI GdipLoadImageFromFileICM(GDIPCONST WCHAR*,GpImage**); -GpStatus WINGDIPAPI GdipCloneImage(GpImage*,GpImage**); -GpStatus WINGDIPAPI GdipDisposeImage(GpImage*); -GpStatus WINGDIPAPI GdipSaveImageToFile(GpImage*,GDIPCONST WCHAR*,GDIPCONST CLSID*,GDIPCONST EncoderParameters*); -GpStatus WINGDIPAPI GdipSaveImageToStream(GpImage*,IStream*,GDIPCONST CLSID*,GDIPCONST EncoderParameters*); -GpStatus WINGDIPAPI GdipSaveAdd(GpImage*,GDIPCONST EncoderParameters*); -GpStatus WINGDIPAPI GdipSaveAddImage(GpImage*,GpImage*,GDIPCONST EncoderParameters*); -GpStatus WINGDIPAPI GdipGetImageGraphicsContext(GpImage*,GpGraphics**); -GpStatus WINGDIPAPI GdipGetImageBounds(GpImage*,GpRectF*,GpUnit*); -GpStatus WINGDIPAPI GdipGetImageDimension(GpImage*,REAL*,REAL*); -GpStatus WINGDIPAPI GdipGetImageType(GpImage*,ImageType*); -GpStatus WINGDIPAPI GdipGetImageWidth(GpImage*,UINT*); -GpStatus WINGDIPAPI GdipGetImageHeight(GpImage*,UINT*); -GpStatus WINGDIPAPI GdipGetImageHorizontalResolution(GpImage*,REAL*); -GpStatus WINGDIPAPI GdipGetImageVerticalResolution(GpImage*,REAL*); -GpStatus WINGDIPAPI GdipGetImageFlags(GpImage*,UINT*); -GpStatus WINGDIPAPI GdipGetImageRawFormat(GpImage*,GUID*); -GpStatus WINGDIPAPI GdipGetImagePixelFormat(GpImage*,PixelFormat*); -GpStatus WINGDIPAPI GdipGetImageThumbnail(GpImage*,UINT,UINT,GpImage**,GetThumbnailImageAbort,VOID*); -GpStatus WINGDIPAPI GdipGetEncoderParameterListSize(GpImage*,GDIPCONST CLSID*,UINT*); -GpStatus WINGDIPAPI GdipGetEncoderParameterList(GpImage*,GDIPCONST CLSID*,UINT,EncoderParameters*); -GpStatus WINGDIPAPI GdipImageGetFrameDimensionsCount(GpImage*,UINT*); -GpStatus WINGDIPAPI GdipImageGetFrameDimensionsList(GpImage*,GUID*,UINT); -GpStatus WINGDIPAPI GdipImageGetFrameCount(GpImage*,GDIPCONST GUID*,UINT*); -GpStatus WINGDIPAPI GdipImageSelectActiveFrame(GpImage*,GDIPCONST GUID*,UINT); -GpStatus WINGDIPAPI GdipImageRotateFlip(GpImage*,RotateFlipType); -GpStatus WINGDIPAPI GdipGetImagePalette(GpImage*,ColorPalette*,INT); -GpStatus WINGDIPAPI GdipSetImagePalette(GpImage*,GDIPCONST ColorPalette*); -GpStatus WINGDIPAPI GdipGetImagePaletteSize(GpImage*,INT*); -GpStatus WINGDIPAPI GdipGetPropertyCount(GpImage*,UINT*); -GpStatus WINGDIPAPI GdipGetPropertyIdList(GpImage*,UINT,PROPID*); -GpStatus WINGDIPAPI GdipGetPropertyItemSize(GpImage*,PROPID,UINT*); -GpStatus WINGDIPAPI GdipGetPropertyItem(GpImage*,PROPID,UINT,PropertyItem*); -GpStatus WINGDIPAPI GdipGetPropertySize(GpImage*,UINT*,UINT*); -GpStatus WINGDIPAPI GdipGetAllPropertyItems(GpImage*,UINT,UINT,PropertyItem*); -GpStatus WINGDIPAPI GdipRemovePropertyItem(GpImage*,PROPID); -GpStatus WINGDIPAPI GdipSetPropertyItem(GpImage*,GDIPCONST PropertyItem*); -GpStatus WINGDIPAPI GdipFindFirstImageItem(GpImage*,ImageItemData*); -GpStatus WINGDIPAPI GdipFindNextImageItem(GpImage*,ImageItemData*); -GpStatus WINGDIPAPI GdipGetImageItemData(GpImage*,ImageItemData*); -GpStatus WINGDIPAPI GdipImageSetAbort(GpImage*,GdiplusAbort*); -GpStatus WINGDIPAPI GdipImageForceValidation(GpImage*); - -/* Image codec functions */ -GpStatus WINGDIPAPI GdipGetImageDecodersSize(UINT*,UINT*); -GpStatus WINGDIPAPI GdipGetImageDecoders(UINT,UINT,ImageCodecInfo*); -GpStatus WINGDIPAPI GdipGetImageEncodersSize(UINT*,UINT*); -GpStatus WINGDIPAPI GdipGetImageEncoders(UINT,UINT,ImageCodecInfo*); - -/* ImageAttributes functions */ -GpStatus WINGDIPAPI GdipCreateImageAttributes(GpImageAttributes**); -GpStatus WINGDIPAPI GdipCloneImageAttributes(GDIPCONST GpImageAttributes*,GpImageAttributes**); -GpStatus WINGDIPAPI GdipDisposeImageAttributes(GpImageAttributes*); -GpStatus WINGDIPAPI GdipSetImageAttributesToIdentity(GpImageAttributes*,ColorAdjustType); -GpStatus WINGDIPAPI GdipResetImageAttributes(GpImageAttributes*,ColorAdjustType); -GpStatus WINGDIPAPI GdipSetImageAttributesColorMatrix(GpImageAttributes*,ColorAdjustType,BOOL,GDIPCONST ColorMatrix*,GDIPCONST ColorMatrix*,ColorMatrixFlags); -GpStatus WINGDIPAPI GdipSetImageAttributesThreshold(GpImageAttributes*,ColorAdjustType,BOOL,REAL); -GpStatus WINGDIPAPI GdipSetImageAttributesGamma(GpImageAttributes*,ColorAdjustType,BOOL,REAL); -GpStatus WINGDIPAPI GdipSetImageAttributesNoOp(GpImageAttributes*,ColorAdjustType,BOOL); -GpStatus WINGDIPAPI GdipSetImageAttributesColorKeys(GpImageAttributes*,ColorAdjustType,BOOL,ARGB,ARGB); -GpStatus WINGDIPAPI GdipSetImageAttributesOutputChannel(GpImageAttributes*,ColorAdjustType,BOOL,ColorChannelFlags); -GpStatus WINGDIPAPI GdipSetImageAttributesOutputChannelColorProfile(GpImageAttributes*,ColorAdjustType,BOOL,GDIPCONST WCHAR*); -GpStatus WINGDIPAPI GdipSetImageAttributesRemapTable(GpImageAttributes*,ColorAdjustType,BOOL,UINT,GDIPCONST ColorMap*); -GpStatus WINGDIPAPI GdipSetImageAttributesWrapMode(GpImageAttributes*,WrapMode,ARGB,BOOL); -GpStatus WINGDIPAPI GdipSetImageAttributesICMMode(GpImageAttributes*,BOOL); -GpStatus WINGDIPAPI GdipGetImageAttributesAdjustedPalette(GpImageAttributes*,ColorPalette*,ColorAdjustType); -GpStatus WINGDIPAPI GdipSetImageAttributesCachedBackground(GpImageAttributes*,BOOL); - -/* LinearGradientBrush functions */ -GpStatus WINGDIPAPI GdipCreateLineBrush(GDIPCONST GpPointF*,GDIPCONST GpPointF*,ARGB,ARGB,GpWrapMode,GpLineGradient**); -GpStatus WINGDIPAPI GdipCreateLineBrushI(GDIPCONST GpPoint*,GDIPCONST GpPoint*,ARGB,ARGB,GpWrapMode,GpLineGradient**); -GpStatus WINGDIPAPI GdipCreateLineBrushFromRect(GDIPCONST GpRectF*,ARGB,ARGB,LinearGradientMode,GpWrapMode,GpLineGradient**); -GpStatus WINGDIPAPI GdipCreateLineBrushFromRectI(GDIPCONST GpRect*,ARGB,ARGB,LinearGradientMode,GpWrapMode,GpLineGradient**); -GpStatus WINGDIPAPI GdipCreateLineBrushFromRectWithAngle(GDIPCONST GpRectF*,ARGB,ARGB,REAL,BOOL,GpWrapMode,GpLineGradient**); -GpStatus WINGDIPAPI GdipCreateLineBrushFromRectWithAngleI(GDIPCONST GpRect*,ARGB,ARGB,REAL,BOOL,GpWrapMode,GpLineGradient**); -GpStatus WINGDIPAPI GdipSetLineColors(GpLineGradient*,ARGB,ARGB); -GpStatus WINGDIPAPI GdipGetLineColors(GpLineGradient*,ARGB*); -GpStatus WINGDIPAPI GdipGetLineRect(GpLineGradient*,GpRectF*); -GpStatus WINGDIPAPI GdipGetLineRectI(GpLineGradient*,GpRect*); -GpStatus WINGDIPAPI GdipSetLineGammaCorrection(GpLineGradient*,BOOL); -GpStatus WINGDIPAPI GdipGetLineGammaCorrection(GpLineGradient*,BOOL*); -GpStatus WINGDIPAPI GdipGetLineBlendCount(GpLineGradient*,INT*); -GpStatus WINGDIPAPI GdipGetLineBlend(GpLineGradient*,REAL*,REAL*,INT); -GpStatus WINGDIPAPI GdipSetLineBlend(GpLineGradient*,GDIPCONST REAL*,GDIPCONST REAL*,INT); -GpStatus WINGDIPAPI GdipGetLinePresetBlendCount(GpLineGradient*,INT*); -GpStatus WINGDIPAPI GdipGetLinePresetBlend(GpLineGradient*,ARGB*,REAL*,INT); -GpStatus WINGDIPAPI GdipSetLinePresetBlend(GpLineGradient*,GDIPCONST ARGB*,GDIPCONST REAL*,INT); -GpStatus WINGDIPAPI GdipSetLineSigmaBlend(GpLineGradient*,REAL,REAL); -GpStatus WINGDIPAPI GdipSetLineLinearBlend(GpLineGradient*,REAL,REAL); -GpStatus WINGDIPAPI GdipSetLineWrapMode(GpLineGradient*,GpWrapMode); -GpStatus WINGDIPAPI GdipGetLineWrapMode(GpLineGradient*,GpWrapMode*); -GpStatus WINGDIPAPI GdipGetLineTransform(GpLineGradient*,GpMatrix*); -GpStatus WINGDIPAPI GdipSetLineTransform(GpLineGradient*,GDIPCONST GpMatrix*); -GpStatus WINGDIPAPI GdipResetLineTransform(GpLineGradient*); -GpStatus WINGDIPAPI GdipMultiplyLineTransform(GpLineGradient*,GDIPCONST GpMatrix*,GpMatrixOrder); -GpStatus WINGDIPAPI GdipTranslateLineTransform(GpLineGradient*,REAL,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipScaleLineTransform(GpLineGradient*,REAL,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipRotateLineTransform(GpLineGradient*,REAL,GpMatrixOrder); - -/* Matrix functions */ -GpStatus WINGDIPAPI GdipCreateMatrix(GpMatrix**); -GpStatus WINGDIPAPI GdipCreateMatrix2(REAL,REAL,REAL,REAL,REAL,REAL,GpMatrix**); -GpStatus WINGDIPAPI GdipCreateMatrix3(GDIPCONST GpRectF*,GDIPCONST GpPointF*,GpMatrix**); -GpStatus WINGDIPAPI GdipCreateMatrix3I(GDIPCONST GpRect*,GDIPCONST GpPoint*,GpMatrix**); -GpStatus WINGDIPAPI GdipCloneMatrix(GpMatrix*,GpMatrix**); -GpStatus WINGDIPAPI GdipDeleteMatrix(GpMatrix*); -GpStatus WINGDIPAPI GdipSetMatrixElements(GpMatrix*,REAL,REAL,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipMultiplyMatrix(GpMatrix*,GpMatrix*,GpMatrixOrder); -GpStatus WINGDIPAPI GdipTranslateMatrix(GpMatrix*,REAL,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipScaleMatrix(GpMatrix*,REAL,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipRotateMatrix(GpMatrix*,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipShearMatrix(GpMatrix*,REAL,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipInvertMatrix(GpMatrix*); -GpStatus WINGDIPAPI GdipTransformMatrixPoints(GpMatrix*,GpPointF*,INT); -GpStatus WINGDIPAPI GdipTransformMatrixPointsI(GpMatrix*,GpPoint*,INT); -GpStatus WINGDIPAPI GdipVectorTransformMatrixPoints(GpMatrix*,GpPointF*,INT); -GpStatus WINGDIPAPI GdipVectorTransformMatrixPointsI(GpMatrix*,GpPoint*,INT); -GpStatus WINGDIPAPI GdipGetMatrixElements(GDIPCONST GpMatrix*,REAL*); -GpStatus WINGDIPAPI GdipIsMatrixInvertible(GDIPCONST GpMatrix*,BOOL*); -GpStatus WINGDIPAPI GdipIsMatrixIdentity(GDIPCONST GpMatrix*,BOOL*); -GpStatus WINGDIPAPI GdipIsMatrixEqual(GDIPCONST GpMatrix*,GDIPCONST GpMatrix*,BOOL*); - -/* Metafile functions */ -GpStatus WINGDIPAPI GdipGetMetafileHeaderFromEmf(HENHMETAFILE,MetafileHeader*); -GpStatus WINGDIPAPI GdipGetMetafileHeaderFromFile(GDIPCONST WCHAR*,MetafileHeader*); -GpStatus WINGDIPAPI GdipGetMetafileHeaderFromStream(IStream*,MetafileHeader*); -GpStatus WINGDIPAPI GdipGetMetafileHeaderFromMetafile(GpMetafile*,MetafileHeader*); -GpStatus WINGDIPAPI GdipGetHemfFromMetafile(GpMetafile*,HENHMETAFILE*); -GpStatus WINGDIPAPI GdipCreateStreamOnFile(GDIPCONST WCHAR*,UINT,IStream**); -GpStatus WINGDIPAPI GdipCreateMetafileFromWmf(HMETAFILE,BOOL,GDIPCONST WmfPlaceableFileHeader*,GpMetafile**); -GpStatus WINGDIPAPI GdipCreateMetafileFromEmf(HENHMETAFILE,BOOL,GpMetafile**); -GpStatus WINGDIPAPI GdipCreateMetafileFromFile(GDIPCONST WCHAR*,GpMetafile**); -GpStatus WINGDIPAPI GdipCreateMetafileFromWmfFile(GDIPCONST WCHAR*,GDIPCONST WmfPlaceableFileHeader*,GpMetafile**); -GpStatus WINGDIPAPI GdipCreateMetafileFromStream(IStream*,GpMetafile**); -GpStatus WINGDIPAPI GdipRecordMetafile(HDC,EmfType,GDIPCONST GpRectF*,MetafileFrameUnit,GDIPCONST WCHAR*,GpMetafile**); -GpStatus WINGDIPAPI GdipRecordMetafileI(HDC,EmfType,GDIPCONST GpRect*,MetafileFrameUnit,GDIPCONST WCHAR*,GpMetafile**); -GpStatus WINGDIPAPI GdipRecordMetafileFileName(GDIPCONST WCHAR*,HDC,EmfType,GDIPCONST GpRectF*,MetafileFrameUnit,GDIPCONST WCHAR*,GpMetafile**); -GpStatus WINGDIPAPI GdipRecordMetafileFileNameI(GDIPCONST WCHAR*,HDC,EmfType,GDIPCONST GpRect*,MetafileFrameUnit,GDIPCONST WCHAR*,GpMetafile**); -GpStatus WINGDIPAPI GdipRecordMetafileStream(IStream*,HDC,EmfType,GDIPCONST GpRectF*,MetafileFrameUnit,GDIPCONST WCHAR*,GpMetafile**); -GpStatus WINGDIPAPI GdipRecordMetafileStreamI(IStream*,HDC,EmfType,GDIPCONST GpRect*,MetafileFrameUnit,GDIPCONST WCHAR*,GpMetafile**); -GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile*,EmfPlusRecordType,UINT,UINT,GDIPCONST BYTE*); -GpStatus WINGDIPAPI GdipSetMetafileDownLevelRasterizationLimit(GpMetafile*,UINT); -GpStatus WINGDIPAPI GdipGetMetafileDownLevelRasterizationLimit(GDIPCONST GpMetafile*,UINT*); -GpStatus WINGDIPAPI GdipConvertToEmfPlus(GDIPCONST GpGraphics*,GpMetafile*,BOOL*,EmfType,GDIPCONST WCHAR*,GpMetafile**); -GpStatus WINGDIPAPI GdipConvertToEmfPlusToFile(GDIPCONST GpGraphics*,GpMetafile*,BOOL*,GDIPCONST WCHAR*,EmfType,GDIPCONST WCHAR*,GpMetafile**); -GpStatus WINGDIPAPI GdipConvertToEmfPlusToStream(GDIPCONST GpGraphics*,GpMetafile*,BOOL*,IStream*,EmfType,GDIPCONST WCHAR*,GpMetafile**); -UINT WINGDIPAPI GdipEmfToWmfBits(HENHMETAFILE,UINT,LPBYTE,INT,INT); - -/* PathGradientBrush functions */ -GpStatus WINGDIPAPI GdipCreatePathGradient(GDIPCONST GpPointF*,INT,GpWrapMode,GpPathGradient**); -GpStatus WINGDIPAPI GdipCreatePathGradientI(GDIPCONST GpPoint*,INT,GpWrapMode,GpPathGradient**); -GpStatus WINGDIPAPI GdipCreatePathGradientFromPath(GDIPCONST GpPath*,GpPathGradient**); -GpStatus WINGDIPAPI GdipGetPathGradientCenterColor(GpPathGradient*,ARGB*); -GpStatus WINGDIPAPI GdipSetPathGradientCenterColor(GpPathGradient*,ARGB); -GpStatus WINGDIPAPI GdipGetPathGradientSurroundColorsWithCount(GpPathGradient*,ARGB*,INT*); -GpStatus WINGDIPAPI GdipSetPathGradientSurroundColorsWithCount(GpPathGradient*,GDIPCONST ARGB*,INT*); -GpStatus WINGDIPAPI GdipGetPathGradientPath(GpPathGradient*,GpPath*); -GpStatus WINGDIPAPI GdipSetPathGradientPath(GpPathGradient*,GDIPCONST GpPath*); -GpStatus WINGDIPAPI GdipGetPathGradientCenterPoint(GpPathGradient*,GpPointF*); -GpStatus WINGDIPAPI GdipGetPathGradientCenterPointI(GpPathGradient*,GpPoint*); -GpStatus WINGDIPAPI GdipSetPathGradientCenterPoint(GpPathGradient*,GDIPCONST GpPointF*); -GpStatus WINGDIPAPI GdipSetPathGradientCenterPointI(GpPathGradient*,GDIPCONST GpPoint*); -GpStatus WINGDIPAPI GdipGetPathGradientRect(GpPathGradient*,GpRectF*); -GpStatus WINGDIPAPI GdipGetPathGradientRectI(GpPathGradient*,GpRect*); -GpStatus WINGDIPAPI GdipGetPathGradientPointCount(GpPathGradient*,INT*); -GpStatus WINGDIPAPI GdipGetPathGradientSurroundColorCount(GpPathGradient*,INT*); -GpStatus WINGDIPAPI GdipSetPathGradientGammaCorrection(GpPathGradient*,BOOL); -GpStatus WINGDIPAPI GdipGetPathGradientGammaCorrection(GpPathGradient*,BOOL*); -GpStatus WINGDIPAPI GdipGetPathGradientBlendCount(GpPathGradient*,INT*); -GpStatus WINGDIPAPI GdipGetPathGradientBlend(GpPathGradient*,REAL*,REAL*,INT); -GpStatus WINGDIPAPI GdipSetPathGradientBlend(GpPathGradient*,GDIPCONST REAL*,GDIPCONST REAL*,INT); -GpStatus WINGDIPAPI GdipGetPathGradientPresetBlendCount(GpPathGradient*,INT*); -GpStatus WINGDIPAPI GdipGetPathGradientPresetBlend(GpPathGradient*,ARGB*,REAL*,INT); -GpStatus WINGDIPAPI GdipSetPathGradientPresetBlend(GpPathGradient*,GDIPCONST ARGB*,GDIPCONST REAL*,INT); -GpStatus WINGDIPAPI GdipSetPathGradientSigmaBlend(GpPathGradient*,REAL,REAL); -GpStatus WINGDIPAPI GdipSetPathGradientLinearBlend(GpPathGradient*,REAL,REAL); -GpStatus WINGDIPAPI GdipGetPathGradientWrapMode(GpPathGradient*,GpWrapMode*); -GpStatus WINGDIPAPI GdipSetPathGradientWrapMode(GpPathGradient*,GpWrapMode); -GpStatus WINGDIPAPI GdipGetPathGradientTransform(GpPathGradient*,GpMatrix*); -GpStatus WINGDIPAPI GdipSetPathGradientTransform(GpPathGradient*,GpMatrix*); -GpStatus WINGDIPAPI GdipResetPathGradientTransform(GpPathGradient*); -GpStatus WINGDIPAPI GdipMultiplyPathGradientTransform(GpPathGradient*,GDIPCONST GpMatrix*,GpMatrixOrder); -GpStatus WINGDIPAPI GdipTranslatePathGradientTransform(GpPathGradient*,REAL,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipScalePathGradientTransform(GpPathGradient*,REAL,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipRotatePathGradientTransform(GpPathGradient*,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipGetPathGradientFocusScales(GpPathGradient*,REAL*,REAL*); -GpStatus WINGDIPAPI GdipSetPathGradientFocusScales(GpPathGradient*,REAL,REAL); - -/* PathIterator functions */ -GpStatus WINGDIPAPI GdipCreatePathIter(GpPathIterator**,GpPath*); -GpStatus WINGDIPAPI GdipDeletePathIter(GpPathIterator*); -GpStatus WINGDIPAPI GdipPathIterNextSubpath(GpPathIterator*,INT*,INT*,INT*,BOOL*); -GpStatus WINGDIPAPI GdipPathIterNextSubpathPath(GpPathIterator*,INT*,GpPath*,BOOL*); -GpStatus WINGDIPAPI GdipPathIterNextPathType(GpPathIterator*,INT*,BYTE*,INT*,INT*); -GpStatus WINGDIPAPI GdipPathIterNextMarker(GpPathIterator*,INT*,INT*,INT*); -GpStatus WINGDIPAPI GdipPathIterNextMarkerPath(GpPathIterator*,INT*,GpPath*); -GpStatus WINGDIPAPI GdipPathIterGetCount(GpPathIterator*,INT*); -GpStatus WINGDIPAPI GdipPathIterGetSubpathCount(GpPathIterator*,INT*); -GpStatus WINGDIPAPI GdipPathIterIsValid(GpPathIterator*,BOOL*); -GpStatus WINGDIPAPI GdipPathIterHasCurve(GpPathIterator*,BOOL*); -GpStatus WINGDIPAPI GdipPathIterRewind(GpPathIterator*); -GpStatus WINGDIPAPI GdipPathIterEnumerate(GpPathIterator*,INT*,GpPointF*,BYTE*,INT); -GpStatus WINGDIPAPI GdipPathIterCopyData(GpPathIterator*,INT*,GpPointF*,BYTE*,INT,INT); - -/* Pen functions */ -GpStatus WINGDIPAPI GdipCreatePen1(ARGB,REAL,GpUnit,GpPen**); -GpStatus WINGDIPAPI GdipCreatePen2(GpBrush*,REAL,GpUnit,GpPen**); -GpStatus WINGDIPAPI GdipClonePen(GpPen*,GpPen**); -GpStatus WINGDIPAPI GdipDeletePen(GpPen*); -GpStatus WINGDIPAPI GdipSetPenWidth(GpPen*,REAL); -GpStatus WINGDIPAPI GdipGetPenWidth(GpPen*,REAL*); -GpStatus WINGDIPAPI GdipSetPenUnit(GpPen*,GpUnit); -GpStatus WINGDIPAPI GdipGetPenUnit(GpPen*,GpUnit*); -GpStatus WINGDIPAPI GdipSetPenLineCap197819(GpPen*,GpLineCap,GpLineCap,GpDashCap); -GpStatus WINGDIPAPI GdipSetPenStartCap(GpPen*,GpLineCap); -GpStatus WINGDIPAPI GdipSetPenEndCap(GpPen*,GpLineCap); -GpStatus WINGDIPAPI GdipSetPenDashCap197819(GpPen*,GpDashCap); -GpStatus WINGDIPAPI GdipGetPenStartCap(GpPen*,GpLineCap*); -GpStatus WINGDIPAPI GdipGetPenEndCap(GpPen*,GpLineCap*); -GpStatus WINGDIPAPI GdipGetPenDashCap197819(GpPen*,GpDashCap*); -GpStatus WINGDIPAPI GdipSetPenLineJoin(GpPen*,GpLineJoin); -GpStatus WINGDIPAPI GdipGetPenLineJoin(GpPen*,GpLineJoin*); -GpStatus WINGDIPAPI GdipSetPenCustomStartCap(GpPen*,GpCustomLineCap*); -GpStatus WINGDIPAPI GdipGetPenCustomStartCap(GpPen*,GpCustomLineCap**); -GpStatus WINGDIPAPI GdipSetPenCustomEndCap(GpPen*,GpCustomLineCap*); -GpStatus WINGDIPAPI GdipGetPenCustomEndCap(GpPen*,GpCustomLineCap**); -GpStatus WINGDIPAPI GdipSetPenMiterLimit(GpPen*,REAL); -GpStatus WINGDIPAPI GdipGetPenMiterLimit(GpPen*,REAL*); -GpStatus WINGDIPAPI GdipSetPenMode(GpPen*,GpPenAlignment); -GpStatus WINGDIPAPI GdipGetPenMode(GpPen*,GpPenAlignment*); -GpStatus WINGDIPAPI GdipSetPenTransform(GpPen*,GpMatrix*); -GpStatus WINGDIPAPI GdipGetPenTransform(GpPen*,GpMatrix*); -GpStatus WINGDIPAPI GdipResetPenTransform(GpPen*); -GpStatus WINGDIPAPI GdipMultiplyPenTransform(GpPen*,GDIPCONST GpMatrix*,GpMatrixOrder); -GpStatus WINGDIPAPI GdipTranslatePenTransform(GpPen*,REAL,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipScalePenTransform(GpPen*,REAL,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipRotatePenTransform(GpPen*,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipSetPenColor(GpPen*,ARGB); -GpStatus WINGDIPAPI GdipGetPenColor(GpPen*,ARGB*); -GpStatus WINGDIPAPI GdipSetPenBrushFill(GpPen*,GpBrush*); -GpStatus WINGDIPAPI GdipGetPenBrushFill(GpPen*,GpBrush**); -GpStatus WINGDIPAPI GdipGetPenFillType(GpPen*,GpPenType*); -GpStatus WINGDIPAPI GdipGetPenDashStyle(GpPen*,GpDashStyle*); -GpStatus WINGDIPAPI GdipSetPenDashStyle(GpPen*,GpDashStyle); -GpStatus WINGDIPAPI GdipGetPenDashOffset(GpPen*,REAL*); -GpStatus WINGDIPAPI GdipSetPenDashOffset(GpPen*,REAL); -GpStatus WINGDIPAPI GdipGetPenDashCount(GpPen*,INT*); -GpStatus WINGDIPAPI GdipSetPenDashArray(GpPen*,GDIPCONST REAL*,INT); -GpStatus WINGDIPAPI GdipGetPenDashArray(GpPen*,REAL*,INT); -GpStatus WINGDIPAPI GdipGetPenCompoundCount(GpPen*,INT*); -GpStatus WINGDIPAPI GdipSetPenCompoundArray(GpPen*,GDIPCONST REAL*,INT); -GpStatus WINGDIPAPI GdipGetPenCompoundArray(GpPen*,REAL*,INT); - -/* Region functions */ -GpStatus WINGDIPAPI GdipCreateRegion(GpRegion**); -GpStatus WINGDIPAPI GdipCreateRegionRect(GDIPCONST GpRectF*,GpRegion**); -GpStatus WINGDIPAPI GdipCreateRegionRectI(GDIPCONST GpRect*,GpRegion**); -GpStatus WINGDIPAPI GdipCreateRegionPath(GpPath*,GpRegion**); -GpStatus WINGDIPAPI GdipCreateRegionRgnData(GDIPCONST BYTE*,INT,GpRegion**); -GpStatus WINGDIPAPI GdipCreateRegionHrgn(HRGN,GpRegion**); -GpStatus WINGDIPAPI GdipCloneRegion(GpRegion*,GpRegion**); -GpStatus WINGDIPAPI GdipDeleteRegion(GpRegion*); -GpStatus WINGDIPAPI GdipSetInfinite(GpRegion*); -GpStatus WINGDIPAPI GdipSetEmpty(GpRegion*); -GpStatus WINGDIPAPI GdipCombineRegionRect(GpRegion*,GDIPCONST GpRectF*,CombineMode); -GpStatus WINGDIPAPI GdipCombineRegionRectI(GpRegion*,GDIPCONST GpRect*,CombineMode); -GpStatus WINGDIPAPI GdipCombineRegionPath(GpRegion*,GpPath*,CombineMode); -GpStatus WINGDIPAPI GdipCombineRegionRegion(GpRegion*,GpRegion*,CombineMode); -GpStatus WINGDIPAPI GdipTranslateRegion(GpRegion*,REAL,REAL); -GpStatus WINGDIPAPI GdipTranslateRegionI(GpRegion*,INT,INT); -GpStatus WINGDIPAPI GdipTransformRegion(GpRegion*,GpMatrix*); -GpStatus WINGDIPAPI GdipGetRegionBounds(GpRegion*,GpGraphics*,GpRectF*); -GpStatus WINGDIPAPI GdipGetRegionBoundsI(GpRegion*,GpGraphics*,GpRect*); -GpStatus WINGDIPAPI GdipGetRegionHRgn(GpRegion*,GpGraphics*,HRGN*); -GpStatus WINGDIPAPI GdipIsEmptyRegion(GpRegion*,GpGraphics*,BOOL*); -GpStatus WINGDIPAPI GdipIsInfiniteRegion(GpRegion*,GpGraphics*,BOOL*); -GpStatus WINGDIPAPI GdipIsEqualRegion(GpRegion*,GpRegion*,GpGraphics*,BOOL*); -GpStatus WINGDIPAPI GdipGetRegionDataSize(GpRegion*,UINT*); -GpStatus WINGDIPAPI GdipGetRegionData(GpRegion*,BYTE*,UINT,UINT*); -GpStatus WINGDIPAPI GdipIsVisibleRegionPoint(GpRegion*,REAL,REAL,GpGraphics*,BOOL*); -GpStatus WINGDIPAPI GdipIsVisibleRegionPointI(GpRegion*,INT,INT,GpGraphics*,BOOL*); -GpStatus WINGDIPAPI GdipIsVisibleRegionRect(GpRegion*,REAL,REAL,REAL,REAL,GpGraphics*,BOOL*); -GpStatus WINGDIPAPI GdipIsVisibleRegionRectI(GpRegion*,INT,INT,INT,INT,GpGraphics*,BOOL*); -GpStatus WINGDIPAPI GdipGetRegionScansCount(GpRegion*,UINT*,GpMatrix*); -GpStatus WINGDIPAPI GdipGetRegionScans(GpRegion*,GpRectF*,INT*,GpMatrix*); -GpStatus WINGDIPAPI GdipGetRegionScansI(GpRegion*,GpRect*,INT*,GpMatrix*); - -/* SolidBrush functions */ -GpStatus WINGDIPAPI GdipCreateSolidFill(ARGB,GpSolidFill**); -GpStatus WINGDIPAPI GdipSetSolidFillColor(GpSolidFill*,ARGB); -GpStatus WINGDIPAPI GdipGetSolidFillColor(GpSolidFill*,ARGB*); - -/* StringFormat functions */ -GpStatus WINGDIPAPI GdipCreateStringFormat(INT,LANGID,GpStringFormat**); -GpStatus WINGDIPAPI GdipStringFormatGetGenericDefault(GpStringFormat**); -GpStatus WINGDIPAPI GdipStringFormatGetGenericTypographic(GpStringFormat**); -GpStatus WINGDIPAPI GdipDeleteStringFormat(GpStringFormat*); -GpStatus WINGDIPAPI GdipCloneStringFormat(GDIPCONST GpStringFormat*,GpStringFormat**); -GpStatus WINGDIPAPI GdipSetStringFormatFlags(GpStringFormat*,INT); -GpStatus WINGDIPAPI GdipGetStringFormatFlags(GDIPCONST GpStringFormat*,INT*); -GpStatus WINGDIPAPI GdipSetStringFormatAlign(GpStringFormat*,StringAlignment); -GpStatus WINGDIPAPI GdipGetStringFormatAlign(GDIPCONST GpStringFormat*,StringAlignment*); -GpStatus WINGDIPAPI GdipSetStringFormatLineAlign(GpStringFormat*,StringAlignment); -GpStatus WINGDIPAPI GdipGetStringFormatLineAlign(GDIPCONST GpStringFormat*,StringAlignment*); -GpStatus WINGDIPAPI GdipSetStringFormatTrimming(GpStringFormat*,StringTrimming); -GpStatus WINGDIPAPI GdipGetStringFormatTrimming(GDIPCONST GpStringFormat*,StringTrimming*); -GpStatus WINGDIPAPI GdipSetStringFormatHotkeyPrefix(GpStringFormat*,INT); -GpStatus WINGDIPAPI GdipGetStringFormatHotkeyPrefix(GDIPCONST GpStringFormat*,INT*); -GpStatus WINGDIPAPI GdipSetStringFormatTabStops(GpStringFormat*,REAL,INT,GDIPCONST REAL*); -GpStatus WINGDIPAPI GdipGetStringFormatTabStops(GDIPCONST GpStringFormat*,INT,REAL*,REAL*); -GpStatus WINGDIPAPI GdipGetStringFormatTabStopCount(GDIPCONST GpStringFormat*,INT*); -GpStatus WINGDIPAPI GdipSetStringFormatDigitSubstitution(GpStringFormat*,LANGID,StringDigitSubstitute); -GpStatus WINGDIPAPI GdipGetStringFormatDigitSubstitution(GDIPCONST GpStringFormat*,LANGID*,StringDigitSubstitute*); -GpStatus WINGDIPAPI GdipGetStringFormatMeasurableCharacterRangeCount(GDIPCONST GpStringFormat*,INT*); -GpStatus WINGDIPAPI GdipSetStringFormatMeasurableCharacterRanges(GpStringFormat*,INT,GDIPCONST CharacterRange*); - -/* Text functions */ -GpStatus WINGDIPAPI GdipDrawString(GpGraphics*,GDIPCONST WCHAR*,INT,GDIPCONST GpFont*,GDIPCONST RectF*,GDIPCONST GpStringFormat*,GDIPCONST GpBrush*); -GpStatus WINGDIPAPI GdipMeasureString(GpGraphics*,GDIPCONST WCHAR*,INT,GDIPCONST GpFont*,GDIPCONST RectF*,GDIPCONST GpStringFormat*,RectF*,INT*,INT*); -#ifdef __cplusplus -GpStatus WINGDIPAPI GdipMeasureCharacterRanges(GpGraphics*,GDIPCONST WCHAR*,INT,GDIPCONST GpFont*,GDIPCONST RectF&,GDIPCONST GpStringFormat*,INT,GpRegion**); -#endif -GpStatus WINGDIPAPI GdipDrawDriverString(GpGraphics*,GDIPCONST UINT16*,INT,GDIPCONST GpFont*,GDIPCONST GpBrush*,GDIPCONST PointF*,INT,GDIPCONST GpMatrix*); -GpStatus WINGDIPAPI GdipMeasureDriverString(GpGraphics*,GDIPCONST UINT16*,INT,GDIPCONST GpFont*,GDIPCONST PointF*,INT,GDIPCONST GpMatrix*,RectF*); - -/* TextureBrush functions */ -GpStatus WINGDIPAPI GdipCreateTexture(GpImage*,GpWrapMode,GpTexture**); -GpStatus WINGDIPAPI GdipCreateTexture2(GpImage*,GpWrapMode,REAL,REAL,REAL,REAL,GpTexture**); -GpStatus WINGDIPAPI GdipCreateTexture2I(GpImage*,GpWrapMode,INT,INT,INT,INT,GpTexture**); -GpStatus WINGDIPAPI GdipCreateTextureIA(GpImage*,GDIPCONST GpImageAttributes*,REAL,REAL,REAL,REAL,GpTexture**); -GpStatus WINGDIPAPI GdipCreateTextureIAI(GpImage*,GDIPCONST GpImageAttributes*,INT,INT,INT,INT,GpTexture**); -GpStatus WINGDIPAPI GdipGetTextureTransform(GpTexture*,GpMatrix*); -GpStatus WINGDIPAPI GdipSetTextureTransform(GpTexture*,GDIPCONST GpMatrix*); -GpStatus WINGDIPAPI GdipResetTextureTransform(GpTexture*); -GpStatus WINGDIPAPI GdipMultiplyTextureTransform(GpTexture*,GDIPCONST GpMatrix*,GpMatrixOrder); -GpStatus WINGDIPAPI GdipTranslateTextureTransform(GpTexture*,REAL,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipScaleTextureTransform(GpTexture*,REAL,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipRotateTextureTransform(GpTexture*,REAL,GpMatrixOrder); -GpStatus WINGDIPAPI GdipSetTextureWrapMode(GpTexture*,GpWrapMode); -GpStatus WINGDIPAPI GdipGetTextureWrapMode(GpTexture*,GpWrapMode*); -GpStatus WINGDIPAPI GdipGetTextureImage(GpTexture*,GpImage**); - -/* uncategorized functions */ -GpStatus WINGDIPAPI GdipTestControl(GpTestControlEnum,void*); - -#ifdef __cplusplus -} /* extern "C" */ -} /* namespace DllExports */ -#endif - -#endif /* __GDIPLUS_FLAT_H */ diff --git a/src/gdiplus4/gdiplusgpstubs.h b/src/gdiplus4/gdiplusgpstubs.h deleted file mode 100644 index b11d4163..00000000 --- a/src/gdiplus4/gdiplusgpstubs.h +++ /dev/null @@ -1,139 +0,0 @@ -/* - * gdiplusgpstubs.h - * - * GDI+ Gp* type declarations - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_GPSTUBS_H -#define __GDIPLUS_GPSTUBS_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -typedef Point GpPoint; -typedef PointF GpPointF; -typedef Rect GpRect; -typedef RectF GpRectF; -typedef Size GpSize; -typedef SizeF GpSizeF; - -typedef enum BrushType GpBrushType; -typedef enum CombineMode GpCombineMode; -typedef enum CompositingMode GpCompositingMode; -typedef enum CompositingQuality GpCompositingQuality; -typedef enum CoordinateSpace GpCoordinateSpace; -typedef enum CustomLineCapType GpCustomLineCapType; -typedef enum DashCap GpDashCap; -typedef enum DashStyle GpDashStyle; -typedef enum DitherType GpDitherType; -typedef enum DriverStringOptions GpDriverStringOptions; -typedef enum EmfPlusRecordType GpEmfPlusRecordType; -typedef enum EmfToWmfBitsFlags GpEmfToWmfBitsFlags; -typedef enum EmfType GpEmfType; -typedef enum EncoderParameterValueType GpEncoderParameterValueType; -typedef enum EncoderValue GpEncoderValue; -typedef enum FillMode GpFillMode; -typedef enum FlushIntention GpFlushIntention; -typedef enum FontStyle GpFontStyle; -typedef enum HatchStyle GpHatchStyle; -typedef enum HotkeyPrefix GpHotkeyPrefix; -typedef enum ImageType GpImageType; -typedef enum InterpolationMode GpInterpolationMode; -typedef enum LinearGradientMode GpLinearGradientMode; -typedef enum LineCap GpLineCap; -typedef enum LineJoin GpLineJoin; -typedef enum MatrixOrder GpMatrixOrder; -typedef enum MetafileFrameUnit GpMetafileFrameUnit; -typedef enum MetafileType GpMetafileType; -typedef enum ObjectType GpObjectType; -typedef enum PathPointType GpPathPointType; -typedef enum PenAlignment GpPenAlignment; -typedef enum PenType GpPenType; -typedef enum PixelOffsetMode GpPixelOffsetMode; -typedef enum QualityMode GpQualityMode; -typedef enum SmoothingMode GpSmoothingMode; -typedef enum StringAlignment GpStringAlignment; -typedef enum StringDigitSubstitute GpStringDigitSubstitute; -typedef enum StringFormatFlags GpStringFormatFlags; -typedef enum StringTrimming GpStringTrimming; -typedef enum TextRenderingHint GpTextRenderingHint; -typedef enum Unit GpUnit; -typedef enum WarpMode GpWarpMode; -typedef enum WrapMode GpWrapMode; - -#ifdef __cplusplus - -class CGpEffect {}; -class GpCustomLineCap {}; -class GpImage {}; - -class GpAdjustableArrowCap: public GpCustomLineCap {}; -class GpBitmap: public GpImage {}; -class GpBrush {}; -class GpCachedBitmap {}; -class GpFont {}; -class GpFontCollection {}; -class GpFontFamily {}; -class GpGraphics {}; -class GpHatch: public GpBrush {}; /* HatchBrush */ -class GpImageAttributes {}; -class GpLineGradient: public GpBrush {}; /* LinearGradientBrush */ -class GpMatrix {}; -class GpMetafile: public GpImage {}; -class GpPath {}; /* GraphicsPath */ -class GpPathData {}; -class GpPathGradient: public GpBrush {}; /* PathGradientBrush */ -class GpPathIterator {}; /* GraphicsPathIterator */ -class GpPen {}; -class GpRegion {}; -class GpSolidFill: public GpBrush {}; /* SolidBrush */ -class GpStringFormat {}; -class GpTexture: public GpBrush {}; /* TextureBrush */ - -#else /* !__cplusplus */ - -typedef void CGpEffect; -typedef void GpAdjustableArrowCap; -typedef void GpBitmap; -typedef void GpBrush; -typedef void GpCachedBitmap; -typedef void GpCustomLineCap; -typedef void GpFont; -typedef void GpFontFamily; -typedef void GpFontCollection; -typedef void GpGraphics; -typedef void GpHatch; -typedef void GpImage; -typedef void GpImageAttributes; -typedef void GpLineGradient; -typedef void GpMatrix; -typedef void GpMetafile; -typedef void GpPath; -typedef void GpPathData; -typedef void GpPathGradient; -typedef void GpPathIterator; -typedef void GpPen; -typedef void GpRegion; -typedef void GpSolidFill; -typedef void GpStringFormat; -typedef void GpTexture; - -#endif /* !__cplusplus */ - -#endif /* __GDIPLUS_GPSTUBS_H */ diff --git a/src/gdiplus4/gdiplusgraphics.h b/src/gdiplus4/gdiplusgraphics.h deleted file mode 100644 index 360c897e..00000000 --- a/src/gdiplus4/gdiplusgraphics.h +++ /dev/null @@ -1,1540 +0,0 @@ -/* - * gdiplusgraphics.h - * - * GDI+ Graphics class - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_GRAPHICS_H -#define __GDIPLUS_GRAPHICS_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#ifndef __cplusplus -#error "A C++ compiler is required to include gdiplusgraphics.h." -#endif - -class Graphics: public GdiplusBase -{ - friend class Bitmap; - friend class CachedBitmap; - friend class Font; - friend class GraphicsPath; - friend class Metafile; - friend class Region; - -public: - static Graphics* FromHDC(HDC hdc) - { - return new Graphics(hdc); - } - static Graphics* FromHDC(HDC hdc, HANDLE hdevice) - { - return new Graphics(hdc, hdevice); - } - static Graphics* FromHWND(HWND hwnd, BOOL icm = FALSE) - { - return new Graphics(hwnd, icm); - } - static Graphics* FromImage(Image *image) - { - return new Graphics(image); - } - static HPALETTE GetHalftonePalette() - { - return DllExports::GdipCreateHalftonePalette(); - } - - Graphics(Image *image): nativeGraphics(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipGetImageGraphicsContext( - image ? image->nativeImage : NULL, - &nativeGraphics); - } - Graphics(HDC hdc): nativeGraphics(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipCreateFromHDC( - hdc, &nativeGraphics); - } - Graphics(HDC hdc, HANDLE hdevice): nativeGraphics(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipCreateFromHDC2( - hdc, hdevice, &nativeGraphics); - } - Graphics(HWND hwnd, BOOL icm = FALSE): - nativeGraphics(NULL), lastStatus(Ok) - { - if (icm) { - lastStatus = DllExports::GdipCreateFromHWNDICM( - hwnd, &nativeGraphics); - } else { - lastStatus = DllExports::GdipCreateFromHWND( - hwnd, &nativeGraphics); - } - } - ~Graphics() - { - DllExports::GdipDeleteGraphics(nativeGraphics); - } - - Status AddMetafileComment(const BYTE *data, UINT sizeData) - { - return updateStatus(DllExports::GdipComment( - nativeGraphics, sizeData, data)); - } - GraphicsContainer BeginContainer() - { - GraphicsContainer result = 0; - updateStatus(DllExports::GdipBeginContainer2( - nativeGraphics, &result)); - return result; - } - GraphicsContainer BeginContainer(const RectF& dstrect, - const RectF& srcrect, Unit unit) - { - GraphicsContainer result = 0; - updateStatus(DllExports::GdipBeginContainer( - nativeGraphics, &dstrect, &srcrect, unit, - &result)); - return result; - } - GraphicsContainer BeginContainer(const Rect& dstrect, - const Rect& srcrect, Unit unit) - { - GraphicsContainer result = 0; - updateStatus(DllExports::GdipBeginContainerI( - nativeGraphics, &dstrect, &srcrect, unit, - &result)); - return result; - } - Status Clear(const Color& color) - { - return updateStatus(DllExports::GdipGraphicsClear( - nativeGraphics, color.GetValue())); - } - Status DrawArc(const Pen *pen, REAL x, REAL y, REAL width, REAL height, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipDrawArc( - nativeGraphics, pen ? pen->nativePen : NULL, - x, y, width, height, startAngle, sweepAngle)); - } - Status DrawArc(const Pen *pen, INT x, INT y, INT width, INT height, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipDrawArcI( - nativeGraphics, pen ? pen->nativePen : NULL, - x, y, width, height, startAngle, sweepAngle)); - } - Status DrawArc(const Pen *pen, const RectF& rect, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipDrawArc( - nativeGraphics, pen ? pen->nativePen : NULL, - rect.X, rect.Y, rect.Width, rect.Height, - startAngle, sweepAngle)); - } - Status DrawArc(const Pen *pen, const Rect& rect, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipDrawArcI( - nativeGraphics, pen ? pen->nativePen : NULL, - rect.X, rect.Y, rect.Width, rect.Height, - startAngle, sweepAngle)); - } - Status DrawBezier(const Pen *pen, - REAL x1, REAL y1, REAL x2, REAL y2, - REAL x3, REAL y3, REAL x4, REAL y4) - { - return updateStatus(DllExports::GdipDrawBezier( - nativeGraphics, pen ? pen->nativePen : NULL, - x1, y1, x2, y2, x3, y3, x4, y4)); - } - Status DrawBezier(const Pen *pen, - INT x1, INT y1, INT x2, INT y2, - INT x3, INT y3, INT x4, INT y4) - { - return updateStatus(DllExports::GdipDrawBezierI( - nativeGraphics, pen ? pen->nativePen : NULL, - x1, y1, x2, y2, x3, y3, x4, y4)); - } - Status DrawBezier(const Pen *pen, - const PointF& pt1, const PointF& pt2, - const PointF& pt3, const PointF& pt4) - { - return updateStatus(DllExports::GdipDrawBezier( - nativeGraphics, pen ? pen->nativePen : NULL, - pt1.X, pt1.Y, pt2.X, pt2.Y, - pt3.X, pt3.Y, pt4.X, pt4.Y)); - } - Status DrawBezier(const Pen *pen, - const Point& pt1, const Point& pt2, - const Point& pt3, const Point& pt4) - { - return updateStatus(DllExports::GdipDrawBezierI( - nativeGraphics, pen ? pen->nativePen : NULL, - pt1.X, pt1.Y, pt2.X, pt2.Y, - pt3.X, pt3.Y, pt4.X, pt4.Y)); - } - Status DrawBeziers(const Pen *pen, const PointF *points, INT count) - { - return updateStatus(DllExports::GdipDrawBeziers( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count)); - } - Status DrawBeziers(const Pen *pen, const Point *points, INT count) - { - return updateStatus(DllExports::GdipDrawBeziersI( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count)); - } - Status DrawCachedBitmap(CachedBitmap *cb, INT x, INT y) - { - return updateStatus(DllExports::GdipDrawCachedBitmap( - nativeGraphics, - cb ? cb->nativeCachedBitmap : NULL, - x, y)); - } - Status DrawClosedCurve(const Pen *pen, const PointF *points, INT count) - { - return updateStatus(DllExports::GdipDrawClosedCurve( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count)); - } - Status DrawClosedCurve(const Pen *pen, const Point *points, INT count) - { - return updateStatus(DllExports::GdipDrawClosedCurveI( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count)); - } - Status DrawClosedCurve(const Pen *pen, const PointF *points, INT count, - REAL tension) - { - return updateStatus(DllExports::GdipDrawClosedCurve2( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count, tension)); - } - Status DrawClosedCurve(const Pen *pen, const Point *points, INT count, - REAL tension) - { - return updateStatus(DllExports::GdipDrawClosedCurve2I( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count, tension)); - } - Status DrawCurve(const Pen *pen, const PointF *points, INT count) - { - return updateStatus(DllExports::GdipDrawCurve( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count)); - } - Status DrawCurve(const Pen *pen, const Point *points, INT count) - { - return updateStatus(DllExports::GdipDrawCurveI( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count)); - } - Status DrawCurve(const Pen *pen, const PointF *points, INT count, - REAL tension) - { - return updateStatus(DllExports::GdipDrawCurve2( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count, tension)); - } - Status DrawCurve(const Pen *pen, const Point *points, INT count, - REAL tension) - { - return updateStatus(DllExports::GdipDrawCurve2I( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count, tension)); - } - Status DrawCurve(const Pen *pen, const PointF *points, INT count, - INT offset, INT numberOfSegments, REAL tension) - { - return updateStatus(DllExports::GdipDrawCurve3( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count, offset, - numberOfSegments, tension)); - } - Status DrawCurve(const Pen *pen, const Point *points, INT count, - INT offset, INT numberOfSegments, REAL tension) - { - return updateStatus(DllExports::GdipDrawCurve3I( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count, offset, - numberOfSegments, tension)); - } - Status DrawDriverString(const UINT16 *text, INT length, - const Font *font, const Brush *brush, - const PointF *positions, INT flags, - const Matrix *matrix) - { - return updateStatus(DllExports::GdipDrawDriverString( - nativeGraphics, text, length, - font ? font->nativeFont : NULL, - brush ? brush->nativeBrush : NULL, - positions, flags, - matrix ? matrix->nativeMatrix : NULL)); - } - Status DrawEllipse(const Pen *pen, - REAL x, REAL y, REAL width, REAL height) - { - return updateStatus(DllExports::GdipDrawEllipse( - nativeGraphics, pen ? pen->nativePen : NULL, - x, y, width, height)); - } - Status DrawEllipse(const Pen *pen, INT x, INT y, INT width, INT height) - { - return updateStatus(DllExports::GdipDrawEllipseI( - nativeGraphics, pen ? pen->nativePen : NULL, - x, y, width, height)); - } - Status DrawEllipse(const Pen *pen, const RectF& rect) - { - return updateStatus(DllExports::GdipDrawEllipse( - nativeGraphics, pen ? pen->nativePen : NULL, - rect.X, rect.Y, rect.Width, rect.Height)); - } - Status DrawEllipse(const Pen *pen, const Rect& rect) - { - return updateStatus(DllExports::GdipDrawEllipseI( - nativeGraphics, pen ? pen->nativePen : NULL, - rect.X, rect.Y, rect.Width, rect.Height)); - } - Status DrawImage(Image *image, REAL x, REAL y) - { - return updateStatus(DllExports::GdipDrawImage( - nativeGraphics, - image ? image->nativeImage : NULL, - x, y)); - } - Status DrawImage(Image *image, INT x, INT y) - { - return updateStatus(DllExports::GdipDrawImageI( - nativeGraphics, - image ? image->nativeImage : NULL, - x, y)); - } - Status DrawImage(Image *image, const PointF& point) - { - return updateStatus(DllExports::GdipDrawImage( - nativeGraphics, - image ? image->nativeImage : NULL, - point.X, point.Y)); - } - Status DrawImage(Image *image, const Point& point) - { - return updateStatus(DllExports::GdipDrawImageI( - nativeGraphics, - image ? image->nativeImage : NULL, - point.X, point.Y)); - } - Status DrawImage(Image *image, REAL x, REAL y, REAL width, REAL height) - { - return updateStatus(DllExports::GdipDrawImageRect( - nativeGraphics, - image ? image->nativeImage : NULL, - x, y, width, height)); - } - Status DrawImage(Image *image, INT x, INT y, INT width, INT height) - { - return updateStatus(DllExports::GdipDrawImageRectI( - nativeGraphics, - image ? image->nativeImage : NULL, - x, y, width, height)); - } - Status DrawImage(Image *image, const RectF& rect) - { - return updateStatus(DllExports::GdipDrawImageRect( - nativeGraphics, - image ? image->nativeImage : NULL, - rect.X, rect.Y, rect.Width, rect.Height)); - } - Status DrawImage(Image *image, const Rect& rect) - { - return updateStatus(DllExports::GdipDrawImageRectI( - nativeGraphics, - image ? image->nativeImage : NULL, - rect.X, rect.Y, rect.Width, rect.Height)); - } - Status DrawImage(Image *image, const PointF *destPoints, INT count) - { - return updateStatus(DllExports::GdipDrawImagePoints( - nativeGraphics, - image ? image->nativeImage : NULL, - destPoints, count)); - } - Status DrawImage(Image *image, const Point *destPoints, INT count) - { - return updateStatus(DllExports::GdipDrawImagePointsI( - nativeGraphics, - image ? image->nativeImage : NULL, - destPoints, count)); - } - Status DrawImage(Image *image, REAL x, REAL y, REAL srcx, REAL srcy, - REAL srcwidth, REAL srcheight, Unit srcUnit) - { - return updateStatus(DllExports::GdipDrawImagePointRect( - nativeGraphics, - image ? image->nativeImage : NULL, - x, y, srcx, srcy, srcwidth, srcheight, - srcUnit)); - } - Status DrawImage(Image *image, INT x, INT y, INT srcx, INT srcy, - INT srcwidth, INT srcheight, Unit srcUnit) - { - return updateStatus(DllExports::GdipDrawImagePointRectI( - nativeGraphics, - image ? image->nativeImage : NULL, - x, y, srcx, srcy, srcwidth, srcheight, - srcUnit)); - } - Status DrawImage(Image *image, const RectF& destRect, - REAL srcx, REAL srcy, REAL srcwidth, REAL srcheight, - Unit srcUnit, - const ImageAttributes *imageAttributes = NULL, - DrawImageAbort callback = NULL, - VOID *callbackData = NULL) - { - return updateStatus(DllExports::GdipDrawImageRectRect( - nativeGraphics, - image ? image->nativeImage : NULL, - destRect.X, destRect.Y, - destRect.Width, destRect.Height, - srcx, srcy, srcwidth, srcheight, srcUnit, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL, - callback, callbackData)); - } - Status DrawImage(Image *image, const Rect& destRect, - INT srcx, INT srcy, INT srcwidth, INT srcheight, - Unit srcUnit, - const ImageAttributes *imageAttributes = NULL, - DrawImageAbort callback = NULL, - VOID *callbackData = NULL) - { - return updateStatus(DllExports::GdipDrawImageRectRectI( - nativeGraphics, - image ? image->nativeImage : NULL, - destRect.X, destRect.Y, - destRect.Width, destRect.Height, - srcx, srcy, srcwidth, srcheight, srcUnit, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL, - callback, callbackData)); - } - Status DrawImage(Image *image, const RectF& destRect, - const RectF& sourceRect, Unit srcUnit, - const ImageAttributes *imageAttributes = NULL) - { - return updateStatus(DllExports::GdipDrawImageRectRectI( - nativeGraphics, - image ? image->nativeImage : NULL, - destRect.X, destRect.Y, - destRect.Width, destRect.Height, - sourceRect.X, sourceRect.Y, - sourceRect.Width, sourceRect.Height, srcUnit, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL, - NULL, NULL)); - } - Status DrawImage(Image *image, const PointF *destPoints, INT count, - REAL srcx, REAL srcy, REAL srcwidth, REAL srcheight, - Unit srcUnit, - const ImageAttributes *imageAttributes = NULL, - DrawImageAbort callback = NULL, - VOID *callbackData = NULL) - { - return updateStatus(DllExports::GdipDrawImagePointsRect( - nativeGraphics, - image ? image->nativeImage : NULL, - destPoints, count, - srcx, srcy, srcwidth, srcheight, srcUnit, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL, - callback, callbackData)); - } - Status DrawImage(Image *image, const Point *destPoints, INT count, - INT srcx, INT srcy, INT srcwidth, INT srcheight, - Unit srcUnit, - const ImageAttributes *imageAttributes = NULL, - DrawImageAbort callback = NULL, - VOID *callbackData = NULL) - { - return updateStatus(DllExports::GdipDrawImagePointsRectI( - nativeGraphics, - image ? image->nativeImage : NULL, - destPoints, count, - srcx, srcy, srcwidth, srcheight, srcUnit, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL, - callback, callbackData)); - } - // TODO: [GDI+ 1.1] Graphics::DrawImage(..Effect..) - //Status DrawImage(Image *image, RectF *sourceRect, Matrix *matrix, - // Effect *effect, ImageAttributes *imageAttributes, - // Unit srcUnit) - //{ - // return updateStatus(DllExports::GdipDrawImageFX( - // nativeGraphics, - // image ? image->nativeImage : NULL, - // sourceRect, - // matrix ? matrix->nativeMatrix : NULL, - // effect ? effect->nativeEffect : NULL, - // imageAttributes ? imageAttributes->nativeImageAttributes : NULL, - // srcUnit)); - //} - Status DrawLine(const Pen *pen, REAL x1, REAL y1, REAL x2, REAL y2) - { - return updateStatus(DllExports::GdipDrawLine( - nativeGraphics, pen ? pen->nativePen : NULL, - x1, y1, x2, y2)); - } - Status DrawLine(const Pen *pen, INT x1, INT y1, INT x2, INT y2) - { - return updateStatus(DllExports::GdipDrawLineI( - nativeGraphics, pen ? pen->nativePen : NULL, - x1, y1, x2, y2)); - } - Status DrawLine(const Pen *pen, const PointF& pt1, const PointF& pt2) - { - return updateStatus(DllExports::GdipDrawLine( - nativeGraphics, pen ? pen->nativePen : NULL, - pt1.X, pt1.Y, pt2.X, pt2.Y)); - } - Status DrawLine(const Pen *pen, const Point& pt1, const Point& pt2) - { - return updateStatus(DllExports::GdipDrawLineI( - nativeGraphics, pen ? pen->nativePen : NULL, - pt1.X, pt1.Y, pt2.X, pt2.Y)); - } - Status DrawLines(const Pen *pen, const PointF *points, INT count) - { - return updateStatus(DllExports::GdipDrawLines( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count)); - } - Status DrawLines(const Pen *pen, const Point *points, INT count) - { - return updateStatus(DllExports::GdipDrawLinesI( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count)); - } - Status DrawPath(const Pen *pen, const GraphicsPath *path) - { - return updateStatus(DllExports::GdipDrawPath( - nativeGraphics, pen ? pen->nativePen : NULL, - path ? path->nativePath : NULL)); - } - Status DrawPie(const Pen *pen, REAL x, REAL y, REAL width, REAL height, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipDrawPie( - nativeGraphics, pen ? pen->nativePen : NULL, - x, y, width, height, startAngle, sweepAngle)); - } - Status DrawPie(const Pen *pen, INT x, INT y, INT width, INT height, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipDrawPieI( - nativeGraphics, pen ? pen->nativePen : NULL, - x, y, width, height, startAngle, sweepAngle)); - } - Status DrawPie(const Pen *pen, const RectF& rect, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipDrawPie( - nativeGraphics, pen ? pen->nativePen : NULL, - rect.X, rect.Y, rect.Width, rect.Height, - startAngle, sweepAngle)); - } - Status DrawPie(const Pen *pen, const Rect& rect, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipDrawPieI( - nativeGraphics, pen ? pen->nativePen : NULL, - rect.X, rect.Y, rect.Width, rect.Height, - startAngle, sweepAngle)); - } - Status DrawPolygon(const Pen *pen, const PointF *points, INT count) - { - return updateStatus(DllExports::GdipDrawPolygon( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count)); - } - Status DrawPolygon(const Pen *pen, const Point *points, INT count) - { - return updateStatus(DllExports::GdipDrawPolygonI( - nativeGraphics, pen ? pen->nativePen : NULL, - points, count)); - } - Status DrawRectangle(const Pen *pen, - REAL x, REAL y, REAL width, REAL height) - { - return updateStatus(DllExports::GdipDrawRectangle( - nativeGraphics, pen ? pen->nativePen : NULL, - x, y, width, height)); - } - Status DrawRectangle(const Pen *pen, - INT x, INT y, INT width, INT height) - { - return updateStatus(DllExports::GdipDrawRectangleI( - nativeGraphics, pen ? pen->nativePen : NULL, - x, y, width, height)); - } - Status DrawRectangle(const Pen *pen, const RectF& rect) - { - return updateStatus(DllExports::GdipDrawRectangle( - nativeGraphics, pen ? pen->nativePen : NULL, - rect.X, rect.Y, rect.Width, rect.Height)); - } - Status DrawRectangle(const Pen *pen, const Rect& rect) - { - return updateStatus(DllExports::GdipDrawRectangleI( - nativeGraphics, pen ? pen->nativePen : NULL, - rect.X, rect.Y, rect.Width, rect.Height)); - } - Status DrawRectangles(const Pen *pen, const RectF *rects, INT count) - { - return updateStatus(DllExports::GdipDrawRectangles( - nativeGraphics, pen ? pen->nativePen : NULL, - rects, count)); - } - Status DrawRectangles(const Pen *pen, const Rect *rects, INT count) - { - return updateStatus(DllExports::GdipDrawRectanglesI( - nativeGraphics, pen ? pen->nativePen : NULL, - rects, count)); - } - Status DrawString(const WCHAR *string, INT length, const Font *font, - const PointF& origin, const Brush *brush) - { - RectF layoutRect(origin.X, origin.Y, 0.0f, 0.0f); - return updateStatus(DllExports::GdipDrawString( - nativeGraphics, string, length, - font ? font->nativeFont : NULL, - &layoutRect, NULL, - brush ? brush->nativeBrush : NULL)); - } - Status DrawString(const WCHAR *string, INT length, - const Font *font, const PointF& origin, - const StringFormat *stringFormat, const Brush *brush) - { - RectF layoutRect(origin.X, origin.Y, 0.0f, 0.0f); - return updateStatus(DllExports::GdipDrawString( - nativeGraphics, string, length, - font ? font->nativeFont : NULL, - &layoutRect, - stringFormat ? stringFormat->nativeStringFormat : NULL, - brush ? brush->nativeBrush : NULL)); - } - Status DrawString(const WCHAR *string, INT length, - const Font *font, const RectF& layoutRect, - const StringFormat *stringFormat, const Brush *brush) - { - return updateStatus(DllExports::GdipDrawString( - nativeGraphics, string, length, - font ? font->nativeFont : NULL, - &layoutRect, - stringFormat ? stringFormat->nativeStringFormat : NULL, - brush ? brush->nativeBrush : NULL)); - } - Status EndContainer(GraphicsContainer state) - { - return updateStatus(DllExports::GdipEndContainer( - nativeGraphics, state)); - } - Status EnumerateMetafile(const Metafile *metafile, - const PointF& destPoint, - EnumerateMetafileProc callback, - VOID *callbackData = NULL, - ImageAttributes *imageAttributes = NULL) - { - return updateStatus(DllExports::GdipEnumerateMetafileDestPoint( - nativeGraphics, - metafile ? ((GpMetafile*) metafile->nativeImage) : NULL, - destPoint, callback, callbackData, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL)); - } - Status EnumerateMetafile(const Metafile *metafile, - const Point& destPoint, - EnumerateMetafileProc callback, - VOID *callbackData = NULL, - ImageAttributes *imageAttributes = NULL) - { - return updateStatus(DllExports::GdipEnumerateMetafileDestPointI( - nativeGraphics, - metafile ? ((GpMetafile*) metafile->nativeImage) : NULL, - destPoint, callback, callbackData, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL)); - } - Status EnumerateMetafile(const Metafile *metafile, - const RectF& destRect, - EnumerateMetafileProc callback, - VOID *callbackData = NULL, - ImageAttributes *imageAttributes = NULL) - { - return updateStatus(DllExports::GdipEnumerateMetafileDestRect( - nativeGraphics, - metafile ? ((GpMetafile*) metafile->nativeImage) : NULL, - destRect, callback, callbackData, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL)); - } - Status EnumerateMetafile(const Metafile *metafile, - const Rect& destRect, - EnumerateMetafileProc callback, - VOID *callbackData = NULL, - ImageAttributes *imageAttributes = NULL) - { - return updateStatus(DllExports::GdipEnumerateMetafileDestRectI( - nativeGraphics, - metafile ? ((GpMetafile*) metafile->nativeImage) : NULL, - destRect, callback, callbackData, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL)); - } - Status EnumerateMetafile(const Metafile *metafile, - const PointF *destPoints, INT count, - EnumerateMetafileProc callback, - VOID *callbackData = NULL, - ImageAttributes *imageAttributes = NULL) - { - return updateStatus(DllExports::GdipEnumerateMetafileDestPoints( - nativeGraphics, - metafile ? ((GpMetafile*) metafile->nativeImage) : NULL, - destPoints, count, callback, callbackData, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL)); - } - Status EnumerateMetafile(const Metafile *metafile, - const Point *destPoints, INT count, - EnumerateMetafileProc callback, - VOID *callbackData = NULL, - ImageAttributes *imageAttributes = NULL) - { - return updateStatus(DllExports::GdipEnumerateMetafileDestPointsI( - nativeGraphics, - metafile ? ((GpMetafile*) metafile->nativeImage) : NULL, - destPoints, count, callback, callbackData, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL)); - } - Status EnumerateMetafile(const Metafile *metafile, - const PointF& destPoint, - const RectF& srcRect, Unit srcUnit, - EnumerateMetafileProc callback, - VOID *callbackData = NULL, - ImageAttributes *imageAttributes = NULL) - { - return updateStatus(DllExports::GdipEnumerateMetafileSrcRectDestPoint( - nativeGraphics, - metafile ? ((GpMetafile*) metafile->nativeImage) : NULL, - destPoint, srcRect, srcUnit, - callback, callbackData, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL)); - } - Status EnumerateMetafile(const Metafile *metafile, - const Point& destPoint, - const Rect& srcRect, Unit srcUnit, - EnumerateMetafileProc callback, - VOID *callbackData = NULL, - ImageAttributes *imageAttributes = NULL) - { - return updateStatus(DllExports::GdipEnumerateMetafileSrcRectDestPointI( - nativeGraphics, - metafile ? ((GpMetafile*) metafile->nativeImage) : NULL, - destPoint, srcRect, srcUnit, - callback, callbackData, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL)); - } - Status EnumerateMetafile(const Metafile *metafile, - const RectF& destRect, - const RectF& srcRect, Unit srcUnit, - EnumerateMetafileProc callback, - VOID *callbackData = NULL, - ImageAttributes *imageAttributes = NULL) - { - return updateStatus(DllExports::GdipEnumerateMetafileSrcRectDestRect( - nativeGraphics, - metafile ? ((GpMetafile*) metafile->nativeImage) : NULL, - destRect, srcRect, srcUnit, - callback, callbackData, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL)); - } - Status EnumerateMetafile(const Metafile *metafile, - const Rect& destRect, - const Rect& srcRect, Unit srcUnit, - EnumerateMetafileProc callback, - VOID *callbackData = NULL, - ImageAttributes *imageAttributes = NULL) - { - return updateStatus(DllExports::GdipEnumerateMetafileSrcRectDestRectI( - nativeGraphics, - metafile ? ((GpMetafile*) metafile->nativeImage) : NULL, - destRect, srcRect, srcUnit, - callback, callbackData, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL)); - } - Status EnumerateMetafile(const Metafile *metafile, - const PointF* destPoints, INT count, - const RectF& srcRect, Unit srcUnit, - EnumerateMetafileProc callback, - VOID *callbackData = NULL, - ImageAttributes *imageAttributes = NULL) - { - return updateStatus(DllExports::GdipEnumerateMetafileSrcRectDestPoints( - nativeGraphics, - metafile ? ((GpMetafile*) metafile->nativeImage) : NULL, - destPoints, count, srcRect, srcUnit, - callback, callbackData, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL)); - } - Status EnumerateMetafile(const Metafile *metafile, - const Point* destPoints, INT count, - const Rect& srcRect, Unit srcUnit, - EnumerateMetafileProc callback, - VOID *callbackData = NULL, - ImageAttributes *imageAttributes = NULL) - { - return updateStatus(DllExports::GdipEnumerateMetafileSrcRectDestPointsI( - nativeGraphics, - metafile ? ((GpMetafile*) metafile->nativeImage) : NULL, - destPoints, count, srcRect, srcUnit, - callback, callbackData, - imageAttributes ? imageAttributes->nativeImageAttributes : NULL)); - } - Status ExcludeClip(const RectF& rect) - { - return updateStatus(DllExports::GdipSetClipRect( - nativeGraphics, - rect.X, rect.Y, rect.Width, rect.Height, - CombineModeExclude)); - } - Status ExcludeClip(const Rect& rect) - { - return updateStatus(DllExports::GdipSetClipRectI( - nativeGraphics, - rect.X, rect.Y, rect.Width, rect.Height, - CombineModeExclude)); - } - Status ExcludeClip(const Region *region) - { - return updateStatus(DllExports::GdipSetClipRegion( - nativeGraphics, - region ? region->nativeRegion : NULL, - CombineModeExclude)); - } - Status FillClosedCurve(const Brush *brush, - const PointF *points, INT count) - { - return updateStatus(DllExports::GdipFillClosedCurve( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - points, count)); - } - Status FillClosedCurve(const Brush *brush, - const Point *points, INT count) - { - return updateStatus(DllExports::GdipFillClosedCurveI( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - points, count)); - } - Status FillClosedCurve(const Brush *brush, - const PointF *points, INT count, - FillMode fillMode, REAL tension = 0.5f) - { - return updateStatus(DllExports::GdipFillClosedCurve2( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - points, count, tension, fillMode)); - } - Status FillClosedCurve(const Brush *brush, - const Point *points, INT count, - FillMode fillMode, REAL tension = 0.5f) - { - return updateStatus(DllExports::GdipFillClosedCurve2I( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - points, count, tension, fillMode)); - } - Status FillEllipse(const Brush *brush, - REAL x, REAL y, REAL width, REAL height) - { - return updateStatus(DllExports::GdipFillEllipse( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - x, y, width, height)); - } - Status FillEllipse(const Brush *brush, - INT x, INT y, INT width, INT height) - { - return updateStatus(DllExports::GdipFillEllipseI( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - x, y, width, height)); - } - Status FillEllipse(const Brush *brush, const RectF& rect) - { - return updateStatus(DllExports::GdipFillEllipse( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - rect.X, rect.Y, rect.Width, rect.Height)); - } - Status FillEllipse(const Brush *brush, const Rect& rect) - { - return updateStatus(DllExports::GdipFillEllipseI( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - rect.X, rect.Y, rect.Width, rect.Height)); - } - Status FillPath(const Brush *brush, const GraphicsPath *path) - { - return updateStatus(DllExports::GdipFillPath( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - path ? path->nativePath : NULL)); - } - Status FillPie(const Brush *brush, - REAL x, REAL y, REAL width, REAL height, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipFillPie( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - x, y, width, height, startAngle, sweepAngle)); - } - Status FillPie(const Brush *brush, INT x, INT y, INT width, INT height, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipFillPieI( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - x, y, width, height, startAngle, sweepAngle)); - } - Status FillPie(const Brush *brush, const RectF& rect, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipFillPie( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - rect.X, rect.Y, rect.Width, rect.Height, - startAngle, sweepAngle)); - } - Status FillPie(const Brush *brush, const Rect& rect, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipFillPieI( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - rect.X, rect.Y, rect.Width, rect.Height, - startAngle, sweepAngle)); - } - Status FillPolygon(const Brush *brush, const PointF *points, INT count) - { - return updateStatus(DllExports::GdipFillPolygon( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - points, count, FillModeAlternate)); - } - Status FillPolygon(const Brush *brush, const Point *points, INT count) - { - return updateStatus(DllExports::GdipFillPolygonI( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - points, count, FillModeAlternate)); - } - Status FillPolygon(const Brush *brush, const PointF *points, INT count, - FillMode fillMode) - { - return updateStatus(DllExports::GdipFillPolygon( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - points, count, fillMode)); - } - Status FillPolygon(const Brush *brush, const Point *points, INT count, - FillMode fillMode) - { - return updateStatus(DllExports::GdipFillPolygonI( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - points, count, fillMode)); - } - Status FillRectangle(const Brush *brush, - REAL x, REAL y, REAL width, REAL height) - { - return updateStatus(DllExports::GdipFillRectangle( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - x, y, width, height)); - } - Status FillRectangle(const Brush *brush, - INT x, INT y, INT width, INT height) - { - return updateStatus(DllExports::GdipFillRectangleI( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - x, y, width, height)); - } - Status FillRectangle(const Brush *brush, const RectF& rect) - { - return updateStatus(DllExports::GdipFillRectangle( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - rect.X, rect.Y, rect.Width, rect.Height)); - } - Status FillRectangle(const Brush *brush, const Rect& rect) - { - return updateStatus(DllExports::GdipFillRectangleI( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - rect.X, rect.Y, rect.Width, rect.Height)); - } - Status FillRectangles(const Brush *brush, const RectF *rects, INT count) - { - return updateStatus(DllExports::GdipFillRectangles( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - rects, count)); - } - Status FillRectangles(const Brush *brush, const Rect *rects, INT count) - { - return updateStatus(DllExports::GdipFillRectanglesI( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - rects, count)); - } - Status FillRegion(const Brush *brush, const Region *region) - { - return updateStatus(DllExports::GdipFillRegion( - nativeGraphics, - brush ? brush->nativeBrush : NULL, - region ? region->nativeRegion : NULL)); - } - VOID Flush(FlushIntention intention = FlushIntentionFlush) - { - updateStatus(DllExports::GdipFlush(nativeGraphics, intention)); - } - Status GetClip(Region *region) const - { - return updateStatus(DllExports::GdipGetClip( - nativeGraphics, - region ? region->nativeRegion : NULL)); - } - Status GetClipBounds(RectF *rect) const - { - return updateStatus(DllExports::GdipGetClipBounds( - nativeGraphics, rect)); - } - Status GetClipBounds(Rect *rect) const - { - return updateStatus(DllExports::GdipGetClipBoundsI( - nativeGraphics, rect)); - } - CompositingMode GetCompositingMode() const - { - CompositingMode result = CompositingModeSourceOver; - updateStatus(DllExports::GdipGetCompositingMode( - nativeGraphics, &result)); - return result; - } - CompositingQuality GetCompositingQuality() const - { - CompositingQuality result = CompositingQualityDefault; - updateStatus(DllExports::GdipGetCompositingQuality( - nativeGraphics, &result)); - return result; - } - REAL GetDpiX() const - { - REAL result = 0.0f; - updateStatus(DllExports::GdipGetDpiX(nativeGraphics, &result)); - return result; - } - REAL GetDpiY() const - { - REAL result = 0.0f; - updateStatus(DllExports::GdipGetDpiY(nativeGraphics, &result)); - return result; - } - HDC GetHDC() - { - HDC result = NULL; - updateStatus(DllExports::GdipGetDC(nativeGraphics, &result)); - return result; - } - InterpolationMode GetInterpolationMode() const - { - InterpolationMode result = InterpolationModeDefault; - updateStatus(DllExports::GdipGetInterpolationMode( - nativeGraphics, &result)); - return result; - } - Status GetLastStatus() const - { - Status result = lastStatus; - lastStatus = Ok; - return result; - } - Status GetNearestColor(Color *color) const - { - return updateStatus(DllExports::GdipGetNearestColor( - nativeGraphics, color ? &color->Value : NULL)); - } - REAL GetPageScale() const - { - REAL result = 0.0f; - updateStatus(DllExports::GdipGetPageScale( - nativeGraphics, &result)); - return result; - } - Unit GetPageUnit() const - { - Unit result = UnitWorld; - updateStatus(DllExports::GdipGetPageUnit( - nativeGraphics, &result)); - return result; - } - PixelOffsetMode GetPixelOffsetMode() const - { - PixelOffsetMode result = PixelOffsetModeDefault; - updateStatus(DllExports::GdipGetPixelOffsetMode( - nativeGraphics, &result)); - return result; - } - Status GetRenderingOrigin(INT *x, INT *y) const - { - return updateStatus(DllExports::GdipGetRenderingOrigin( - nativeGraphics, x, y)); - } - SmoothingMode GetSmoothingMode() const - { - SmoothingMode result = SmoothingModeDefault; - updateStatus(DllExports::GdipGetSmoothingMode( - nativeGraphics, &result)); - return result; - } - UINT GetTextContrast() const - { - UINT result = 0; - updateStatus(DllExports::GdipGetTextContrast( - nativeGraphics, &result)); - return result; - } - TextRenderingHint GetTextRenderingHint() const - { - TextRenderingHint result = TextRenderingHintSystemDefault; - updateStatus(DllExports::GdipGetTextRenderingHint( - nativeGraphics, &result)); - return result; - } - Status GetTransform(Matrix *matrix) const - { - return updateStatus(DllExports::GdipGetWorldTransform( - nativeGraphics, - matrix ? matrix->nativeMatrix : NULL)); - } - Status GetVisibleClipBounds(RectF *rect) const - { - return updateStatus(DllExports::GdipGetVisibleClipBounds( - nativeGraphics, rect)); - } - Status GetVisibleClipBounds(Rect *rect) const - { - return updateStatus(DllExports::GdipGetVisibleClipBoundsI( - nativeGraphics, rect)); - } - Status IntersectClip(const RectF& rect) - { - return updateStatus(DllExports::GdipSetClipRect( - nativeGraphics, - rect.X, rect.Y, rect.Width, rect.Height, - CombineModeIntersect)); - } - Status IntersectClip(const Rect& rect) - { - return updateStatus(DllExports::GdipSetClipRectI( - nativeGraphics, - rect.X, rect.Y, rect.Width, rect.Height, - CombineModeIntersect)); - } - Status IntersectClip(const Region *region) - { - return updateStatus(DllExports::GdipSetClipRegion( - nativeGraphics, - region ? region->nativeRegion : NULL, - CombineModeIntersect)); - } - BOOL IsClipEmpty() const - { - BOOL result = FALSE; - updateStatus(DllExports::GdipIsClipEmpty( - nativeGraphics, &result)); - return result; - } - BOOL IsVisible(REAL x, REAL y) const - { - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisiblePoint( - nativeGraphics, x, y, &result)); - return result; - } - BOOL IsVisible(INT x, INT y) const - { - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisiblePointI( - nativeGraphics, x, y, &result)); - return result; - } - BOOL IsVisible(const PointF& point) const - { - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisiblePoint( - nativeGraphics, point.X, point.Y, &result)); - return result; - } - BOOL IsVisible(const Point& point) const - { - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisiblePointI( - nativeGraphics, point.X, point.Y, &result)); - return result; - } - BOOL IsVisible(REAL x, REAL y, REAL width, REAL height) const - { - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisibleRect( - nativeGraphics, x, y, width, height, &result)); - return result; - } - BOOL IsVisible(INT x, INT y, INT width, INT height) const - { - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisibleRectI( - nativeGraphics, x, y, width, height, &result)); - return result; - } - BOOL IsVisible(const RectF& rect) const - { - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisibleRect( - nativeGraphics, rect.X, rect.Y, - rect.Width, rect.Height, &result)); - return result; - } - BOOL IsVisible(const Rect& rect) const - { - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisibleRectI( - nativeGraphics, rect.X, rect.Y, - rect.Width, rect.Height, &result)); - return result; - } - BOOL IsVisibleClipEmpty() const - { - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisibleClipEmpty( - nativeGraphics, &result)); - return result; - } - Status MeasureCharacterRanges(const WCHAR *string, INT length, - const Font *font, const RectF& layoutRect, - const StringFormat *stringFormat, - INT regionCount, Region *regions) const - { - if (regionCount <= 0 || !regions) - return lastStatus = InvalidParameter; - - GpRegion **nativeRegionArray = (GpRegion**) - DllExports::GdipAlloc(regionCount * sizeof(GpRegion*)); - if (!nativeRegionArray) - return lastStatus = OutOfMemory; - for (int i = 0; i < regionCount; ++i) { - nativeRegionArray[i] = regions[i].nativeRegion; - } - Status status = updateStatus(DllExports::GdipMeasureCharacterRanges( - nativeGraphics, string, length, - font ? font->nativeFont : NULL, - layoutRect, - stringFormat ? stringFormat->nativeStringFormat : NULL, - regionCount, nativeRegionArray)); - DllExports::GdipFree(nativeRegionArray); - return status; - } - Status MeasureDriverString(const UINT16 *text, INT length, - const Font *font, const PointF *positions, INT flags, - const Matrix *matrix, RectF *boundingBox) const - { - return updateStatus(DllExports::GdipMeasureDriverString( - nativeGraphics, text, length, - font ? font->nativeFont : NULL, - positions, flags, - matrix ? matrix->nativeMatrix : NULL, - boundingBox)); - } - Status MeasureString(const WCHAR *string, INT length, - const Font *font, const RectF& layoutRect, - RectF *boundingBox) const - { - return updateStatus(DllExports::GdipMeasureString( - nativeGraphics, string, length, - font ? font->nativeFont : NULL, - &layoutRect, NULL, boundingBox, NULL, NULL)); - } - Status MeasureString(const WCHAR *string, INT length, - const Font *font, const RectF& layoutRect, - const StringFormat *stringFormat, RectF *boundingBox, - INT *codepointsFitted = NULL, - INT *linesFitted = NULL) const - { - return updateStatus(DllExports::GdipMeasureString( - nativeGraphics, string, length, - font ? font->nativeFont : NULL, - &layoutRect, - stringFormat ? stringFormat->nativeStringFormat : NULL, - boundingBox, codepointsFitted, linesFitted)); - } - Status MeasureString(const WCHAR *string, INT length, - const Font *font, const SizeF& layoutRectSize, - const StringFormat *stringFormat, SizeF *size, - INT *codepointsFitted = NULL, - INT *linesFitted = NULL) const - { - if (!size) return lastStatus = InvalidParameter; - RectF layoutRect(PointF(0.0f, 0.0f), layoutRectSize); - RectF boundingBox; - Status status = updateStatus(DllExports::GdipMeasureString( - nativeGraphics, string, length, - font ? font->nativeFont : NULL, - &layoutRect, - stringFormat ? stringFormat->nativeStringFormat : NULL, - &boundingBox, codepointsFitted, linesFitted)); - boundingBox.GetSize(size); - return status; - } - Status MeasureString(const WCHAR *string, INT length, - const Font *font, const PointF& origin, - RectF *boundingBox) const - { - RectF layoutRect(origin, SizeF(0.0f, 0.0f)); - return updateStatus(DllExports::GdipMeasureString( - nativeGraphics, string, length, - font ? font->nativeFont : NULL, - &layoutRect, NULL, boundingBox, NULL, NULL)); - } - Status MeasureString(const WCHAR *string, INT length, - const Font *font, const PointF& origin, - const StringFormat *stringFormat, - RectF *boundingBox) const - { - RectF layoutRect(origin, SizeF(0.0f, 0.0f)); - return updateStatus(DllExports::GdipMeasureString( - nativeGraphics, string, length, - font ? font->nativeFont : NULL, - &layoutRect, - stringFormat ? stringFormat->nativeStringFormat : NULL, - boundingBox, NULL, NULL)); - } - Status MultiplyTransform(const Matrix *matrix, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipMultiplyWorldTransform( - nativeGraphics, - matrix ? matrix->nativeMatrix : NULL, order)); - } - VOID ReleaseHDC(HDC hdc) - { - updateStatus(DllExports::GdipReleaseDC(nativeGraphics, hdc)); - } - Status ResetClip() - { - return updateStatus(DllExports::GdipResetClip(nativeGraphics)); - } - Status ResetTransform() - { - return updateStatus(DllExports::GdipResetWorldTransform( - nativeGraphics)); - } - Status Restore(GraphicsState state) - { - return updateStatus(DllExports::GdipRestoreGraphics( - nativeGraphics, state)); - } - Status RotateTransform(REAL angle, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipRotateWorldTransform( - nativeGraphics, angle, order)); - } - GraphicsState Save() const - { - GraphicsState result = 0; - updateStatus(DllExports::GdipSaveGraphics( - nativeGraphics, &result)); - return result; - } - Status ScaleTransform(REAL sx, REAL sy, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipScaleWorldTransform( - nativeGraphics, sx, sy, order)); - } - VOID SetAbort() - { - updateStatus(NotImplemented); - } - Status SetClip(const Graphics *g, - CombineMode combineMode = CombineModeReplace) - { - return updateStatus(DllExports::GdipSetClipGraphics( - nativeGraphics, g ? g->nativeGraphics : NULL, - combineMode)); - } - Status SetClip(const RectF& rect, - CombineMode combineMode = CombineModeReplace) - { - return updateStatus(DllExports::GdipSetClipRect( - nativeGraphics, - rect.X, rect.Y, rect.Width, rect.Height, - combineMode)); - } - Status SetClip(const Rect& rect, - CombineMode combineMode = CombineModeReplace) - { - return updateStatus(DllExports::GdipSetClipRectI( - nativeGraphics, - rect.X, rect.Y, rect.Width, rect.Height, - combineMode)); - } - Status SetClip(const GraphicsPath *path, - CombineMode combineMode = CombineModeReplace) - { - return updateStatus(DllExports::GdipSetClipPath( - nativeGraphics, - path ? path->nativePath : NULL, - combineMode)); - } - Status SetClip(const Region *region, - CombineMode combineMode = CombineModeReplace) - { - return updateStatus(DllExports::GdipSetClipRegion( - nativeGraphics, - region ? region->nativeRegion : NULL, - combineMode)); - } - Status SetClip(HRGN hRgn, CombineMode combineMode = CombineModeReplace) - { - return updateStatus(DllExports::GdipSetClipHrgn( - nativeGraphics, hRgn, combineMode)); - } - Status SetCompositingMode(CompositingMode compositingMode) - { - return updateStatus(DllExports::GdipSetCompositingMode( - nativeGraphics, compositingMode)); - } - Status SetCompositingQuality(CompositingQuality compositingQuality) - { - return updateStatus(DllExports::GdipSetCompositingQuality( - nativeGraphics, compositingQuality)); - } - Status SetInterpolationMode(InterpolationMode interpolationMode) - { - return updateStatus(DllExports::GdipSetInterpolationMode( - nativeGraphics, interpolationMode)); - } - Status SetPageScale(REAL scale) - { - return updateStatus(DllExports::GdipSetPageScale( - nativeGraphics, scale)); - } - Status SetPageUnit(Unit unit) - { - return updateStatus(DllExports::GdipSetPageUnit( - nativeGraphics, unit)); - } - Status SetPixelOffsetMode(PixelOffsetMode pixelOffsetMode) - { - return updateStatus(DllExports::GdipSetPixelOffsetMode( - nativeGraphics, pixelOffsetMode)); - } - Status SetRenderingOrigin(INT x, INT y) - { - return updateStatus(DllExports::GdipSetRenderingOrigin( - nativeGraphics, x, y)); - } - Status SetSmoothingMode(SmoothingMode smoothingMode) - { - return updateStatus(DllExports::GdipSetSmoothingMode( - nativeGraphics, smoothingMode)); - } - Status SetTextContrast(UINT contrast) - { - return updateStatus(DllExports::GdipSetTextContrast( - nativeGraphics, contrast)); - } - Status SetTextRenderingHint(TextRenderingHint textRenderingHint) - { - return updateStatus(DllExports::GdipSetTextRenderingHint( - nativeGraphics, textRenderingHint)); - } - Status SetTransform(const Matrix *matrix) - { - return updateStatus(DllExports::GdipSetWorldTransform( - nativeGraphics, - matrix ? matrix->nativeMatrix : NULL)); - } - Status TransformPoints(CoordinateSpace destSpace, - CoordinateSpace srcSpace, - PointF *pts, INT count) const - { - return updateStatus(DllExports::GdipTransformPoints( - nativeGraphics, destSpace, srcSpace, - pts, count)); - } - Status TransformPoints(CoordinateSpace destSpace, - CoordinateSpace srcSpace, - Point *pts, INT count) const - { - return updateStatus(DllExports::GdipTransformPointsI( - nativeGraphics, destSpace, srcSpace, - pts, count)); - } - Status TranslateClip(REAL dx, REAL dy) - { - return updateStatus(DllExports::GdipTranslateClip( - nativeGraphics, dx, dy)); - } - Status TranslateClip(INT dx, INT dy) - { - return updateStatus(DllExports::GdipTranslateClipI( - nativeGraphics, dx, dy)); - } - Status TranslateTransform(REAL dx, REAL dy, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipTranslateWorldTransform( - nativeGraphics, dx, dy, order)); - } - -private: - Graphics(const Graphics&); - Graphics& operator=(const Graphics&); - - Status updateStatus(Status newStatus) const - { - if (newStatus != Ok) lastStatus = newStatus; - return newStatus; - } - - GpGraphics *nativeGraphics; - mutable Status lastStatus; -}; - -#endif /* __GDIPLUS_GRAPHICS_H */ diff --git a/src/gdiplus4/gdiplusheaders.h b/src/gdiplus4/gdiplusheaders.h deleted file mode 100644 index 78d0d717..00000000 --- a/src/gdiplus4/gdiplusheaders.h +++ /dev/null @@ -1,581 +0,0 @@ -/* - * gdiplusheaders.h - * - * GDI+ Bitmap, CachedBitmap, CustomLineCap, Font, FontCollection, - * FontFamily, Image, InstalledFontCollection, PrivateFontCollection, - * Region class definitions. - * Implementation of these classes is in gdiplusimpl.h. - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_HEADERS_H -#define __GDIPLUS_HEADERS_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#ifndef __cplusplus -#error "A C++ compiler is required to include gdiplusheaders.h." -#endif - -/* - * Note: Virtual inline functions (dtors, Clone()) are implemented here: If - * these were defined outside class scope, the compiler would always generate - * code for them (and the vtable), even if these classes were never used. - */ - -class Bitmap; -class Effect; -class FontCollection; -class FontFamily; -class Graphics; -class GraphicsPath; -class Matrix; -class Pen; - -class Image: public GdiplusBase -{ - friend class Bitmap; - friend class Metafile; - friend class CachedBitmap; - friend class Graphics; - friend class TextureBrush; - -public: - static Image* FromFile(const WCHAR *filename, - BOOL useEmbeddedColorManagement = FALSE); - static Image* FromStream(IStream *stream, - BOOL useEmbeddedColorManagement = FALSE); - - Image(const WCHAR *filename, BOOL useEmbeddedColorManagement = FALSE); - Image(IStream *stream, BOOL useEmbeddedColorManagement = FALSE); - - virtual ~Image() - { - DllExports::GdipDisposeImage(nativeImage); - } - virtual Image* Clone() const - { - GpImage *cloneImage = NULL; - Status status = updateStatus(DllExports::GdipCloneImage( - nativeImage, &cloneImage)); - if (status == Ok) { - Image *result = new Image(cloneImage, lastStatus); - if (!result) { - DllExports::GdipDisposeImage(cloneImage); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } - } - - Status FindFirstItem(ImageItemData *item); - Status FindNextItem(ImageItemData *item); - Status GetAllPropertyItems(UINT totalBufferSize, - UINT numProperties, PropertyItem *allItems); - Status GetBounds(RectF *srcRect, Unit *srcUnit); - Status GetEncoderParameterList(const CLSID *clsidEncoder, - UINT size, EncoderParameters *buffer); - UINT GetEncoderParameterListSize(const CLSID *clsidEncoder); - UINT GetFlags(); - UINT GetFrameCount(const GUID *dimensionID); - UINT GetFrameDimensionsCount(); - Status GetFrameDimensionsList(GUID *dimensionIDs, UINT count); - UINT GetHeight(); - REAL GetHorizontalResolution(); - Status GetItemData(ImageItemData *item); - Status GetPalette(ColorPalette *palette, INT size); - INT GetPaletteSize(); - Status GetPhysicalDimension(SizeF *size); - PixelFormat GetPixelFormat(); - UINT GetPropertyCount(); - Status GetPropertyIdList(UINT numOfProperty, PROPID *list); - Status GetPropertyItem(PROPID propId, UINT propSize, - PropertyItem *buffer); - UINT GetPropertyItemSize(PROPID propId); - Status GetPropertySize(UINT *totalBufferSize, UINT *numProperties); - Status GetRawFormat(GUID *format); - Image* GetThumbnailImage(UINT thumbWidth, UINT thumbHeight, - GetThumbnailImageAbort callback, VOID *callbackData); - ImageType GetType() const; - REAL GetVerticalResolution(); - UINT GetWidth(); - Status RemovePropertyItem(PROPID propId); - Status RotateFlip(RotateFlipType rotateFlipType); - Status Save(IStream *stream, const CLSID *clsidEncoder, - const EncoderParameters *encoderParams); - Status Save(const WCHAR *filename, const CLSID *clsidEncoder, - const EncoderParameters *encoderParams); - Status SaveAdd(const EncoderParameters *encoderParams); - Status SaveAdd(Image *newImage, const EncoderParameters *encoderParams); - Status SelectActiveFrame(const GUID *dimensionID, UINT frameIndex); - Status SetAbort(GdiplusAbort *pIAbort); - Status SetPalette(const ColorPalette *palette); - Status SetPropertyItem(const PropertyItem *item); - - Status GetLastStatus() const - { - Status result = lastStatus; - lastStatus = Ok; - return result; - } - -private: - Image(GpImage *image, Status status): - nativeImage(image), lastStatus(status) {} - Image(const Image&); - Image& operator=(const Image&); - - Status updateStatus(Status newStatus) const - { - if (newStatus != Ok) lastStatus = newStatus; - return newStatus; - } - - GpImage *nativeImage; - mutable Status lastStatus; -}; - -class Bitmap: public Image -{ -public: - static Bitmap* FromBITMAPINFO(const BITMAPINFO *gdiBitmapInfo, - VOID *gdiBitmapData); - static Bitmap* FromDirectDrawSurface7(IDirectDrawSurface7 *surface); - static Bitmap* FromFile(const WCHAR *filename, - BOOL useEmbeddedColorManagement = FALSE); - static Bitmap* FromHBITMAP(HBITMAP hbm, HPALETTE hpal); - static Bitmap* FromHICON(HICON icon); - static Bitmap* FromResource(HINSTANCE hInstance, - const WCHAR *bitmapName); - static Bitmap* FromStream(IStream *stream, - BOOL useEmbeddedColorManagement = FALSE); - static Status ApplyEffect(Bitmap **inputs, INT numInputs, - Effect *effect, RECT *ROI, - RECT *outputRect, Bitmap **output); - static Status InitializePalette(ColorPalette *palette, - PaletteType paletteType, INT optimalColors, - BOOL useTransparentColor, Bitmap *bitmap); - - Bitmap(const BITMAPINFO *gdiBitmapInfo, VOID *gdiBitmapData); - Bitmap(IDirectDrawSurface7 *surface); - Bitmap(const WCHAR *filename, BOOL useEmbeddedColorManagement = FALSE); - Bitmap(HBITMAP hbm, HPALETTE hpal); - Bitmap(HICON hicon); - Bitmap(HINSTANCE hInstance, const WCHAR *bitmapName); - Bitmap(IStream *stream, BOOL useEmbeddedColorManagement = FALSE); - Bitmap(INT width, INT height, Graphics *target); - Bitmap(INT width, INT height, PixelFormat format = PixelFormat32bppARGB); - Bitmap(INT width, INT height, INT stride, PixelFormat format, BYTE *scan0); - - virtual ~Bitmap() - { - } - virtual Bitmap* Clone() const - { - GpImage *cloneImage = NULL; - Status status = updateStatus(DllExports::GdipCloneImage( - nativeImage, &cloneImage)); - if (status == Ok) { - Bitmap *result = new Bitmap(cloneImage, lastStatus); - if (!result) { - DllExports::GdipDisposeImage(cloneImage); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } - } - - Bitmap* Clone(const RectF& rect, PixelFormat format) const; - Bitmap* Clone(const Rect& rect, PixelFormat format) const; - Bitmap* Clone(REAL x, REAL y, REAL width, REAL height, - PixelFormat format) const; - Bitmap* Clone(INT x, INT y, INT width, INT height, - PixelFormat format) const; - - Status ApplyEffect(Effect *effect, RECT *ROI); - Status ConvertFormat(PixelFormat format, DitherType ditherType, - PaletteType paletteType, ColorPalette *palette, - REAL alphaThresholdPercent); - Status GetHBITMAP(const Color& colorBackground, HBITMAP *hbmReturn) const; - Status GetHICON(HICON *icon) const; - Status GetHistogram(HistogramFormat format, UINT numberOfEntries, - UINT *channel0, UINT *channel1, - UINT *channel2, UINT *channel3) const; - Status GetHistogramSize(HistogramFormat format, - UINT *numberOfEntries) const; - Status GetPixel(INT x, INT y, Color *color) const; - Status LockBits(const Rect *rect, UINT flags, PixelFormat format, - BitmapData *lockedBitmapData); - Status SetPixel(INT x, INT y, const Color& color); - Status SetResolution(REAL xdpi, REAL ydpi); - Status UnlockBits(BitmapData *lcokedBitmapData); - -private: - Bitmap(GpImage *image, Status status): Image(image, status) {} - Bitmap(const Bitmap&); - Bitmap& operator=(const Bitmap&); -}; - -class CachedBitmap: public GdiplusBase -{ - friend class Graphics; - -public: - CachedBitmap(Bitmap *bitmap, Graphics *graphics); - ~CachedBitmap(); - - Status GetLastStatus() const - { - return lastStatus; - } - -private: - CachedBitmap(const CachedBitmap&); - CachedBitmap& operator=(const CachedBitmap&); - - GpCachedBitmap *nativeCachedBitmap; - Status lastStatus; -}; - -class CustomLineCap: public GdiplusBase -{ - friend class AdjustableArrowCap; - friend class Pen; - -public: - CustomLineCap(const GraphicsPath *fillPath, - const GraphicsPath *strokePath, - LineCap baseCap = LineCapFlat, - REAL baseInset = 0.0f); - - virtual ~CustomLineCap() - { - DllExports::GdipDeleteCustomLineCap(nativeCustomLineCap); - } - virtual CustomLineCap* Clone() const - { - GpCustomLineCap *cloneCustomLineCap = NULL; - Status status = updateStatus(DllExports::GdipCloneCustomLineCap( - nativeCustomLineCap, &cloneCustomLineCap)); - if (status == Ok) { - CustomLineCap *result = new CustomLineCap( - cloneCustomLineCap, lastStatus); - if (!result) { - DllExports::GdipDeleteCustomLineCap(cloneCustomLineCap); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } - } - - LineCap GetBaseCap() const; - REAL GetBaseInset() const; - Status GetStrokeCaps(LineCap *startCap, LineCap *endCap) const; - LineJoin GetStrokeJoin() const; - REAL GetWidthScale() const; - Status SetBaseCap(LineCap baseCap); - Status SetBaseInset(REAL inset); - Status SetStrokeCap(LineCap strokeCap); - Status SetStrokeCaps(LineCap startCap, LineCap endCap); - Status SetStrokeJoin(LineJoin lineJoin); - Status SetWidthScale(REAL widthScale); - - Status GetLastStatus() const - { - Status result = lastStatus; - lastStatus = Ok; - return result; - } - -private: - CustomLineCap(GpCustomLineCap *customLineCap, Status status): - nativeCustomLineCap(customLineCap), lastStatus(status) {} - CustomLineCap(const CustomLineCap&); - CustomLineCap& operator=(const CustomLineCap&); - - Status updateStatus(Status newStatus) const - { - if (newStatus != Ok) lastStatus = newStatus; - return newStatus; - } - - GpCustomLineCap *nativeCustomLineCap; - mutable Status lastStatus; -}; - -class Font: public GdiplusBase -{ - friend class Graphics; - -public: - Font(const FontFamily *family, REAL emSize, - INT style = FontStyleRegular, - Unit unit = UnitPoint); - Font(HDC hdc, HFONT hfont); - Font(HDC hdc, const LOGFONTA *logfont); - Font(HDC hdc, const LOGFONTW *logfont); - Font(HDC hdc); - Font(const WCHAR *familyName, REAL emSize, - INT style = FontStyleRegular, - Unit unit = UnitPoint, - const FontCollection *fontCollection = NULL); - ~Font(); - Font* Clone() const; - - Status GetFamily(FontFamily *family) const; - REAL GetHeight(const Graphics *graphics) const; - REAL GetHeight(REAL dpi) const; - Status GetLogFontA(const Graphics *graphics, LOGFONTA *logfontA) const; - Status GetLogFontW(const Graphics *graphics, LOGFONTW *logfontW) const; - REAL GetSize() const; - INT GetStyle() const; - Unit GetUnit() const; - - Status GetLastStatus() const - { - return lastStatus; - } - BOOL IsAvailable() const - { - return nativeFont != NULL; - } - -private: - Font(GpFont *font, Status status): - nativeFont(font), lastStatus(status) {} - Font(const Font&); - Font& operator=(const Font&); - - Status updateStatus(Status newStatus) const - { - if (newStatus != Ok) lastStatus = newStatus; - return newStatus; - } - - GpFont *nativeFont; - mutable Status lastStatus; -}; - -class FontCollection: public GdiplusBase -{ - friend class InstalledFontCollection; - friend class PrivateFontCollection; - friend class Font; - friend class FontFamily; - -public: - FontCollection(); - virtual ~FontCollection() {} - - Status GetFamilies(INT numSought, FontFamily *families, - INT *numFound) const; - INT GetFamilyCount() const; - - Status GetLastStatus() const - { - return lastStatus; - } - -private: - FontCollection(const FontCollection&); - FontCollection& operator=(const FontCollection&); - - Status updateStatus(Status newStatus) const - { - return lastStatus = newStatus; - } - - GpFontCollection *nativeFontCollection; - mutable Status lastStatus; -}; - -class FontFamily: public GdiplusBase -{ - friend class Font; - friend class FontCollection; - friend class GraphicsPath; - -public: - static const FontFamily* GenericMonospace(); - static const FontFamily* GenericSansSerif(); - static const FontFamily* GenericSerif(); - - FontFamily(); - FontFamily(const WCHAR *name, - const FontCollection *fontCollection = NULL); - ~FontFamily(); - FontFamily* Clone() const; - - UINT16 GetCellAscent(INT style) const; - UINT16 GetCellDescent(INT style) const; - UINT16 GetEmHeight(INT style) const; - Status GetFamilyName(WCHAR name[LF_FACESIZE], - LANGID language = LANG_NEUTRAL) const; - UINT16 GetLineSpacing(INT style) const; - BOOL IsStyleAvailable(INT style) const; - - Status GetLastStatus() const - { - Status result = lastStatus; - lastStatus = Ok; - return result; - } - BOOL IsAvailable() const - { - return nativeFontFamily != NULL; - } - -private: - FontFamily(GpFontFamily *fontFamily, Status status): - nativeFontFamily(fontFamily), lastStatus(status) {} - FontFamily(const FontFamily&); - FontFamily& operator=(const FontFamily&); - - Status updateStatus(Status newStatus) const - { - if (newStatus != Ok) lastStatus = newStatus; - return newStatus; - } - - GpFontFamily *nativeFontFamily; - mutable Status lastStatus; -}; - -class InstalledFontCollection: public FontCollection -{ -public: - InstalledFontCollection(); - virtual ~InstalledFontCollection() {} -}; - -class PrivateFontCollection: public FontCollection -{ -public: - PrivateFontCollection(); - - virtual ~PrivateFontCollection() - { - DllExports::GdipDeletePrivateFontCollection(&nativeFontCollection); - } - - Status AddFontFile(const WCHAR *filename); - Status AddMemoryFont(const VOID *memory, INT length); -}; - -class Region: public GdiplusBase -{ - friend class Graphics; - -public: - static Region* FromHRGN(HRGN hrgn); - - Region(); - Region(const RectF& rect); - Region(const Rect& rect); - Region(const GraphicsPath *path); - Region(const BYTE *regionData, INT size); - Region(HRGN hrgn); - ~Region(); - Region* Clone() const; - - Status Complement(const RectF& rect); - Status Complement(const Rect& rect); - Status Complement(const Region *region); - Status Complement(const GraphicsPath *path); - BOOL Equals(const Region *region, const Graphics *graphics) const; - Status Exclude(const RectF& rect); - Status Exclude(const Rect& rect); - Status Exclude(const Region *region); - Status Exclude(const GraphicsPath *path); - Status GetBounds(RectF *rect, const Graphics *graphics) const; - Status GetBounds(Rect *rect, const Graphics *graphics) const; - Status GetData(BYTE *buffer, UINT bufferSize, UINT *sizeFilled) const; - UINT GetDataSize() const; - HRGN GetHRGN(const Graphics *graphics) const; - Status GetRegionScans(const Matrix *matrix, - RectF *rects, INT *count) const; - Status GetRegionScans(const Matrix *matrix, - Rect *rects, INT *count) const; - UINT GetRegionScansCount(const Matrix *matrix) const; - Status Intersect(const RectF& rect); - Status Intersect(const Rect& rect); - Status Intersect(const Region *region); - Status Intersect(const GraphicsPath *path); - BOOL IsEmpty(const Graphics *graphics) const; - BOOL IsInfinite(const Graphics *graphics) const; - BOOL IsVisible(REAL x, REAL y, - const Graphics *graphics = NULL) const; - BOOL IsVisible(INT x, INT y, - const Graphics *graphics = NULL) const; - BOOL IsVisible(const PointF& point, - const Graphics *graphics = NULL) const; - BOOL IsVisible(const Point& point, - const Graphics *graphics = NULL) const; - BOOL IsVisible(REAL x, REAL y, REAL width, REAL height, - const Graphics *graphics = NULL) const; - BOOL IsVisible(INT x, INT y, INT width, INT height, - const Graphics *graphics = NULL) const; - BOOL IsVisible(const RectF& rect, - const Graphics *graphics = NULL) const; - BOOL IsVisible(const Rect& rect, - const Graphics *graphics = NULL) const; - Status MakeEmpty(); - Status MakeInfinite(); - Status Transform(const Matrix *matrix); - Status Translate(REAL dx, REAL dy); - Status Translate(INT dx, INT dy); - Status Union(const RectF& rect); - Status Union(const Rect& rect); - Status Union(const Region *region); - Status Union(const GraphicsPath *path); - Status Xor(const RectF& rect); - Status Xor(const Rect& rect); - Status Xor(const Region *region); - Status Xor(const GraphicsPath *path); - - Status GetLastStatus() const - { - Status result = lastStatus; - lastStatus = Ok; - return result; - } - -private: - Region(GpRegion *region, Status status): - nativeRegion(region), lastStatus(status) {} - Region(const Region&); - Region& operator=(const Region&); - - Status updateStatus(Status newStatus) const - { - if (newStatus != Ok) lastStatus = newStatus; - return newStatus; - } - - GpRegion *nativeRegion; - mutable Status lastStatus; -}; - -#endif /* __GDIPLUS_HEADERS_H */ diff --git a/src/gdiplus4/gdiplusimageattributes.h b/src/gdiplus4/gdiplusimageattributes.h deleted file mode 100644 index 695b898e..00000000 --- a/src/gdiplus4/gdiplusimageattributes.h +++ /dev/null @@ -1,236 +0,0 @@ -/* - * gdiplusimageattributes.h - * - * GDI+ ImageAttributes class - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_IMAGEATTRIBUTES_H -#define __GDIPLUS_IMAGEATTRIBUTES_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#ifndef __cplusplus -#error "A C++ compiler is required to include gdiplusimageattributes.h." -#endif - -class ImageAttributes: public GdiplusBase -{ - friend class Graphics; - friend class TextureBrush; - -public: - ImageAttributes(): nativeImageAttributes(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipCreateImageAttributes( - &nativeImageAttributes); - } - ~ImageAttributes() - { - DllExports::GdipDisposeImageAttributes(nativeImageAttributes); - } - ImageAttributes* Clone() const - { - GpImageAttributes *cloneImageAttributes = NULL; - Status status = updateStatus(DllExports::GdipCloneImageAttributes( - nativeImageAttributes, &cloneImageAttributes)); - if (status == Ok) { - ImageAttributes *result = new ImageAttributes( - cloneImageAttributes, lastStatus); - if (!result) { - DllExports::GdipDisposeImageAttributes(cloneImageAttributes); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } - } - - Status ClearBrushRemapTable() - { - return updateStatus(DllExports::GdipSetImageAttributesRemapTable( - nativeImageAttributes, ColorAdjustTypeBrush, - FALSE, 0, NULL)); - } - Status ClearColorKey(ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesColorKeys( - nativeImageAttributes, type, FALSE, 0, 0)); - } - Status ClearColorMatrices(ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesColorMatrix( - nativeImageAttributes, type, FALSE, - NULL, NULL, ColorMatrixFlagsDefault)); - } - Status ClearColorMatrix(ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesColorMatrix( - nativeImageAttributes, type, FALSE, - NULL, NULL, ColorMatrixFlagsDefault)); - } - Status ClearGamma(ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesGamma( - nativeImageAttributes, type, FALSE, 1.0f)); - } - Status ClearNoOp(ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesNoOp( - nativeImageAttributes, type, FALSE)); - } - Status ClearOutputChannel(ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesOutputChannel( - nativeImageAttributes, type, FALSE, - ColorChannelFlagsC)); - } - Status ClearOutputChannelColorProfile( - ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesOutputChannelColorProfile( - nativeImageAttributes, type, FALSE, NULL)); - } - Status ClearRemapTable(ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesRemapTable( - nativeImageAttributes, type, FALSE, 0, NULL)); - } - Status ClearThreshold(ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesThreshold( - nativeImageAttributes, type, FALSE, 0.0)); - } - Status GetAdjustedPalette(ColorPalette *colorPalette, - ColorAdjustType type) const - { - return updateStatus(DllExports::GdipGetImageAttributesAdjustedPalette( - nativeImageAttributes, colorPalette, type)); - } - Status GetLastStatus() const - { - Status result = lastStatus; - lastStatus = Ok; - return result; - } - Status Reset(ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipResetImageAttributes( - nativeImageAttributes, type)); - } - Status SetBrushRemapTable(UINT mapSize, ColorMap *map) - { - return updateStatus(DllExports::GdipSetImageAttributesRemapTable( - nativeImageAttributes, ColorAdjustTypeBrush, - TRUE, mapSize, map)); - } - Status SetColorKey(const Color& colorLow, const Color& colorHigh, - ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesColorKeys( - nativeImageAttributes, type, TRUE, - colorLow.GetValue(), colorHigh.GetValue())); - } - Status SetColorMatrices(const ColorMatrix *colorMatrix, - const ColorMatrix *grayMatrix, - ColorMatrixFlags mode = ColorMatrixFlagsDefault, - ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesColorMatrix( - nativeImageAttributes, type, TRUE, - colorMatrix, grayMatrix, mode)); - } - Status SetColorMatrix(const ColorMatrix *colorMatrix, - ColorMatrixFlags mode = ColorMatrixFlagsDefault, - ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesColorMatrix( - nativeImageAttributes, type, TRUE, - colorMatrix, NULL, mode)); - } - Status SetGamma(REAL gamma, - ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesGamma( - nativeImageAttributes, type, TRUE, gamma)); - } - Status SetNoOp(ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesNoOp( - nativeImageAttributes, type, TRUE)); - } - Status SetOutputChannel(ColorChannelFlags channelFlags, - ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesOutputChannel( - nativeImageAttributes, type, TRUE, - channelFlags)); - } - Status SetOutputChannelColorProfile(const WCHAR *colorProfileFilename, - ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesOutputChannelColorProfile( - nativeImageAttributes, type, TRUE, - colorProfileFilename)); - } - Status SetRemapTable(UINT mapSize, const ColorMap *map, - ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesRemapTable( - nativeImageAttributes, type, TRUE, - mapSize, map)); - } - Status SetThreshold(REAL threshold, - ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesThreshold( - nativeImageAttributes, type, TRUE, threshold)); - } - Status SetToIdentity(ColorAdjustType type = ColorAdjustTypeDefault) - { - return updateStatus(DllExports::GdipSetImageAttributesToIdentity( - nativeImageAttributes, type)); - } - Status SetWrapMode(WrapMode wrap, const Color& color = Color(), - BOOL clamp = FALSE) - { - return updateStatus(DllExports::GdipSetImageAttributesWrapMode( - nativeImageAttributes, wrap, - color.GetValue(), clamp)); - } - -private: - ImageAttributes(GpImageAttributes *imageAttributes, Status status): - nativeImageAttributes(imageAttributes), lastStatus(status) {} - ImageAttributes(const ImageAttributes&); - ImageAttributes& operator=(const ImageAttributes&); - - Status updateStatus(Status newStatus) const - { - if (newStatus != Ok) lastStatus = newStatus; - return newStatus; - } - - GpImageAttributes *nativeImageAttributes; - mutable Status lastStatus; -}; - - -#endif /* __GDIPLUS_IMAGEATTRIBUTES_H */ diff --git a/src/gdiplus4/gdiplusimagecodec.h b/src/gdiplus4/gdiplusimagecodec.h deleted file mode 100644 index e897f1ee..00000000 --- a/src/gdiplus4/gdiplusimagecodec.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * gdiplusimagecodec.h - * - * GDI+ image decoders and encoders - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_IMAGECODEC_H -#define __GDIPLUS_IMAGECODEC_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -static __inline__ GpStatus GetImageDecoders(UINT numDecoders, UINT size, - ImageCodecInfo *decoders) -{ - #ifdef __cplusplus - return DllExports::GdipGetImageDecoders(numDecoders, size, decoders); - #else - return GdipGetImageDecoders(numDecoders, size, decoders); - #endif -} - -static __inline__ GpStatus GetImageDecodersSize(UINT *numDecoders, UINT *size) -{ - #ifdef __cplusplus - return DllExports::GdipGetImageDecodersSize(numDecoders, size); - #else - return GdipGetImageDecodersSize(numDecoders, size); - #endif -} - -static __inline__ GpStatus GetImageEncoders(UINT numEncoders, UINT size, - ImageCodecInfo *encoders) -{ - #ifdef __cplusplus - return DllExports::GdipGetImageEncoders(numEncoders, size, encoders); - #else - return GdipGetImageEncoders(numEncoders, size, encoders); - #endif -} - -static __inline__ GpStatus GetImageEncodersSize(UINT *numEncoders, UINT *size) -{ - #ifdef __cplusplus - return DllExports::GdipGetImageEncodersSize(numEncoders, size); - #else - return GdipGetImageEncodersSize(numEncoders, size); - #endif -} - -#endif /* __GDIPLUS_IMAGECODEC_H */ diff --git a/src/gdiplus4/gdiplusimaging.h b/src/gdiplus4/gdiplusimaging.h deleted file mode 100644 index c452d77e..00000000 --- a/src/gdiplus4/gdiplusimaging.h +++ /dev/null @@ -1,411 +0,0 @@ -/* - * gdiplusimaging.h - * - * GDI+ Imaging and image metadata - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_IMAGING_H -#define __GDIPLUS_IMAGING_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -typedef enum ImageCodecFlags { - ImageCodecFlagsEncoder = 0x00000001, - ImageCodecFlagsDecoder = 0x00000002, - ImageCodecFlagsSupportBitmap = 0x00000004, - ImageCodecFlagsSupportVector = 0x00000008, - ImageCodecFlagsSeekableEncode = 0x00000010, - ImageCodecFlagsBlockingDecode = 0x00000020, - ImageCodecFlagsBuiltin = 0x00010000, - ImageCodecFlagsSystem = 0x00020000, - ImageCodecFlagsUser = 0x00040000 -} ImageCodecFlags; - -typedef enum ImageFlags { - ImageFlagsNone = 0, - ImageFlagsScalable = 0x00000001, - ImageFlagsHasAlpha = 0x00000002, - ImageFlagsHasTranslucent = 0x00000004, - ImageFlagsPartiallyScalable = 0x00000008, - ImageFlagsColorSpaceRGB = 0x00000010, - ImageFlagsColorSpaceCMYK = 0x00000020, - ImageFlagsColorSpaceGRAY = 0x00000040, - ImageFlagsColorSpaceYCBCR = 0x00000080, - ImageFlagsColorSpaceYCCK = 0x00000100, - ImageFlagsHasRealDPI = 0x00001000, - ImageFlagsHasRealPixelSize = 0x00002000, - ImageFlagsReadOnly = 0x00010000, - ImageFlagsCaching = 0x00020000 -} ImageFlags; - -typedef enum ImageLockMode { - ImageLockModeRead = 1, - ImageLockModeWrite = 2, - ImageLockModeUserInputBuf = 4 -} ImageLockMode; - -typedef enum ItemDataPosition { - ItemDataPositionAfterHeader = 0, - ItemDataPositionAfterPalette = 1, - ItemDataPositionAfterBits = 2 -} ItemDataPosition; - -typedef enum RotateFlipType { - RotateNoneFlipNone = 0, - Rotate90FlipNone = 1, - Rotate180FlipNone = 2, - Rotate270FlipNone = 3, - RotateNoneFlipX = 4, - Rotate90FlipX = 5, - Rotate180FlipX = 6, - Rotate270FlipX = 7, - Rotate180FlipXY = 0, - Rotate270FlipXY = 1, - RotateNoneFlipXY = 2, - Rotate90FlipXY = 3, - Rotate180FlipY = 4, - Rotate270FlipY = 5, - RotateNoneFlipY = 6, - Rotate90FlipY = 7 -} RotateFlipType; - -typedef struct BitmapData { - UINT Width; - UINT Height; - INT Stride; - INT PixelFormat; /* MSDN: "PixelFormat PixelFormat;" */ - VOID *Scan0; - UINT_PTR Reserved; -} BitmapData; - -typedef struct EncoderParameter { - GUID Guid; - ULONG NumberOfValues; - ULONG Type; - VOID *Value; -} EncoderParameter; - -typedef struct EncoderParameters { - UINT Count; - EncoderParameter Parameter[1]; -} EncoderParameters; - -typedef struct ImageCodecInfo { - CLSID Clsid; - GUID FormatID; - WCHAR *CodecName; - WCHAR *DllName; - WCHAR *FormatDescription; - WCHAR *FilenameExtension; - WCHAR *MimeType; - DWORD Flags; - DWORD Version; - DWORD SigCount; - DWORD SigSize; - BYTE *SigPattern; - BYTE *SigMask; -} ImageCodecInfo; - -/* FIXME: The order of fields is probably wrong. Please don't use this - * structure until this problem is resolved! Can't test because - * ImageItemData is not supported by the redistributable GDI+ 1.0 DLL. */ -typedef struct ImageItemData { - UINT Size; - UINT Position; - VOID *Desc; - UINT DescSize; - UINT *Data; - UINT DataSize; - UINT Cookie; -} ImageItemData; - -typedef struct PropertyItem { - PROPID id; - ULONG length; - WORD type; - VOID *value; -} PropertyItem; - -#define PropertyTagGpsVer ((PROPID) 0x0000) -#define PropertyTagGpsLatitudeRef ((PROPID) 0x0001) -#define PropertyTagGpsLatitude ((PROPID) 0x0002) -#define PropertyTagGpsLongitudeRef ((PROPID) 0x0003) -#define PropertyTagGpsLongitude ((PROPID) 0x0004) -#define PropertyTagGpsAltitudeRef ((PROPID) 0x0005) -#define PropertyTagGpsAltitude ((PROPID) 0x0006) -#define PropertyTagGpsGpsTime ((PROPID) 0x0007) -#define PropertyTagGpsGpsSatellites ((PROPID) 0x0008) -#define PropertyTagGpsGpsStatus ((PROPID) 0x0009) -#define PropertyTagGpsGpsMeasureMode ((PROPID) 0x000A) -#define PropertyTagGpsGpsDop ((PROPID) 0x000B) -#define PropertyTagGpsSpeedRef ((PROPID) 0x000C) -#define PropertyTagGpsSpeed ((PROPID) 0x000D) -#define PropertyTagGpsTrackRef ((PROPID) 0x000E) -#define PropertyTagGpsTrack ((PROPID) 0x000F) -#define PropertyTagGpsImgDirRef ((PROPID) 0x0010) -#define PropertyTagGpsImgDir ((PROPID) 0x0011) -#define PropertyTagGpsMapDatum ((PROPID) 0x0012) -#define PropertyTagGpsDestLatRef ((PROPID) 0x0013) -#define PropertyTagGpsDestLat ((PROPID) 0x0014) -#define PropertyTagGpsDestLongRef ((PROPID) 0x0015) -#define PropertyTagGpsDestLong ((PROPID) 0x0016) -#define PropertyTagGpsDestBearRef ((PROPID) 0x0017) -#define PropertyTagGpsDestBear ((PROPID) 0x0018) -#define PropertyTagGpsDestDistRef ((PROPID) 0x0019) -#define PropertyTagGpsDestDist ((PROPID) 0x001A) -#define PropertyTagNewSubfileType ((PROPID) 0x00FE) -#define PropertyTagSubfileType ((PROPID) 0x00FF) -#define PropertyTagImageWidth ((PROPID) 0x0100) -#define PropertyTagImageHeight ((PROPID) 0x0101) -#define PropertyTagBitsPerSample ((PROPID) 0x0102) -#define PropertyTagCompression ((PROPID) 0x0103) -#define PropertyTagPhotometricInterp ((PROPID) 0x0106) -#define PropertyTagThreshHolding ((PROPID) 0x0107) -#define PropertyTagCellWidth ((PROPID) 0x0108) -#define PropertyTagCellHeight ((PROPID) 0x0109) -#define PropertyTagFillOrder ((PROPID) 0x010A) -#define PropertyTagDocumentName ((PROPID) 0x010D) -#define PropertyTagImageDescription ((PROPID) 0x010E) -#define PropertyTagEquipMake ((PROPID) 0x010F) -#define PropertyTagEquipModel ((PROPID) 0x0110) -#define PropertyTagStripOffsets ((PROPID) 0x0111) -#define PropertyTagOrientation ((PROPID) 0x0112) -#define PropertyTagSamplesPerPixel ((PROPID) 0x0115) -#define PropertyTagRowsPerStrip ((PROPID) 0x0116) -#define PropertyTagStripBytesCount ((PROPID) 0x0117) -#define PropertyTagMinSampleValue ((PROPID) 0x0118) -#define PropertyTagMaxSampleValue ((PROPID) 0x0119) -#define PropertyTagXResolution ((PROPID) 0x011A) -#define PropertyTagYResolution ((PROPID) 0x011B) -#define PropertyTagPlanarConfig ((PROPID) 0x011C) -#define PropertyTagPageName ((PROPID) 0x011D) -#define PropertyTagXPosition ((PROPID) 0x011E) -#define PropertyTagYPosition ((PROPID) 0x011F) -#define PropertyTagFreeOffset ((PROPID) 0x0120) -#define PropertyTagFreeByteCounts ((PROPID) 0x0121) -#define PropertyTagGrayResponseUnit ((PROPID) 0x0122) -#define PropertyTagGrayResponseCurve ((PROPID) 0x0123) -#define PropertyTagT4Option ((PROPID) 0x0124) -#define PropertyTagT6Option ((PROPID) 0x0125) -#define PropertyTagResolutionUnit ((PROPID) 0x0128) -#define PropertyTagPageNumber ((PROPID) 0x0129) -#define PropertyTagTransferFunction ((PROPID) 0x012D) -#define PropertyTagSoftwareUsed ((PROPID) 0x0131) -#define PropertyTagDateTime ((PROPID) 0x0132) -#define PropertyTagArtist ((PROPID) 0x013B) -#define PropertyTagHostComputer ((PROPID) 0x013C) -#define PropertyTagPredictor ((PROPID) 0x013D) -#define PropertyTagWhitePoint ((PROPID) 0x013E) -#define PropertyTagPrimaryChromaticities ((PROPID) 0x013F) -#define PropertyTagColorMap ((PROPID) 0x0140) -#define PropertyTagHalftoneHints ((PROPID) 0x0141) -#define PropertyTagTileWidth ((PROPID) 0x0142) -#define PropertyTagTileLength ((PROPID) 0x0143) -#define PropertyTagTileOffset ((PROPID) 0x0144) -#define PropertyTagTileByteCounts ((PROPID) 0x0145) -#define PropertyTagInkSet ((PROPID) 0x014C) -#define PropertyTagInkNames ((PROPID) 0x014D) -#define PropertyTagNumberOfInks ((PROPID) 0x014E) -#define PropertyTagDotRange ((PROPID) 0x0150) -#define PropertyTagTargetPrinter ((PROPID) 0x0151) -#define PropertyTagExtraSamples ((PROPID) 0x0152) -#define PropertyTagSampleFormat ((PROPID) 0x0153) -#define PropertyTagSMinSampleValue ((PROPID) 0x0154) -#define PropertyTagSMaxSampleValue ((PROPID) 0x0155) -#define PropertyTagTransferRange ((PROPID) 0x0156) -#define PropertyTagJPEGProc ((PROPID) 0x0200) -#define PropertyTagJPEGInterFormat ((PROPID) 0x0201) -#define PropertyTagJPEGInterLength ((PROPID) 0x0202) -#define PropertyTagJPEGRestartInterval ((PROPID) 0x0203) -#define PropertyTagJPEGLosslessPredictors ((PROPID) 0x0205) -#define PropertyTagJPEGPointTransforms ((PROPID) 0x0206) -#define PropertyTagJPEGQTables ((PROPID) 0x0207) -#define PropertyTagJPEGDCTables ((PROPID) 0x0208) -#define PropertyTagJPEGACTables ((PROPID) 0x0209) -#define PropertyTagYCbCrCoefficients ((PROPID) 0x0211) -#define PropertyTagYCbCrSubsampling ((PROPID) 0x0212) -#define PropertyTagYCbCrPositioning ((PROPID) 0x0213) -#define PropertyTagREFBlackWhite ((PROPID) 0x0214) -#define PropertyTagGamma ((PROPID) 0x0301) -#define PropertyTagICCProfileDescriptor ((PROPID) 0x0302) -#define PropertyTagSRGBRenderingIntent ((PROPID) 0x0303) -#define PropertyTagImageTitle ((PROPID) 0x0320) -#define PropertyTagResolutionXUnit ((PROPID) 0x5001) -#define PropertyTagResolutionYUnit ((PROPID) 0x5002) -#define PropertyTagResolutionXLengthUnit ((PROPID) 0x5003) -#define PropertyTagResolutionYLengthUnit ((PROPID) 0x5004) -#define PropertyTagPrintFlags ((PROPID) 0x5005) -#define PropertyTagPrintFlagsVersion ((PROPID) 0x5006) -#define PropertyTagPrintFlagsCrop ((PROPID) 0x5007) -#define PropertyTagPrintFlagsBleedWidth ((PROPID) 0x5008) -#define PropertyTagPrintFlagsBleedWidthScale ((PROPID) 0x5009) -#define PropertyTagHalftoneLPI ((PROPID) 0x500A) -#define PropertyTagHalftoneLPIUnit ((PROPID) 0x500B) -#define PropertyTagHalftoneDegree ((PROPID) 0x500C) -#define PropertyTagHalftoneShape ((PROPID) 0x500D) -#define PropertyTagHalftoneMisc ((PROPID) 0x500E) -#define PropertyTagHalftoneScreen ((PROPID) 0x500F) -#define PropertyTagJPEGQuality ((PROPID) 0x5010) -#define PropertyTagGridSize ((PROPID) 0x5011) -#define PropertyTagThumbnailFormat ((PROPID) 0x5012) -#define PropertyTagThumbnailWidth ((PROPID) 0x5013) -#define PropertyTagThumbnailHeight ((PROPID) 0x5014) -#define PropertyTagThumbnailColorDepth ((PROPID) 0x5015) -#define PropertyTagThumbnailPlanes ((PROPID) 0x5016) -#define PropertyTagThumbnailRawBytes ((PROPID) 0x5017) -#define PropertyTagThumbnailSize ((PROPID) 0x5018) -#define PropertyTagThumbnailCompressedSize ((PROPID) 0x5019) -#define PropertyTagColorTransferFunction ((PROPID) 0x501A) -#define PropertyTagThumbnailData ((PROPID) 0x501B) -#define PropertyTagThumbnailImageWidth ((PROPID) 0x5020) -#define PropertyTagThumbnailImageHeight ((PROPID) 0x5021) -#define PropertyTagThumbnailBitsPerSample ((PROPID) 0x5022) -#define PropertyTagThumbnailCompression ((PROPID) 0x5023) -#define PropertyTagThumbnailPhotometricInterp ((PROPID) 0x5024) -#define PropertyTagThumbnailImageDescription ((PROPID) 0x5025) -#define PropertyTagThumbnailEquipMake ((PROPID) 0x5026) -#define PropertyTagThumbnailEquipModel ((PROPID) 0x5027) -#define PropertyTagThumbnailStripOffsets ((PROPID) 0x5028) -#define PropertyTagThumbnailOrientation ((PROPID) 0x5029) -#define PropertyTagThumbnailSamplesPerPixel ((PROPID) 0x502A) -#define PropertyTagThumbnailRowsPerStrip ((PROPID) 0x502B) -#define PropertyTagThumbnailStripBytesCount ((PROPID) 0x502C) -#define PropertyTagThumbnailResolutionX ((PROPID) 0x502D) -#define PropertyTagThumbnailResolutionY ((PROPID) 0x502E) -#define PropertyTagThumbnailPlanarConfig ((PROPID) 0x502F) -#define PropertyTagThumbnailResolutionUnit ((PROPID) 0x5030) -#define PropertyTagThumbnailTransferFunction ((PROPID) 0x5031) -#define PropertyTagThumbnailSoftwareUsed ((PROPID) 0x5032) -#define PropertyTagThumbnailDateTime ((PROPID) 0x5033) -#define PropertyTagThumbnailArtist ((PROPID) 0x5034) -#define PropertyTagThumbnailWhitePoint ((PROPID) 0x5035) -#define PropertyTagThumbnailPrimaryChromaticities ((PROPID) 0x5036) -#define PropertyTagThumbnailYCbCrCoefficients ((PROPID) 0x5037) -#define PropertyTagThumbnailYCbCrSubsampling ((PROPID) 0x5038) -#define PropertyTagThumbnailYCbCrPositioning ((PROPID) 0x5039) -#define PropertyTagThumbnailRefBlackWhite ((PROPID) 0x503A) -#define PropertyTagThumbnailCopyRight ((PROPID) 0x503B) -#define PropertyTagLuminanceTable ((PROPID) 0x5090) -#define PropertyTagChrominanceTable ((PROPID) 0x5091) -#define PropertyTagFrameDelay ((PROPID) 0x5100) -#define PropertyTagLoopCount ((PROPID) 0x5101) -#define PropertyTagGlobalPalette ((PROPID) 0x5102) -#define PropertyTagIndexBackground ((PROPID) 0x5103) -#define PropertyTagIndexTransparent ((PROPID) 0x5104) -#define PropertyTagPixelUnit ((PROPID) 0x5110) -#define PropertyTagPixelPerUnitX ((PROPID) 0x5111) -#define PropertyTagPixelPerUnitY ((PROPID) 0x5112) -#define PropertyTagPaletteHistogram ((PROPID) 0x5113) -#define PropertyTagCopyright ((PROPID) 0x8298) -#define PropertyTagExifExposureTime ((PROPID) 0x829A) -#define PropertyTagExifFNumber ((PROPID) 0x829D) -#define PropertyTagExifIFD ((PROPID) 0x8769) -#define PropertyTagICCProfile ((PROPID) 0x8773) -#define PropertyTagExifExposureProg ((PROPID) 0x8822) -#define PropertyTagExifSpectralSense ((PROPID) 0x8824) -#define PropertyTagGpsIFD ((PROPID) 0x8825) -#define PropertyTagExifISOSpeed ((PROPID) 0x8827) -#define PropertyTagExifOECF ((PROPID) 0x8828) -#define PropertyTagExifVer ((PROPID) 0x9000) -#define PropertyTagExifDTOrig ((PROPID) 0x9003) -#define PropertyTagExifDTDigitized ((PROPID) 0x9004) -#define PropertyTagExifCompConfig ((PROPID) 0x9101) -#define PropertyTagExifCompBPP ((PROPID) 0x9102) -#define PropertyTagExifShutterSpeed ((PROPID) 0x9201) -#define PropertyTagExifAperture ((PROPID) 0x9202) -#define PropertyTagExifBrightness ((PROPID) 0x9203) -#define PropertyTagExifExposureBias ((PROPID) 0x9204) -#define PropertyTagExifMaxAperture ((PROPID) 0x9205) -#define PropertyTagExifSubjectDist ((PROPID) 0x9206) -#define PropertyTagExifMeteringMode ((PROPID) 0x9207) -#define PropertyTagExifLightSource ((PROPID) 0x9208) -#define PropertyTagExifFlash ((PROPID) 0x9209) -#define PropertyTagExifFocalLength ((PROPID) 0x920A) -#define PropertyTagExifMakerNote ((PROPID) 0x927C) -#define PropertyTagExifUserComment ((PROPID) 0x9286) -#define PropertyTagExifDTSubsec ((PROPID) 0x9290) -#define PropertyTagExifDTOrigSS ((PROPID) 0x9291) -#define PropertyTagExifDTDigSS ((PROPID) 0x9292) -#define PropertyTagExifFPXVer ((PROPID) 0xA000) -#define PropertyTagExifColorSpace ((PROPID) 0xA001) -#define PropertyTagExifPixXDim ((PROPID) 0xA002) -#define PropertyTagExifPixYDim ((PROPID) 0xA003) -#define PropertyTagExifRelatedWav ((PROPID) 0xA004) -#define PropertyTagExifInterop ((PROPID) 0xA005) -#define PropertyTagExifFlashEnergy ((PROPID) 0xA20B) -#define PropertyTagExifSpatialFR ((PROPID) 0xA20C) -#define PropertyTagExifFocalXRes ((PROPID) 0xA20E) -#define PropertyTagExifFocalYRes ((PROPID) 0xA20F) -#define PropertyTagExifFocalResUnit ((PROPID) 0xA210) -#define PropertyTagExifSubjectLoc ((PROPID) 0xA214) -#define PropertyTagExifExposureIndex ((PROPID) 0xA215) -#define PropertyTagExifSensingMethod ((PROPID) 0xA217) -#define PropertyTagExifFileSource ((PROPID) 0xA300) -#define PropertyTagExifSceneType ((PROPID) 0xA301) -#define PropertyTagExifCfaPattern ((PROPID) 0xA302) - -#define PropertyTagTypeByte ((WORD) 1) -#define PropertyTagTypeASCII ((WORD) 2) -#define PropertyTagTypeShort ((WORD) 3) -#define PropertyTagTypeLong ((WORD) 4) -#define PropertyTagTypeRational ((WORD) 5) -#define PropertyTagTypeUndefined ((WORD) 7) -#define PropertyTagTypeSLONG ((WORD) 9) -#define PropertyTagTypeSRational ((WORD) 10) - -#ifdef __cplusplus -extern "C" { -#endif - -extern const GUID EncoderChrominanceTable; /* f2e455dc-09b3-4316-8260-676ada32481c */ -extern const GUID EncoderColorDepth; /* 66087055-ad66-4c7c-9a18-38a2310b8337 */ -extern const GUID EncoderColorSpace; /* ? */ -extern const GUID EncoderCompression; /* e09d739d-ccd4-44ee-8eba-3fbf8be4fc58 */ -extern const GUID EncoderImageItems; /* ? */ -extern const GUID EncoderLuminanceTable; /* edb33bce-0266-4a77-b904-27216099e717 */ -extern const GUID EncoderQuality; /* 1d5be4b5-fa4a-452d-9cdd-5db35105e7eb */ -extern const GUID EncoderRenderMethod; /* 6d42c53a-229a-4825-8bb7-5c99e2b9a8b8 */ -extern const GUID EncoderSaveAsCMYK; /* ? */ -extern const GUID EncoderSaveFlag; /* 292266fc-ac40-47bf-8cfc-a85b89a655de */ -extern const GUID EncoderScanMethod; /* 3a4e2661-3109-4e56-8536-42c156e7dcfa */ -extern const GUID EncoderTransformation; /* 8d0eb2d1-a58e-4ea8-aa14-108074b7b6f9 */ -extern const GUID EncoderVersion; /* 24d18c76-814a-41a4-bf53-1c219cccf797 */ - -extern const GUID ImageFormatBMP; /* b96b3cab-0728-11d3-9d7b-0000f81ef32e */ -extern const GUID ImageFormatEMF; /* b96b3cac-0728-11d3-9d7b-0000f81ef32e */ -extern const GUID ImageFormatEXIF; /* ? */ -extern const GUID ImageFormatGIF; /* b96b3cb0-0728-11d3-9d7b-0000f81ef32e */ -extern const GUID ImageFormatIcon; /* b96b3cb5-0728-11d3-9d7b-0000f81ef32e */ -extern const GUID ImageFormatJPEG; /* b96b3cae-0728-11d3-9d7b-0000f81ef32e */ -extern const GUID ImageFormatMemoryBMP; /* b96b3caa-0728-11d3-9d7b-0000f81ef32e */ -extern const GUID ImageFormatPNG; /* b96b3caf-0728-11d3-9d7b-0000f81ef32e */ -extern const GUID ImageFormatTIFF; /* b96b3cb1-0728-11d3-9d7b-0000f81ef32e */ -extern const GUID ImageFormatUndefined; /* ? */ -extern const GUID ImageFormatWMF; /* b96b3cad-0728-11d3-9d7b-0000f81ef32e */ - -extern const GUID FrameDimensionPage; /* 7462dc86-6180-4c7e-8e3f-ee7333a7a483 */ -extern const GUID FrameDimensionResolution; /* ? */ -extern const GUID FrameDimensionTime; /* 6aedbd6d-3fb5-418a-83a6-7f45229dc872 */ - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* __GDIPLUS_IMAGING_H */ diff --git a/src/gdiplus4/gdiplusimpl.h b/src/gdiplus4/gdiplusimpl.h deleted file mode 100644 index 13b48ab1..00000000 --- a/src/gdiplus4/gdiplusimpl.h +++ /dev/null @@ -1,1613 +0,0 @@ -/* - * gdiplusimpl.h - * - * GDI+ Bitmap, CachedBitmap, CustomLineCap, Font, FontCollection, FontFamily, - * Image, InstalledFontCollection, PrivateFontCollection, Region - * implementation. Definitions of these classes are in gdiplusheaders.h. - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_IMPL_H -#define __GDIPLUS_IMPL_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#ifndef __cplusplus -#error "A C++ compiler is required to include gdiplusimpl.h." -#endif - -/* - * FIXME: I called this file gdiplusimpl.h, but what should it really be called? - * Or did Microsoft create separate files for each class implemented here? - */ - - -// Image - -__inline__ Image* Image::FromFile(const WCHAR *filename, - BOOL useEmbeddedColorManagement) -{ - return new Image(filename, useEmbeddedColorManagement); -} - -__inline__ Image* Image::FromStream(IStream *stream, - BOOL useEmbeddedColorManagement) -{ - return new Image(stream, useEmbeddedColorManagement); -} - -__inline__ Image::Image(const WCHAR *filename, BOOL useEmbeddedColorManagement): - nativeImage(NULL), lastStatus(Ok) -{ - if (useEmbeddedColorManagement) { - lastStatus = DllExports::GdipLoadImageFromFileICM( - filename, &nativeImage); - } else { - lastStatus = DllExports::GdipLoadImageFromFile( - filename, &nativeImage); - } -} - -__inline__ Image::Image(IStream *stream, BOOL useEmbeddedColorManagement): - nativeImage(NULL), lastStatus(Ok) -{ - if (useEmbeddedColorManagement) { - lastStatus = DllExports::GdipLoadImageFromStreamICM( - stream, &nativeImage); - } else { - lastStatus = DllExports::GdipLoadImageFromStream( - stream, &nativeImage); - } -} - -__inline__ Status Image::FindFirstItem(ImageItemData *item) -{ - // FIXME: can't test GdipFindFirstImageItem b/c it isn't exported in 1.0 - return updateStatus(DllExports::GdipFindFirstImageItem( - nativeImage, item)); -} - -__inline__ Status Image::FindNextItem(ImageItemData *item) -{ - // FIXME: can't test GdipFindFirstImageItem b/c it isn't exported in 1.0 - return updateStatus(DllExports::GdipFindNextImageItem( - nativeImage, item)); -} - -__inline__ Status Image::GetAllPropertyItems(UINT totalBufferSize, - UINT numProperties, PropertyItem *allItems) -{ - return updateStatus(DllExports::GdipGetAllPropertyItems( - nativeImage, totalBufferSize, numProperties, allItems)); -} - -__inline__ Status Image::GetBounds(RectF *srcRect, Unit *srcUnit) -{ - return updateStatus(DllExports::GdipGetImageBounds( - nativeImage, srcRect, srcUnit)); -} - -__inline__ Status Image::GetEncoderParameterList(const CLSID *clsidEncoder, - UINT size, EncoderParameters *buffer) -{ - return updateStatus(DllExports::GdipGetEncoderParameterList( - nativeImage, clsidEncoder, size, buffer)); -} - -__inline__ UINT Image::GetEncoderParameterListSize(const CLSID *clsidEncoder) -{ - UINT result = 0; - updateStatus(DllExports::GdipGetEncoderParameterListSize( - nativeImage, clsidEncoder, &result)); - return result; -} - -__inline__ UINT Image::GetFlags() -{ - UINT result = 0; - updateStatus(DllExports::GdipGetImageFlags(nativeImage, &result)); - return result; -} - -__inline__ UINT Image::GetFrameCount(const GUID *dimensionID) -{ - UINT result = 0; - updateStatus(DllExports::GdipImageGetFrameCount( - nativeImage, dimensionID, &result)); - return result; -} - -__inline__ UINT Image::GetFrameDimensionsCount() -{ - UINT result = 0; - updateStatus(DllExports::GdipImageGetFrameDimensionsCount( - nativeImage, &result)); - return result; -} - -__inline__ Status Image::GetFrameDimensionsList(GUID *dimensionIDs, UINT count) -{ - return updateStatus(DllExports::GdipImageGetFrameDimensionsList( - nativeImage, dimensionIDs, count)); -} - -__inline__ UINT Image::GetHeight() -{ - UINT result = 0; - updateStatus(DllExports::GdipGetImageHeight(nativeImage, &result)); - return result; -} - -__inline__ REAL Image::GetHorizontalResolution() -{ - REAL result = 0.0f; - updateStatus(DllExports::GdipGetImageHorizontalResolution( - nativeImage, &result)); - return result; -} - -__inline__ Status Image::GetItemData(ImageItemData *item) -{ - // FIXME: can't test GdipGetImageItemData b/c it isn't exported in 1.0 - return updateStatus(DllExports::GdipGetImageItemData( - nativeImage, item)); -} - -__inline__ Status Image::GetPalette(ColorPalette *palette, INT size) -{ - return updateStatus(DllExports::GdipGetImagePalette( - nativeImage, palette, size)); -} - -__inline__ INT Image::GetPaletteSize() -{ - INT result = 0; - updateStatus(DllExports::GdipGetImagePaletteSize(nativeImage, &result)); - return result; -} - -__inline__ Status Image::GetPhysicalDimension(SizeF *size) -{ - if (!size) return lastStatus = InvalidParameter; - return updateStatus(DllExports::GdipGetImageDimension( - nativeImage, &size->Width, &size->Height)); -} - -__inline__ PixelFormat Image::GetPixelFormat() -{ - PixelFormat result = (PixelFormat) 0; - updateStatus(DllExports::GdipGetImagePixelFormat(nativeImage, &result)); - return result; -} - -__inline__ UINT Image::GetPropertyCount() -{ - UINT result = 0; - updateStatus(DllExports::GdipGetPropertyCount(nativeImage, &result)); - return result; -} - -__inline__ Status Image::GetPropertyIdList(UINT numOfProperty, PROPID *list) -{ - return updateStatus(DllExports::GdipGetPropertyIdList( - nativeImage, numOfProperty, list)); -} - -__inline__ Status Image::GetPropertyItem(PROPID propId, UINT propSize, - PropertyItem *buffer) -{ - return updateStatus(DllExports::GdipGetPropertyItem( - nativeImage, propId, propSize, buffer)); -} - -__inline__ UINT Image::GetPropertyItemSize(PROPID propId) -{ - UINT result = 0; - updateStatus(DllExports::GdipGetPropertyItemSize( - nativeImage, propId, &result)); - return result; -} - -__inline__ Status Image::GetPropertySize( - UINT *totalBufferSize, UINT *numProperties) -{ - return updateStatus(DllExports::GdipGetPropertySize( - nativeImage, totalBufferSize, numProperties)); -} - -__inline__ Status Image::GetRawFormat(GUID *format) -{ - return updateStatus(DllExports::GdipGetImageRawFormat( - nativeImage, format)); -} - -__inline__ Image* Image::GetThumbnailImage(UINT thumbWidth, UINT thumbHeight, - GetThumbnailImageAbort callback, VOID *callbackData) -{ - GpImage *thumbImage = NULL; - Status status = updateStatus(DllExports::GdipGetImageThumbnail( - nativeImage, thumbWidth, thumbHeight, &thumbImage, - callback, callbackData)); - - if (status == Ok) { - Image *result = new Image(thumbImage, Ok); - if (!result) { - DllExports::GdipDisposeImage(thumbImage); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } -} - -__inline__ ImageType Image::GetType() const -{ - ImageType result = ImageTypeUnknown; - updateStatus(DllExports::GdipGetImageType(nativeImage, &result)); - return result; -} - -__inline__ REAL Image::GetVerticalResolution() -{ - REAL result = 0.0f; - updateStatus(DllExports::GdipGetImageVerticalResolution( - nativeImage, &result)); - return result; -} - -__inline__ UINT Image::GetWidth() -{ - UINT result = 0; - updateStatus(DllExports::GdipGetImageWidth(nativeImage, &result)); - return result; -} - -__inline__ Status Image::RemovePropertyItem(PROPID propId) -{ - return updateStatus(DllExports::GdipRemovePropertyItem( - nativeImage, propId)); -} - -__inline__ Status Image::RotateFlip(RotateFlipType rotateFlipType) -{ - return updateStatus(DllExports::GdipImageRotateFlip( - nativeImage, rotateFlipType)); -} - -__inline__ Status Image::Save(const WCHAR *filename, const CLSID *clsidEncoder, - const EncoderParameters *encoderParams) -{ - return updateStatus(DllExports::GdipSaveImageToFile( - nativeImage, filename, clsidEncoder, encoderParams)); -} - -__inline__ Status Image::Save(IStream *stream, const CLSID *clsidEncoder, - const EncoderParameters *encoderParams) -{ - return updateStatus(DllExports::GdipSaveImageToStream( - nativeImage, stream, clsidEncoder, encoderParams)); -} - -__inline__ Status Image::SaveAdd(const EncoderParameters *encoderParams) -{ - return updateStatus(DllExports::GdipSaveAdd( - nativeImage, encoderParams)); -} - -__inline__ Status Image::SaveAdd(Image *newImage, - const EncoderParameters *encoderParams) -{ - return updateStatus(DllExports::GdipSaveAddImage( - nativeImage, - newImage ? newImage->nativeImage : NULL, - encoderParams)); -} - -__inline__ Status Image::SelectActiveFrame( - const GUID *dimensionID, UINT frameIndex) -{ - return updateStatus(DllExports::GdipImageSelectActiveFrame( - nativeImage, dimensionID, frameIndex)); -} - -__inline__ Status Image::SetAbort(GdiplusAbort *pIAbort) -{ - // FIXME: can't test GdipImageSetAbort because it isn't exported in 1.0 - return updateStatus(DllExports::GdipImageSetAbort( - nativeImage, pIAbort)); -} - -__inline__ Status Image::SetPalette(const ColorPalette *palette) -{ - return updateStatus(DllExports::GdipSetImagePalette( - nativeImage, palette)); -} - -__inline__ Status Image::SetPropertyItem(const PropertyItem *item) -{ - return updateStatus(DllExports::GdipSetPropertyItem(nativeImage, item)); -} - - -// Bitmap - -__inline__ Bitmap* Bitmap::FromBITMAPINFO(const BITMAPINFO *gdiBitmapInfo, - VOID *gdiBitmapData) -{ - return new Bitmap(gdiBitmapInfo, gdiBitmapData); -} - -__inline__ Bitmap* Bitmap::FromDirectDrawSurface7(IDirectDrawSurface7 *surface) -{ - return new Bitmap(surface); -} - -__inline__ Bitmap* Bitmap::FromFile(const WCHAR *filename, - BOOL useEmbeddedColorManagement) -{ - return new Bitmap(filename, useEmbeddedColorManagement); -} - -__inline__ Bitmap* Bitmap::FromHBITMAP(HBITMAP hbm, HPALETTE hpal) -{ - return new Bitmap(hbm, hpal); -} - -__inline__ Bitmap* Bitmap::FromHICON(HICON icon) -{ - return new Bitmap(icon); -} - -__inline__ Bitmap* Bitmap::FromResource( - HINSTANCE hInstance, const WCHAR *bitmapName) -{ - return new Bitmap(hInstance, bitmapName); -} - -__inline__ Bitmap* Bitmap::FromStream(IStream *stream, - BOOL useEmbeddedColorManagement) -{ - return new Bitmap(stream, useEmbeddedColorManagement); -} - -//TODO: [GDI+ 1.1] Bitmap::ApplyEffect -//__inline__ Status Bitmap::ApplyEffect(Bitmap **inputs, INT numInputs, -// Effect *effect, RECT *ROI, RECT *outputRect, Bitmap **output) -//{ -// return NotImplemented; -//} - -__inline__ Status Bitmap::InitializePalette(ColorPalette *palette, - PaletteType paletteType, INT optimalColors, - BOOL useTransparentColor, Bitmap *bitmap) -{ - // FIXME: can't test GdipInitializePalette b/c it isn't exported in 1.0 - return DllExports::GdipInitializePalette(palette, paletteType, - optimalColors, useTransparentColor, - bitmap ? (GpBitmap*) bitmap->nativeImage : NULL); -} - -__inline__ Bitmap::Bitmap(const BITMAPINFO *gdiBitmapInfo, VOID *gdiBitmapData): - Image(NULL, Ok) -{ - GpBitmap *nativeBitmap = NULL; - lastStatus = DllExports::GdipCreateBitmapFromGdiDib( - gdiBitmapInfo, gdiBitmapData, &nativeBitmap); - nativeImage = nativeBitmap; -} - -__inline__ Bitmap::Bitmap(IDirectDrawSurface7 *surface): Image(NULL, Ok) -{ - GpBitmap *nativeBitmap = NULL; - lastStatus = DllExports::GdipCreateBitmapFromDirectDrawSurface( - surface, &nativeBitmap); - nativeImage = nativeBitmap; -} - -__inline__ Bitmap::Bitmap(const WCHAR *filename, - BOOL useEmbeddedColorManagement): Image(NULL, Ok) -{ - GpBitmap *nativeBitmap = NULL; - if (useEmbeddedColorManagement) { - lastStatus = DllExports::GdipCreateBitmapFromFileICM( - filename, &nativeBitmap); - } else { - lastStatus = DllExports::GdipCreateBitmapFromFile( - filename, &nativeBitmap); - } - nativeImage = nativeBitmap; -} - -__inline__ Bitmap::Bitmap(HBITMAP hbm, HPALETTE hpal): - Image(NULL, Ok) -{ - GpBitmap *nativeBitmap = NULL; - lastStatus = DllExports::GdipCreateBitmapFromHBITMAP( - hbm, hpal, &nativeBitmap); - nativeImage = nativeBitmap; -} - -__inline__ Bitmap::Bitmap(HICON hicon): - Image(NULL, Ok) -{ - GpBitmap *nativeBitmap = NULL; - lastStatus = DllExports::GdipCreateBitmapFromHICON(hicon, &nativeBitmap); - nativeImage = nativeBitmap; -} - -__inline__ Bitmap::Bitmap(HINSTANCE hInstance, const WCHAR *bitmapName): - Image(NULL, Ok) -{ - GpBitmap *nativeBitmap = NULL; - lastStatus = DllExports::GdipCreateBitmapFromResource( - hInstance, bitmapName, &nativeBitmap); - nativeImage = nativeBitmap; -} - -__inline__ Bitmap::Bitmap(IStream *stream, BOOL useEmbeddedColorManagement): - Image(NULL, Ok) -{ - GpBitmap *nativeBitmap = NULL; - if (useEmbeddedColorManagement) { - lastStatus = DllExports::GdipCreateBitmapFromStreamICM( - stream, &nativeBitmap); - } else { - lastStatus = DllExports::GdipCreateBitmapFromStream( - stream, &nativeBitmap); - } - nativeImage = nativeBitmap; -} - -__inline__ Bitmap::Bitmap(INT width, INT height, Graphics *target): - Image(NULL, Ok) -{ - GpBitmap *nativeBitmap = NULL; - lastStatus = DllExports::GdipCreateBitmapFromGraphics( - width, height, target ? target->nativeGraphics : NULL, - &nativeBitmap); - nativeImage = nativeBitmap; -} - -__inline__ Bitmap::Bitmap(INT width, INT height, PixelFormat format): - Image(NULL, Ok) -{ - GpBitmap *nativeBitmap = NULL; - lastStatus = DllExports::GdipCreateBitmapFromScan0( - width, height, 0, format, NULL, &nativeBitmap); - nativeImage = nativeBitmap; -} - -__inline__ Bitmap::Bitmap(INT width, INT height, INT stride, - PixelFormat format, BYTE *scan0): Image(NULL, Ok) -{ - GpBitmap *nativeBitmap = NULL; - lastStatus = DllExports::GdipCreateBitmapFromScan0( - width, height, stride, format, scan0, &nativeBitmap); - nativeImage = nativeBitmap; -} - -__inline__ Bitmap* Bitmap::Clone(const RectF& rect, PixelFormat format) const -{ - return Clone(rect.X, rect.Y, rect.Width, rect.Height, format); -} - -__inline__ Bitmap* Bitmap::Clone(const Rect& rect, PixelFormat format) const -{ - return Clone(rect.X, rect.Y, rect.Width, rect.Height, format); -} - -__inline__ Bitmap* Bitmap::Clone(REAL x, REAL y, REAL width, REAL height, - PixelFormat format) const -{ - GpBitmap *cloneBitmap = NULL; - Status status = updateStatus(DllExports::GdipCloneBitmapArea( - x, y, width, height, format, - (GpBitmap*) nativeImage, &cloneBitmap)); - if (status == Ok) { - Bitmap *result = new Bitmap(cloneBitmap, lastStatus); - if (!result) { - DllExports::GdipDisposeImage(cloneBitmap); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } -} - -__inline__ Bitmap* Bitmap::Clone(INT x, INT y, INT width, INT height, - PixelFormat format) const -{ - GpBitmap *cloneBitmap = NULL; - Status status = updateStatus(DllExports::GdipCloneBitmapAreaI( - x, y, width, height, format, - (GpBitmap*) nativeImage, &cloneBitmap)); - if (status == Ok) { - Bitmap *result = new Bitmap(cloneBitmap, lastStatus); - if (!result) { - DllExports::GdipDisposeImage(cloneBitmap); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } -} - -//TODO: [GDI+ 1.1] Bitmap::ApplyEffect -//__inline__ Status Bitmap::ApplyEffect(Effect *effect, RECT *ROI) -//{ -// return NotImplemented; -//} - -__inline__ Status Bitmap::ConvertFormat(PixelFormat format, - DitherType ditherType, PaletteType paletteType, - ColorPalette *palette, REAL alphaThresholdPercent) -{ - // FIXME: can't test GdipBitmapConvertFormat b/c it isn't exported in 1.0 - return updateStatus(DllExports::GdipBitmapConvertFormat( - (GpBitmap*) nativeImage, format, ditherType, - paletteType, palette, alphaThresholdPercent)); -} - -__inline__ Status Bitmap::GetHBITMAP( - const Color& colorBackground, HBITMAP *hbmReturn) const -{ - return updateStatus(DllExports::GdipCreateHBITMAPFromBitmap( - (GpBitmap*) nativeImage, hbmReturn, - colorBackground.GetValue())); -} - -__inline__ Status Bitmap::GetHICON(HICON *icon) const -{ - return updateStatus(DllExports::GdipCreateHICONFromBitmap( - (GpBitmap*) nativeImage, icon)); -} - -__inline__ Status Bitmap::GetHistogram(HistogramFormat format, - UINT numberOfEntries, - UINT *channel0, UINT *channel1, - UINT *channel2, UINT *channel3) const -{ - return updateStatus(DllExports::GdipBitmapGetHistogram( - (GpBitmap*) nativeImage, format, numberOfEntries, - channel0, channel1, channel2, channel3)); -} - -__inline__ Status Bitmap::GetHistogramSize(HistogramFormat format, - UINT *numberOfEntries) const -{ - return updateStatus(DllExports::GdipBitmapGetHistogramSize( - format, numberOfEntries)); -} - -__inline__ Status Bitmap::GetPixel(INT x, INT y, Color *color) const -{ - return updateStatus(DllExports::GdipBitmapGetPixel( - (GpBitmap*) nativeImage, x, y, - color ? &color->Value : NULL)); -} - -__inline__ Status Bitmap::LockBits(const Rect *rect, UINT flags, - PixelFormat format, BitmapData *lockedBitmapData) -{ - return updateStatus(DllExports::GdipBitmapLockBits( - (GpBitmap*) nativeImage, rect, flags, format, - lockedBitmapData)); -} - -__inline__ Status Bitmap::SetPixel(INT x, INT y, const Color& color) -{ - return updateStatus(DllExports::GdipBitmapSetPixel( - (GpBitmap*) nativeImage, x, y, color.GetValue())); -} - -__inline__ Status Bitmap::SetResolution(REAL xdpi, REAL ydpi) -{ - return updateStatus(DllExports::GdipBitmapSetResolution( - (GpBitmap*) nativeImage, xdpi, ydpi)); -} - -__inline__ Status Bitmap::UnlockBits(BitmapData *lockedBitmapData) -{ - return updateStatus(DllExports::GdipBitmapUnlockBits( - (GpBitmap*) nativeImage, lockedBitmapData)); -} - - -// CachedBitmap - -__inline__ CachedBitmap::CachedBitmap(Bitmap *bitmap, Graphics *graphics): - nativeCachedBitmap(NULL), lastStatus(Ok) -{ - lastStatus = DllExports::GdipCreateCachedBitmap( - bitmap ? ((GpBitmap*) bitmap->nativeImage) : NULL, - graphics ? graphics->nativeGraphics : NULL, - &nativeCachedBitmap); -} - -__inline__ CachedBitmap::~CachedBitmap() -{ - DllExports::GdipDeleteCachedBitmap(nativeCachedBitmap); -} - - -// CustomLineCap - -__inline__ CustomLineCap::CustomLineCap( - const GraphicsPath *fillPath, - const GraphicsPath *strokePath, - LineCap baseCap, REAL baseInset): - nativeCustomLineCap(NULL), lastStatus(Ok) -{ - lastStatus = DllExports::GdipCreateCustomLineCap( - fillPath ? fillPath->nativePath : NULL, - strokePath ? strokePath->nativePath : NULL, - baseCap, baseInset, &nativeCustomLineCap); -} - -__inline__ LineCap CustomLineCap::GetBaseCap() const -{ - LineCap result = LineCapFlat; - updateStatus(DllExports::GdipGetCustomLineCapBaseCap( - nativeCustomLineCap, &result)); - return result; -} - -__inline__ REAL CustomLineCap::GetBaseInset() const -{ - REAL result = 0.0f; - updateStatus(DllExports::GdipGetCustomLineCapBaseInset( - nativeCustomLineCap, &result)); - return result; -} - -__inline__ Status CustomLineCap::GetStrokeCaps(LineCap *startCap, - LineCap *endCap) const -{ - return updateStatus(DllExports::GdipGetCustomLineCapStrokeCaps( - nativeCustomLineCap, startCap, endCap)); -} - -__inline__ LineJoin CustomLineCap::GetStrokeJoin() const -{ - LineJoin result = LineJoinMiter; - updateStatus(DllExports::GdipGetCustomLineCapStrokeJoin( - nativeCustomLineCap, &result)); - return result; -} - -__inline__ REAL CustomLineCap::GetWidthScale() const -{ - REAL result = 0.0f; - updateStatus(DllExports::GdipGetCustomLineCapWidthScale( - nativeCustomLineCap, &result)); - return result; -} - -__inline__ Status CustomLineCap::SetBaseCap(LineCap baseCap) -{ - return updateStatus(DllExports::GdipSetCustomLineCapBaseCap( - nativeCustomLineCap, baseCap)); -} - -__inline__ Status CustomLineCap::SetBaseInset(REAL inset) -{ - return updateStatus(DllExports::GdipSetCustomLineCapBaseInset( - nativeCustomLineCap, inset)); -} - -__inline__ Status CustomLineCap::SetStrokeCap(LineCap strokeCap) -{ - return updateStatus(DllExports::GdipSetCustomLineCapStrokeCaps( - nativeCustomLineCap, strokeCap, strokeCap)); -} - -__inline__ Status CustomLineCap::SetStrokeCaps(LineCap startCap, LineCap endCap) -{ - return updateStatus(DllExports::GdipSetCustomLineCapStrokeCaps( - nativeCustomLineCap, startCap, endCap)); -} - -__inline__ Status CustomLineCap::SetStrokeJoin(LineJoin lineJoin) -{ - return updateStatus(DllExports::GdipSetCustomLineCapStrokeJoin( - nativeCustomLineCap, lineJoin)); -} - -__inline__ Status CustomLineCap::SetWidthScale(REAL widthScale) -{ - return updateStatus(DllExports::GdipSetCustomLineCapWidthScale( - nativeCustomLineCap, widthScale)); -} - - -// Font - -__inline__ Font::Font(const FontFamily *family, - REAL emSize, INT style, Unit unit): - nativeFont(NULL), lastStatus(Ok) -{ - lastStatus = DllExports::GdipCreateFont( - family ? family->nativeFontFamily : NULL, - emSize, style, unit, &nativeFont); -} - -__inline__ Font::Font(HDC hdc, HFONT hfont): - nativeFont(NULL), lastStatus(Ok) -{ - LOGFONTW logfont; - if (GetObject(hfont, sizeof logfont, &logfont)) { - lastStatus = DllExports::GdipCreateFontFromLogfontW( - hdc, &logfont, &nativeFont); - } else { - lastStatus = DllExports::GdipCreateFontFromDC( - hdc, &nativeFont); - } -} - -__inline__ Font::Font(HDC hdc, const LOGFONTA *logfont): - nativeFont(NULL), lastStatus(Ok) -{ - lastStatus = DllExports::GdipCreateFontFromLogfontA( - hdc, logfont, &nativeFont); -} - -__inline__ Font::Font(HDC hdc, const LOGFONTW *logfont): - nativeFont(NULL), lastStatus(Ok) -{ - lastStatus = DllExports::GdipCreateFontFromLogfontW( - hdc, logfont, &nativeFont); -} - -__inline__ Font::Font(HDC hdc): - nativeFont(NULL), lastStatus(Ok) -{ - lastStatus = DllExports::GdipCreateFontFromDC(hdc, &nativeFont); -} - -__inline__ Font::Font(const WCHAR *familyName, REAL emSize, INT style, - Unit unit, const FontCollection *fontCollection): - nativeFont(NULL), lastStatus(Ok) -{ - GpFontFamily *nativeFamily = NULL; - lastStatus = DllExports::GdipCreateFontFamilyFromName( - familyName, - fontCollection ? fontCollection->nativeFontCollection : NULL, - &nativeFamily); - - if (nativeFamily) { - lastStatus = DllExports::GdipCreateFont( - nativeFamily, emSize, style, unit, &nativeFont); - DllExports::GdipDeleteFontFamily(nativeFamily); - } -} - -__inline__ Font::~Font() -{ - DllExports::GdipDeleteFont(nativeFont); -} - -__inline__ Font* Font::Clone() const -{ - GpFont *cloneFont = NULL; - Status status = updateStatus(DllExports::GdipCloneFont( - nativeFont, &cloneFont)); - if (status == Ok) { - Font *result = new Font(cloneFont, lastStatus); - if (!result) { - DllExports::GdipDeleteFont(cloneFont); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } -} - -__inline__ Status Font::GetFamily(FontFamily *family) const -{ - if (!family) return lastStatus = InvalidParameter; - // FIXME: do we need to call GdipDeleteFontFamily first? - return family->lastStatus = updateStatus(DllExports::GdipGetFamily( - nativeFont, &family->nativeFontFamily)); -} - -__inline__ REAL Font::GetHeight(const Graphics *graphics) const -{ - REAL result = 0.0f; - updateStatus(DllExports::GdipGetFontHeight( - nativeFont, graphics ? graphics->nativeGraphics : NULL, - &result)); - return result; -} - -__inline__ REAL Font::GetHeight(REAL dpi) const -{ - REAL result = 0.0f; - updateStatus(DllExports::GdipGetFontHeightGivenDPI( - nativeFont, dpi, &result)); - return result; -} - -__inline__ Status Font::GetLogFontA(const Graphics *graphics, LOGFONTA *logfontA) -const -{ - return updateStatus(DllExports::GdipGetLogFontA( - nativeFont, graphics ? graphics->nativeGraphics : NULL, - logfontA)); -} - -__inline__ Status Font::GetLogFontW(const Graphics *graphics, LOGFONTW *logfontW) -const -{ - return updateStatus(DllExports::GdipGetLogFontW( - nativeFont, graphics ? graphics->nativeGraphics : NULL, - logfontW)); -} - -__inline__ REAL Font::GetSize() const -{ - REAL result = 0.0; - updateStatus(DllExports::GdipGetFontSize(nativeFont, &result)); - return result; -} - -__inline__ INT Font::GetStyle() const -{ - INT result = FontStyleRegular; - updateStatus(DllExports::GdipGetFontStyle(nativeFont, &result)); - return result; -} - -__inline__ Unit Font::GetUnit() const -{ - Unit result = UnitPoint; - updateStatus(DllExports::GdipGetFontUnit(nativeFont, &result)); - return result; -} - - -// FontCollection - -__inline__ FontCollection::FontCollection(): - nativeFontCollection(NULL), lastStatus(Ok) -{ -} - -__inline__ Status FontCollection::GetFamilies(INT numSought, - FontFamily *families, INT *numFound) const -{ - if (numSought <= 0 || !families || !numFound) - return lastStatus = InvalidParameter; - - for (int i = 0; i < numSought; ++i) { - families[i].nativeFontFamily = NULL; - families[i].lastStatus = FontFamilyNotFound; - } - *numFound = 0; - - GpFontFamily **nativeFamilyArray = (GpFontFamily**) - DllExports::GdipAlloc(numSought * sizeof (GpFontFamily*)); - if (!nativeFamilyArray) - return lastStatus = OutOfMemory; - - Status status = updateStatus(DllExports::GdipGetFontCollectionFamilyList( - nativeFontCollection, numSought, nativeFamilyArray, - numFound)); - - // FIXME: must the native GpFontFamily objects be cloned? Seems so. - // (if this is not done, the "Creating a Private Font Collection" - // example crashes on "delete[] pFontFamily") - - if (status == Ok) { - for (int i = 0; i < *numFound; ++i) { - families[i].lastStatus = - updateStatus(DllExports::GdipCloneFontFamily( - nativeFamilyArray[i], - &families[i].nativeFontFamily)); - } - } - - DllExports::GdipFree(nativeFamilyArray); - return status; -} - -__inline__ INT FontCollection::GetFamilyCount() const -{ - INT result = 0; - updateStatus(DllExports::GdipGetFontCollectionFamilyCount( - nativeFontCollection, &result)); - return result; -} - - -// FontFamily - -// FIXME: do FontFamily::GenericMonospace() et al. need to be thread safe? -// FIXME: maybe put parts of this in gdiplus.c - -extern "C" void *_GdipFontFamilyCachedGenericMonospace; -extern "C" void *_GdipFontFamilyCachedGenericSansSerif; -extern "C" void *_GdipFontFamilyCachedGenericSerif; - -__inline__ const FontFamily* FontFamily::GenericMonospace() -{ - if (!_GdipFontFamilyCachedGenericMonospace) { - GpFontFamily *nativeFontFamily = 0; - Status status = DllExports::GdipGetGenericFontFamilyMonospace( - &nativeFontFamily); - if (status == Ok && nativeFontFamily) { - _GdipFontFamilyCachedGenericMonospace = (void*) - new FontFamily(nativeFontFamily, Ok); - } - } - return (FontFamily*) _GdipFontFamilyCachedGenericMonospace; -} - -__inline__ const FontFamily* FontFamily::GenericSansSerif() -{ - if (!_GdipFontFamilyCachedGenericSansSerif) { - GpFontFamily *nativeFontFamily = 0; - Status status = DllExports::GdipGetGenericFontFamilySansSerif( - &nativeFontFamily); - if (status == Ok && nativeFontFamily) { - _GdipFontFamilyCachedGenericSansSerif = (void*) - new FontFamily(nativeFontFamily, Ok); - } - } - return (FontFamily*) _GdipFontFamilyCachedGenericSansSerif; -} - -__inline__ const FontFamily* FontFamily::GenericSerif() -{ - if (!_GdipFontFamilyCachedGenericSerif) { - GpFontFamily *nativeFontFamily = 0; - Status status = DllExports::GdipGetGenericFontFamilySerif( - &nativeFontFamily); - if (status == Ok && nativeFontFamily) { - _GdipFontFamilyCachedGenericSerif = (void*) - new FontFamily(nativeFontFamily, Ok); - } - } - return (FontFamily*) _GdipFontFamilyCachedGenericSerif; -} - -__inline__ FontFamily::FontFamily(): - nativeFontFamily(NULL), lastStatus(Ok) -{ -} - -__inline__ FontFamily::FontFamily(const WCHAR *name, - const FontCollection *fontCollection): - nativeFontFamily(NULL), lastStatus(Ok) -{ - lastStatus = DllExports::GdipCreateFontFamilyFromName(name, - fontCollection ? fontCollection->nativeFontCollection : NULL, - &nativeFontFamily); -} - -__inline__ FontFamily::~FontFamily() -{ - DllExports::GdipDeleteFontFamily(nativeFontFamily); -} - -__inline__ FontFamily* FontFamily::Clone() const -{ - GpFontFamily *cloneFontFamily = NULL; - Status status = updateStatus(DllExports::GdipCloneFontFamily( - nativeFontFamily, &cloneFontFamily)); - if (status == Ok) { - FontFamily *result = new FontFamily(cloneFontFamily, lastStatus); - if (!result) { - DllExports::GdipDeleteFontFamily(cloneFontFamily); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } -} - -__inline__ UINT16 FontFamily::GetCellAscent(INT style) const -{ - UINT16 result = 0; - updateStatus(DllExports::GdipGetCellAscent( - nativeFontFamily, style, &result)); - return result; -} - -__inline__ UINT16 FontFamily::GetCellDescent(INT style) const -{ - UINT16 result = 0; - updateStatus(DllExports::GdipGetCellDescent( - nativeFontFamily, style, &result)); - return result; -} - -__inline__ UINT16 FontFamily::GetEmHeight(INT style) const -{ - UINT16 result = 0; - updateStatus(DllExports::GdipGetEmHeight( - nativeFontFamily, style, &result)); - return result; -} - -__inline__ Status FontFamily::GetFamilyName(WCHAR name[LF_FACESIZE], - LANGID language) const -{ - return updateStatus(DllExports::GdipGetFamilyName( - nativeFontFamily, name, language)); -} - -__inline__ UINT16 FontFamily::GetLineSpacing(INT style) const -{ - UINT16 result = 0; - updateStatus(DllExports::GdipGetLineSpacing( - nativeFontFamily, style, &result)); - return result; -} - -__inline__ BOOL FontFamily::IsStyleAvailable(INT style) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsStyleAvailable( - nativeFontFamily, style, &result)); - return result; -} - - -// InstalledFontCollection - -__inline__ InstalledFontCollection::InstalledFontCollection() -{ - lastStatus = DllExports::GdipNewInstalledFontCollection( - &nativeFontCollection); -} - - -// PrivateFontCollection - -__inline__ PrivateFontCollection::PrivateFontCollection() -{ - lastStatus = DllExports::GdipNewPrivateFontCollection( - &nativeFontCollection); -} - -__inline__ Status PrivateFontCollection::AddFontFile(const WCHAR *filename) -{ - return updateStatus(DllExports::GdipPrivateAddFontFile( - nativeFontCollection, filename)); -} - -__inline__ Status PrivateFontCollection::AddMemoryFont( - const VOID *memory, INT length) -{ - return updateStatus(DllExports::GdipPrivateAddMemoryFont( - nativeFontCollection, memory, length)); -} - - -// Region - -__inline__ Region* Region::FromHRGN(HRGN hrgn) -{ - return new Region(hrgn); -} - -__inline__ Region::Region(): nativeRegion(NULL), lastStatus(Ok) -{ - lastStatus = DllExports::GdipCreateRegion(&nativeRegion); -} - -__inline__ Region::Region(const RectF& rect): nativeRegion(NULL), lastStatus(Ok) -{ - lastStatus = DllExports::GdipCreateRegionRect(&rect, &nativeRegion); -} - -__inline__ Region::Region(const Rect& rect): nativeRegion(NULL), lastStatus(Ok) -{ - lastStatus = DllExports::GdipCreateRegionRectI(&rect, &nativeRegion); -} - -__inline__ Region::Region(const GraphicsPath *path): - nativeRegion(NULL), lastStatus(Ok) -{ - lastStatus = DllExports::GdipCreateRegionPath( - path ? path->nativePath : NULL, &nativeRegion); -} - -__inline__ Region::Region(const BYTE *regionData, INT size): - nativeRegion(NULL), lastStatus(Ok) -{ - lastStatus = DllExports::GdipCreateRegionRgnData( - regionData, size, &nativeRegion); -} - -__inline__ Region::Region(HRGN hrgn): nativeRegion(NULL), lastStatus(Ok) -{ - lastStatus = DllExports::GdipCreateRegionHrgn(hrgn, &nativeRegion); -} - -__inline__ Region::~Region() -{ - DllExports::GdipDeleteRegion(nativeRegion); -} - -__inline__ Region* Region::Clone() const -{ - GpRegion *cloneRegion = NULL; - Status status = updateStatus(DllExports::GdipCloneRegion( - nativeRegion, &cloneRegion)); - if (status == Ok) { - Region *result = new Region(cloneRegion, lastStatus); - if (!result) { - DllExports::GdipDeleteRegion(cloneRegion); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } -} - -__inline__ Status Region::Complement(const RectF& rect) -{ - return updateStatus(DllExports::GdipCombineRegionRect( - nativeRegion, &rect, CombineModeComplement)); -} - -__inline__ Status Region::Complement(const Rect& rect) -{ - return updateStatus(DllExports::GdipCombineRegionRectI( - nativeRegion, &rect, CombineModeComplement)); -} - -__inline__ Status Region::Complement(const Region *region) -{ - return updateStatus(DllExports::GdipCombineRegionRegion( - nativeRegion, region ? region->nativeRegion : NULL, - CombineModeComplement)); -} - -__inline__ Status Region::Complement(const GraphicsPath *path) -{ - return updateStatus(DllExports::GdipCombineRegionPath( - nativeRegion, path ? path->nativePath : NULL, - CombineModeComplement)); -} - -__inline__ BOOL Region::Equals(const Region *region, const Graphics *graphics) -const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsEqualRegion( - nativeRegion, region ? region->nativeRegion : NULL, - graphics ? graphics->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ Status Region::Exclude(const RectF& rect) -{ - return updateStatus(DllExports::GdipCombineRegionRect( - nativeRegion, &rect, CombineModeExclude)); -} - -__inline__ Status Region::Exclude(const Rect& rect) -{ - return updateStatus(DllExports::GdipCombineRegionRectI( - nativeRegion, &rect, CombineModeExclude)); -} - -__inline__ Status Region::Exclude(const Region *region) -{ - return updateStatus(DllExports::GdipCombineRegionRegion( - nativeRegion, region ? region->nativeRegion : NULL, - CombineModeExclude)); -} - -__inline__ Status Region::Exclude(const GraphicsPath *path) -{ - return updateStatus(DllExports::GdipCombineRegionPath( - nativeRegion, path ? path->nativePath : NULL, - CombineModeExclude)); -} - -__inline__ Status Region::GetBounds(RectF *rect, const Graphics *graphics) const -{ - return updateStatus(DllExports::GdipGetRegionBounds(nativeRegion, - graphics ? graphics->nativeGraphics : NULL, rect)); -} - -__inline__ Status Region::GetBounds(Rect *rect, const Graphics *graphics) const -{ - return updateStatus(DllExports::GdipGetRegionBoundsI(nativeRegion, - graphics ? graphics->nativeGraphics : NULL, rect)); -} - -__inline__ Status Region::GetData(BYTE *buffer, UINT bufferSize, - UINT *sizeFilled) const -{ - return updateStatus(DllExports::GdipGetRegionData( - nativeRegion, buffer, bufferSize, sizeFilled)); -} - -__inline__ UINT Region::GetDataSize() const -{ - UINT result = 0; - updateStatus(DllExports::GdipGetRegionDataSize(nativeRegion, &result)); - return result; -} - -__inline__ HRGN Region::GetHRGN(const Graphics *graphics) const -{ - HRGN result = NULL; - updateStatus(DllExports::GdipGetRegionHRgn(nativeRegion, - graphics ? graphics->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ Status Region::GetRegionScans(const Matrix *matrix, - RectF *rects, INT *count) const -{ - return updateStatus(DllExports::GdipGetRegionScans( - nativeRegion, rects, count, - matrix ? matrix->nativeMatrix : NULL)); -} - -__inline__ Status Region::GetRegionScans(const Matrix *matrix, - Rect *rects, INT *count) const -{ - return updateStatus(DllExports::GdipGetRegionScansI( - nativeRegion, rects, count, - matrix ? matrix->nativeMatrix : NULL)); -} - -__inline__ UINT Region::GetRegionScansCount(const Matrix *matrix) const -{ - UINT result = 0; - updateStatus(DllExports::GdipGetRegionScansCount( - nativeRegion, &result, - matrix ? matrix->nativeMatrix : NULL)); - return result; -} - -__inline__ Status Region::Intersect(const RectF& rect) -{ - return updateStatus(DllExports::GdipCombineRegionRect( - nativeRegion, &rect, CombineModeIntersect)); -} - -__inline__ Status Region::Intersect(const Rect& rect) -{ - return updateStatus(DllExports::GdipCombineRegionRectI( - nativeRegion, &rect, CombineModeIntersect)); -} - -__inline__ Status Region::Intersect(const Region *region) -{ - return updateStatus(DllExports::GdipCombineRegionRegion( - nativeRegion, region ? region->nativeRegion : NULL, - CombineModeIntersect)); -} - -__inline__ Status Region::Intersect(const GraphicsPath *path) -{ - return updateStatus(DllExports::GdipCombineRegionPath( - nativeRegion, path ? path->nativePath : NULL, - CombineModeIntersect)); -} - -__inline__ BOOL Region::IsEmpty(const Graphics *graphics) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsEmptyRegion(nativeRegion, - graphics ? graphics->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ BOOL Region::IsInfinite(const Graphics *graphics) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsInfiniteRegion(nativeRegion, - graphics ? graphics->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ BOOL Region::IsVisible(REAL x, REAL y, - const Graphics *graphics) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisibleRegionPoint( - nativeRegion, x, y, - graphics ? graphics->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ BOOL Region::IsVisible(INT x, INT y, - const Graphics *graphics) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisibleRegionPointI( - nativeRegion, x, y, - graphics ? graphics->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ BOOL Region::IsVisible(const PointF& point, - const Graphics *graphics) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisibleRegionPoint( - nativeRegion, point.X, point.Y, - graphics ? graphics->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ BOOL Region::IsVisible(const Point& point, - const Graphics *graphics) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisibleRegionPointI( - nativeRegion, point.X, point.Y, - graphics ? graphics->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ BOOL Region::IsVisible(REAL x, REAL y, REAL width, REAL height, - const Graphics *graphics) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisibleRegionRect( - nativeRegion, x, y, width, height, - graphics ? graphics->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ BOOL Region::IsVisible(INT x, INT y, INT width, INT height, - const Graphics *graphics) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisibleRegionRectI( - nativeRegion, x, y, width, height, - graphics ? graphics->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ BOOL Region::IsVisible(const RectF& rect, - const Graphics *graphics) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisibleRegionRect( - nativeRegion, rect.X, rect.Y, rect.Width, rect.Height, - graphics ? graphics->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ BOOL Region::IsVisible(const Rect& rect, - const Graphics *graphics) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisibleRegionRectI( - nativeRegion, rect.X, rect.Y, rect.Width, rect.Height, - graphics ? graphics->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ Status Region::MakeEmpty() -{ - return updateStatus(DllExports::GdipSetEmpty(nativeRegion)); -} - -__inline__ Status Region::MakeInfinite() -{ - return updateStatus(DllExports::GdipSetInfinite(nativeRegion)); -} - -__inline__ Status Region::Transform(const Matrix *matrix) -{ - return updateStatus(DllExports::GdipTransformRegion( - nativeRegion, matrix ? matrix->nativeMatrix : NULL)); -} - -__inline__ Status Region::Translate(REAL dx, REAL dy) -{ - return updateStatus(DllExports::GdipTranslateRegion( - nativeRegion, dx, dy)); -} - -__inline__ Status Region::Translate(INT dx, INT dy) -{ - return updateStatus(DllExports::GdipTranslateRegionI( - nativeRegion, dx, dy)); -} - -__inline__ Status Region::Union(const RectF& rect) -{ - return updateStatus(DllExports::GdipCombineRegionRect( - nativeRegion, &rect, CombineModeUnion)); -} - -__inline__ Status Region::Union(const Rect& rect) -{ - return updateStatus(DllExports::GdipCombineRegionRectI( - nativeRegion, &rect, CombineModeUnion)); -} - -__inline__ Status Region::Union(const Region *region) -{ - return updateStatus(DllExports::GdipCombineRegionRegion( - nativeRegion, region ? region->nativeRegion : NULL, - CombineModeUnion)); -} - -__inline__ Status Region::Union(const GraphicsPath *path) -{ - return updateStatus(DllExports::GdipCombineRegionPath( - nativeRegion, path ? path->nativePath : NULL, - CombineModeUnion)); -} - -__inline__ Status Region::Xor(const RectF& rect) -{ - return updateStatus(DllExports::GdipCombineRegionRect( - nativeRegion, &rect, CombineModeXor)); -} - -__inline__ Status Region::Xor(const Rect& rect) -{ - return updateStatus(DllExports::GdipCombineRegionRectI( - nativeRegion, &rect, CombineModeXor)); -} - -__inline__ Status Region::Xor(const Region *region) -{ - return updateStatus(DllExports::GdipCombineRegionRegion( - nativeRegion, region ? region->nativeRegion : NULL, - CombineModeXor)); -} - -__inline__ Status Region::Xor(const GraphicsPath *path) -{ - return updateStatus(DllExports::GdipCombineRegionPath( - nativeRegion, path ? path->nativePath : NULL, - CombineModeXor)); -} - - -// GraphicsPath - -__inline__ BOOL GraphicsPath::IsOutlineVisible(REAL x, REAL y, const Pen *pen, - const Graphics *g) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsOutlineVisiblePathPoint( - nativePath, x, y, pen ? pen->nativePen : NULL, - g ? g->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ BOOL GraphicsPath::IsOutlineVisible(INT x, INT y, const Pen *pen, - const Graphics *g) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsOutlineVisiblePathPointI( - nativePath, x, y, pen ? pen->nativePen : NULL, - g ? g->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ BOOL GraphicsPath::IsOutlineVisible(const PointF& point, const Pen *pen, - const Graphics *g) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsOutlineVisiblePathPoint( - nativePath, point.X, point.Y, - pen ? pen->nativePen : NULL, - g ? g->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ BOOL GraphicsPath::IsOutlineVisible(const Point& point, const Pen *pen, - const Graphics *g) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsOutlineVisiblePathPointI( - nativePath, point.X, point.Y, - pen ? pen->nativePen : NULL, - g ? g->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ BOOL GraphicsPath::IsVisible(REAL x, REAL y, const Graphics *g) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisiblePathPoint( - nativePath, x, y, - g ? g->nativeGraphics : NULL, &result)); - return result; -} -__inline__ BOOL GraphicsPath::IsVisible(INT x, INT y, const Graphics *g) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisiblePathPointI( - nativePath, x, y, - g ? g->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ BOOL GraphicsPath::IsVisible(const PointF& point, - const Graphics *g) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisiblePathPoint( - nativePath, point.X, point.Y, - g ? g->nativeGraphics : NULL, &result)); - return result; -} - -__inline__ BOOL GraphicsPath::IsVisible(const Point& point, const Graphics *g) const -{ - BOOL result = FALSE; - updateStatus(DllExports::GdipIsVisiblePathPointI( - nativePath, point.X, point.Y, - g ? g->nativeGraphics : NULL, &result)); - return result; -} - - -// PathData - -__inline__ Status PathData::AllocateArrays(INT capacity) -{ - if (capacity < 0) { - return InvalidParameter; - } else if (Count < capacity) { - FreeArrays(); - - PointF *pointArray = (PointF*) - DllExports::GdipAlloc(capacity * sizeof(PointF)); - if (!pointArray) - return OutOfMemory; - - BYTE *typeArray = (BYTE*) - DllExports::GdipAlloc(capacity * sizeof(BYTE)); - if (!typeArray) { - DllExports::GdipFree(pointArray); - return OutOfMemory; - } - - Count = capacity; - Points = pointArray; - Types = typeArray; - } - return Ok; -} - -__inline__ VOID PathData::FreeArrays() -{ - if (Points) DllExports::GdipFree(Points); - if (Types) DllExports::GdipFree(Types); - Count = 0; - Points = NULL; - Types = NULL; -} - -#endif /* __GDIPLUS_IMPL_H */ diff --git a/src/gdiplus4/gdiplusinit.h b/src/gdiplus4/gdiplusinit.h deleted file mode 100644 index e9276a67..00000000 --- a/src/gdiplus4/gdiplusinit.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * gdiplusinit.h - * - * GDI+ Initialization - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_INIT_H -#define __GDIPLUS_INIT_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -typedef struct GdiplusStartupInput { - UINT32 GdiplusVersion; - DebugEventProc DebugEventCallback; - BOOL SuppressBackgroundThread; - BOOL SuppressExternalCodecs; - - #ifdef __cplusplus - GdiplusStartupInput(DebugEventProc debugEventCallback = NULL, - BOOL suppressBackgroundThread = FALSE, - BOOL suppressExternalCodecs = FALSE): - GdiplusVersion(1), - DebugEventCallback(debugEventCallback), - SuppressBackgroundThread(suppressBackgroundThread), - SuppressExternalCodecs(suppressExternalCodecs) {} - #endif /* __cplusplus */ -} GdiplusStartupInput; - -typedef GpStatus WINGDIPAPI (*NotificationHookProc)(ULONG_PTR *token); -typedef VOID WINGDIPAPI (*NotificationUnhookProc)(ULONG_PTR token); - -typedef struct GdiplusStartupOutput { - NotificationHookProc NotificationHook; - NotificationUnhookProc NotificationUnhook; - - #ifdef __cplusplus - GdiplusStartupOutput(): - NotificationHook(NULL), - NotificationUnhook(NULL) {} - #endif /* __cplusplus */ -} GdiplusStartupOutput; - -#ifdef __cplusplus -extern "C" { -#endif - -GpStatus WINGDIPAPI GdiplusStartup(ULONG_PTR*,GDIPCONST GdiplusStartupInput*,GdiplusStartupOutput*); -VOID WINGDIPAPI GdiplusShutdown(ULONG_PTR); -GpStatus WINGDIPAPI GdiplusNotificationHook(ULONG_PTR*); -VOID WINGDIPAPI GdiplusNotificationUnhook(ULONG_PTR); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* __GDIPLUS_INIT_H */ diff --git a/src/gdiplus4/gdipluslinecaps.h b/src/gdiplus4/gdipluslinecaps.h deleted file mode 100644 index 3134ede4..00000000 --- a/src/gdiplus4/gdipluslinecaps.h +++ /dev/null @@ -1,131 +0,0 @@ -/* - * gdipluslinecaps.h - * - * GDI+ AdjustableArrowCap class - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_LINECAPS_H -#define __GDIPLUS_LINECAPS_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#ifndef __cplusplus -#error "A C++ compiler is required to include gdipluslinecaps.h." -#endif - -class AdjustableArrowCap: public CustomLineCap -{ -public: - AdjustableArrowCap(REAL height, REAL width, BOOL isFilled): - CustomLineCap(NULL, Ok) - { - GpAdjustableArrowCap *nativeAdjustableArrowCap = NULL; - lastStatus = DllExports::GdipCreateAdjustableArrowCap( - height, width, isFilled, - &nativeAdjustableArrowCap); - nativeCustomLineCap = nativeAdjustableArrowCap; - } - virtual ~AdjustableArrowCap() - { - } - virtual AdjustableArrowCap* Clone() const - { - GpCustomLineCap *cloneCustomLineCap = NULL; - Status status = updateStatus(DllExports::GdipCloneCustomLineCap( - nativeCustomLineCap, &cloneCustomLineCap)); - if (status == Ok) { - AdjustableArrowCap *result = new AdjustableArrowCap( - cloneCustomLineCap, lastStatus); - if (!result) { - DllExports::GdipDeleteCustomLineCap( - cloneCustomLineCap); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } - } - - REAL GetHeight() const - { - REAL result = 0.0f; - updateStatus(DllExports::GdipGetAdjustableArrowCapHeight( - (GpAdjustableArrowCap*) nativeCustomLineCap, - &result)); - return result; - } - REAL GetMiddleInset() const - { - REAL result = 0.0f; - updateStatus(DllExports::GdipGetAdjustableArrowCapMiddleInset( - (GpAdjustableArrowCap*) nativeCustomLineCap, - &result)); - return result; - } - REAL GetWidth() const - { - REAL result = 0.0f; - updateStatus(DllExports::GdipGetAdjustableArrowCapWidth( - (GpAdjustableArrowCap*) nativeCustomLineCap, - &result)); - return result; - } - BOOL IsFilled() const - { - BOOL result = FALSE; - updateStatus(DllExports::GdipGetAdjustableArrowCapFillState( - (GpAdjustableArrowCap*) nativeCustomLineCap, - &result)); - return result; - } - Status SetFillState(BOOL isFilled) - { - return updateStatus(DllExports::GdipSetAdjustableArrowCapFillState( - (GpAdjustableArrowCap*) nativeCustomLineCap, - isFilled)); - } - Status SetHeight(REAL height) - { - return updateStatus(DllExports::GdipSetAdjustableArrowCapHeight( - (GpAdjustableArrowCap*) nativeCustomLineCap, - height)); - } - Status SetMiddleInset(REAL middleInset) - { - return updateStatus(DllExports::GdipSetAdjustableArrowCapMiddleInset( - (GpAdjustableArrowCap*) nativeCustomLineCap, - middleInset)); - } - Status SetWidth(REAL width) - { - return updateStatus(DllExports::GdipSetAdjustableArrowCapWidth( - (GpAdjustableArrowCap*) nativeCustomLineCap, - width)); - } - -private: - AdjustableArrowCap(GpCustomLineCap *customLineCap, Status status): - CustomLineCap(customLineCap, status) {} - AdjustableArrowCap(const AdjustableArrowCap&); - AdjustableArrowCap& operator=(const AdjustableArrowCap&); -}; - -#endif /* __GDIPLUS_LINECAPS_H */ diff --git a/src/gdiplus4/gdiplusmatrix.h b/src/gdiplus4/gdiplusmatrix.h deleted file mode 100644 index 7eb10649..00000000 --- a/src/gdiplus4/gdiplusmatrix.h +++ /dev/null @@ -1,240 +0,0 @@ -/* - * gdiplusmatrix.h - * - * GDI+ Matrix class - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_MATRIX_H -#define __GDIPLUS_MATRIX_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#ifndef __cplusplus -#error "A C++ compiler is required to include gdiplusmatrix.h." -#endif - -#define GDIP_MATRIX_PI \ - 3.1415926535897932384626433832795028841971693993751058209749445923078164 - -class Matrix: public GdiplusBase -{ - friend class Graphics; - friend class GraphicsPath; - friend class LinearGradientBrush; - friend class PathGradientBrush; - friend class Pen; - friend class Region; - friend class TextureBrush; - -public: - Matrix(): nativeMatrix(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipCreateMatrix(&nativeMatrix); - } - Matrix(REAL m11, REAL m12, REAL m21, REAL m22, REAL dx, REAL dy): - nativeMatrix(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipCreateMatrix2( - m11, m12, m21, m22, dx, dy, - &nativeMatrix); - } - Matrix(const RectF& rect, const PointF *dstplg): - nativeMatrix(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipCreateMatrix3( - &rect, dstplg, &nativeMatrix); - } - Matrix(const Rect& rect, const Point *dstplg): - nativeMatrix(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipCreateMatrix3I( - &rect, dstplg, &nativeMatrix); - } - ~Matrix() - { - DllExports::GdipDeleteMatrix(nativeMatrix); - } - Matrix* Clone() const - { - GpMatrix *cloneMatrix = NULL; - Status status = updateStatus(DllExports::GdipCloneMatrix( - nativeMatrix, &cloneMatrix)); - if (status == Ok) { - Matrix *result = new Matrix(cloneMatrix, lastStatus); - if (!result) { - DllExports::GdipDeleteMatrix(cloneMatrix); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } - } - - BOOL Equals(const Matrix *matrix) const - { - BOOL result; - updateStatus(DllExports::GdipIsMatrixEqual( - nativeMatrix, - matrix ? matrix->nativeMatrix : NULL, &result)); - return result; - } - Status GetElements(REAL *m) const - { - return updateStatus(DllExports::GdipGetMatrixElements( - nativeMatrix, m)); - } - Status GetLastStatus() const - { - Status result = lastStatus; - lastStatus = Ok; - return result; - } - Status Invert() - { - return updateStatus(DllExports::GdipInvertMatrix(nativeMatrix)); - } - BOOL IsIdentity() const - { - BOOL result; - updateStatus(DllExports::GdipIsMatrixIdentity( - nativeMatrix, &result)); - return result; - } - BOOL IsInvertible() const - { - BOOL result; - updateStatus(DllExports::GdipIsMatrixInvertible( - nativeMatrix, &result)); - return result; - } - Status Multiply(const Matrix *matrix, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipMultiplyMatrix( - nativeMatrix, - matrix ? matrix->nativeMatrix : NULL, order)); - } - REAL OffsetX() const - { - REAL m[6]; - updateStatus(DllExports::GdipGetMatrixElements(nativeMatrix, m)); - return m[4]; - } - REAL OffsetY() const - { - REAL m[6]; - updateStatus(DllExports::GdipGetMatrixElements(nativeMatrix, m)); - return m[5]; - } - Status Reset() - { - return updateStatus(DllExports::GdipSetMatrixElements( - nativeMatrix, - 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f)); - } - Status Rotate(REAL angle, MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipRotateMatrix( - nativeMatrix, angle, order)); - } - Status RotateAt(REAL angle, const PointF& center, - MatrixOrder order = MatrixOrderPrepend) - { - REAL angleRadian = angle * GDIP_MATRIX_PI / 180.0f; - REAL cosAngle = ::cos(angleRadian); - REAL sinAngle = ::sin(angleRadian); - REAL x = center.X; - REAL y = center.Y; - - Matrix matrix2(cosAngle, sinAngle, -sinAngle, cosAngle, - x * (1.0f-cosAngle) + y * sinAngle, - -x * sinAngle + y * (1.0f-cosAngle)); - Status status = matrix2.GetLastStatus(); - if (status == Ok) { - return Multiply(&matrix2, order); - } else { - return lastStatus = status; - } - } - Status Scale(REAL scaleX, REAL scaleY, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipScaleMatrix( - nativeMatrix, scaleX, scaleY, order)); - } - Status SetElements(REAL m11, REAL m12, REAL m21, REAL m22, - REAL dx, REAL dy) - { - return updateStatus(DllExports::GdipSetMatrixElements( - nativeMatrix, m11, m12, m21, m22, dx, dy)); - } - Status Shear(REAL shearX, REAL shearY, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipShearMatrix( - nativeMatrix, shearX, shearY, order)); - } - Status TransformPoints(PointF *pts, INT count = 1) const - { - return updateStatus(DllExports::GdipTransformMatrixPoints( - nativeMatrix, pts, count)); - } - Status TransformPoints(Point *pts, INT count = 1) const - { - return updateStatus(DllExports::GdipTransformMatrixPointsI( - nativeMatrix, pts, count)); - } - Status TransformVectors(PointF *pts, INT count = 1) const - { - return updateStatus(DllExports::GdipVectorTransformMatrixPoints( - nativeMatrix, pts, count)); - } - Status TransformVectors(Point *pts, INT count = 1) const - { - return updateStatus(DllExports::GdipVectorTransformMatrixPointsI( - nativeMatrix, pts, count)); - } - Status Translate(REAL offsetX, REAL offsetY, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipTranslateMatrix( - nativeMatrix, offsetX, offsetY, order)); - } - -private: - Matrix(GpMatrix *matrix, Status status): - nativeMatrix(matrix), lastStatus(status) {} - Matrix(const Matrix&); - Matrix& operator=(const Matrix&); - - Status updateStatus(Status newStatus) const - { - if (newStatus != Ok) lastStatus = newStatus; - return newStatus; - } - - GpMatrix *nativeMatrix; - mutable Status lastStatus; -}; - -#undef GDIP_MATRIX_PI - -#endif /* __GDIPLUS_MATRIX_H */ diff --git a/src/gdiplus4/gdiplusmem.h b/src/gdiplus4/gdiplusmem.h deleted file mode 100644 index 51bb420c..00000000 --- a/src/gdiplus4/gdiplusmem.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * gdiplusmem.h - * - * GDI+ memory allocation - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_MEM_H -#define __GDIPLUS_MEM_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#ifdef __cplusplus -namespace DllExports { -extern "C" { -#endif - -VOID* WINGDIPAPI GdipAlloc(size_t); -VOID WINGDIPAPI GdipFree(VOID*); - -#ifdef __cplusplus -} /* extern "C" */ -} /* namespace DllExports */ -#endif - -#endif /* __GDIPLUS_MEM_H */ diff --git a/src/gdiplus4/gdiplusmetafile.h b/src/gdiplus4/gdiplusmetafile.h deleted file mode 100644 index f19fb14e..00000000 --- a/src/gdiplus4/gdiplusmetafile.h +++ /dev/null @@ -1,305 +0,0 @@ -/* - * gdiplusmetafile.h - * - * GDI+ Metafile class - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_METAFILE_H -#define __GDIPLUS_METAFILE_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#ifndef __cplusplus -#error "A C++ compiler is required to include gdiplusmetafile.h." -#endif - -class Metafile: public Image -{ -public: - static UINT EmfToWmfBits(HENHMETAFILE hEmf, - UINT cbData16, LPBYTE pData16, - INT iMapMode = MM_ANISOTROPIC, - EmfToWmfBitsFlags eFlags = EmfToWmfBitsFlagsDefault) - { - return DllExports::GdipEmfToWmfBits(hEmf, - cbData16, pData16, iMapMode, eFlags); - } - static Status GetMetafileHeader(const WCHAR *filename, - MetafileHeader *header) - { - return DllExports::GdipGetMetafileHeaderFromFile( - filename, header); - } - static Status GetMetafileHeader(IStream *stream, MetafileHeader *header) - { - return DllExports::GdipGetMetafileHeaderFromStream( - stream, header); - } - ////TODO: Metafile::GetMetafileHeader - //static Status GetMetafileHeader(HMETAFILE hWmf, - // const WmfPlaceableFileHeader *wmfPlaceableFileHeader, - // MetafileHeader *header) - //{ - // // WTF: No flat API to do this. - // return NotImplemented; - //} - static Status GetMetafileHeader(HENHMETAFILE hEmf, - MetafileHeader *header) - { - return DllExports::GdipGetMetafileHeaderFromEmf(hEmf, header); - } - - Metafile(HMETAFILE hWmf, - const WmfPlaceableFileHeader *wmfPlaceableFileHeader, - BOOL deleteWmf = FALSE): Image(NULL, Ok) - { - GpMetafile *nativeMetafile = NULL; - lastStatus = DllExports::GdipCreateMetafileFromWmf( - hWmf, deleteWmf, wmfPlaceableFileHeader, - &nativeMetafile); - nativeImage = nativeMetafile; - } - Metafile(HENHMETAFILE hEmf, BOOL deleteEmf = FALSE): Image(NULL, Ok) - { - GpMetafile *nativeMetafile = NULL; - lastStatus = DllExports::GdipCreateMetafileFromEmf( - hEmf, deleteEmf, &nativeMetafile); - nativeImage = nativeMetafile; - } - Metafile(const WCHAR *filename): Image(NULL, Ok) - { - GpMetafile *nativeMetafile = NULL; - lastStatus = DllExports::GdipCreateMetafileFromFile( - filename, &nativeMetafile); - nativeImage = nativeMetafile; - } - Metafile(const WCHAR *filename, - const WmfPlaceableFileHeader *wmfPlaceableFileHeader): - Image(NULL, Ok) - { - GpMetafile *nativeMetafile = NULL; - lastStatus = DllExports::GdipCreateMetafileFromWmfFile( - filename, wmfPlaceableFileHeader, - &nativeMetafile); - nativeImage = nativeMetafile; - } - Metafile(IStream *stream): Image(NULL, Ok) - { - GpMetafile *nativeMetafile = NULL; - lastStatus = DllExports::GdipCreateMetafileFromStream( - stream, &nativeMetafile); - nativeImage = nativeMetafile; - } - Metafile(HDC referenceHdc, EmfType type = EmfTypeEmfPlusDual, - const WCHAR *description = NULL): Image(NULL, Ok) - { - GpMetafile *nativeMetafile = NULL; - lastStatus = DllExports::GdipRecordMetafile( - referenceHdc, type, NULL, MetafileFrameUnitGdi, - description, &nativeMetafile); - nativeImage = nativeMetafile; - } - Metafile(HDC referenceHdc, const RectF& frameRect, - MetafileFrameUnit frameUnit = MetafileFrameUnitGdi, - EmfType type = EmfTypeEmfPlusDual, - const WCHAR *description = NULL): Image(NULL, Ok) - { - GpMetafile *nativeMetafile = NULL; - lastStatus = DllExports::GdipRecordMetafile( - referenceHdc, type, &frameRect, frameUnit, - description, &nativeMetafile); - nativeImage = nativeMetafile; - } - Metafile(HDC referenceHdc, const Rect& frameRect, - MetafileFrameUnit frameUnit = MetafileFrameUnitGdi, - EmfType type = EmfTypeEmfPlusDual, - const WCHAR *description = NULL): Image(NULL, Ok) - { - GpMetafile *nativeMetafile = NULL; - lastStatus = DllExports::GdipRecordMetafileI( - referenceHdc, type, &frameRect, frameUnit, - description, &nativeMetafile); - nativeImage = nativeMetafile; - } - Metafile(const WCHAR *filename, HDC referenceHdc, - EmfType type = EmfTypeEmfPlusDual, - const WCHAR *description = NULL): Image(NULL, Ok) - { - GpMetafile *nativeMetafile = NULL; - lastStatus = DllExports::GdipRecordMetafileFileName( - filename, referenceHdc, type, NULL, - MetafileFrameUnitGdi, description, - &nativeMetafile); - nativeImage = nativeMetafile; - } - Metafile(const WCHAR *filename, HDC referenceHdc, - const RectF& frameRect, - MetafileFrameUnit frameUnit = MetafileFrameUnitGdi, - EmfType type = EmfTypeEmfPlusDual, - const WCHAR *description = NULL): Image(NULL, Ok) - { - GpMetafile *nativeMetafile = NULL; - lastStatus = DllExports::GdipRecordMetafileFileName( - filename, referenceHdc, type, &frameRect, - frameUnit, description, &nativeMetafile); - nativeImage = nativeMetafile; - } - Metafile(const WCHAR *filename, HDC referenceHdc, - const Rect& frameRect, - MetafileFrameUnit frameUnit = MetafileFrameUnitGdi, - EmfType type = EmfTypeEmfPlusDual, - const WCHAR *description = NULL): Image(NULL, Ok) - { - GpMetafile *nativeMetafile = NULL; - lastStatus = DllExports::GdipRecordMetafileFileNameI( - filename, referenceHdc, type, &frameRect, - frameUnit, description, &nativeMetafile); - nativeImage = nativeMetafile; - } - Metafile(IStream *stream, HDC referenceHdc, - EmfType type = EmfTypeEmfPlusDual, - const WCHAR *description = NULL): Image(NULL, Ok) - { - GpMetafile *nativeMetafile = NULL; - lastStatus = DllExports::GdipRecordMetafileStream( - stream, referenceHdc, type, NULL, - MetafileFrameUnitGdi, description, - &nativeMetafile); - nativeImage = nativeMetafile; - } - Metafile(IStream *stream, HDC referenceHdc, const RectF& frameRect, - MetafileFrameUnit frameUnit = MetafileFrameUnitGdi, - EmfType type = EmfTypeEmfPlusDual, - const WCHAR *description = NULL): Image(NULL, Ok) - { - GpMetafile *nativeMetafile = NULL; - lastStatus = DllExports::GdipRecordMetafileStream( - stream, referenceHdc, type, &frameRect, - frameUnit, description, &nativeMetafile); - nativeImage = nativeMetafile; - } - Metafile(IStream *stream, HDC referenceHdc, const Rect& frameRect, - MetafileFrameUnit frameUnit = MetafileFrameUnitGdi, - EmfType type = EmfTypeEmfPlusDual, - const WCHAR *description = NULL): Image(NULL, Ok) - { - GpMetafile *nativeMetafile = NULL; - lastStatus = DllExports::GdipRecordMetafileStreamI( - stream, referenceHdc, type, &frameRect, - frameUnit, description, &nativeMetafile); - nativeImage = nativeMetafile; - } - virtual ~Metafile() - { - } - virtual Metafile* Clone() const - { - GpImage *cloneImage = NULL; - Status status = updateStatus(DllExports::GdipCloneImage( - nativeImage, &cloneImage)); - if (status == Ok) { - Metafile *result = new Metafile(cloneImage, lastStatus); - if (!result) { - DllExports::GdipDisposeImage(cloneImage); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } - } - - ////TODO: [GDI+ 1.1] Metafile::ConvertToEmfPlus - //Status ConvertToEmfPlus(const Graphics *refGraphics, - // BOOL *conversionSuccess = NULL, - // EmfType emfType = EmfTypeEmfPlusOnly, - // const WCHAR *description = NULL) - //{ - // // FIXME: can't test GdipConvertToEmfPlus because it isn't exported in 1.0 - // return updateStatus(DllExports::GdipConvertToEmfPlus( - // refGraphics ? refGraphics->nativeGraphics : NULL, - // (GpMetafile*) nativeImage, - // conversionSuccess, emfType, description, ???)); - //} - ////TODO: [GDI+ 1.1] Metafile::ConvertToEmfPlus - //Status ConvertToEmfPlus(const Graphics *refGraphics, - // const WCHAR *filename, - // BOOL *conversionSuccess = NULL, - // EmfType emfType = EmfTypeEmfPlusOnly, - // const WCHAR *description = NULL) - //{ - // // FIXME: can't test GdipConvertToEmfPlusToFile because it isn't exported in 1.0 - // return updateStatus(DllExports::GdipConvertToEmfPlusToFile( - // refGraphics ? refGraphics->nativeGraphics : NULL, - // (GpMetafile*) nativeImage, conversionSuccess, - // filename, emfType, description, ???)); - //} - ////TODO: [GDI+ 1.1] Metafile::ConvertToEmfPlus - //Status ConvertToEmfPlus(const Graphics *refGraphics, - // IStream *stream, - // BOOL *conversionSuccess = NULL, - // EmfType emfType = EmfTypeEmfPlusOnly, - // const WCHAR *description = NULL) - //{ - // // FIXME: can't test GdipConvertToEmfPlusToStream because it isn't exported in 1.0 - // return updateStatus(DllExports::GdipConvertToEmfPlusToStream( - // refGraphics ? refGraphics->nativeGraphics : NULL, - // (GpMetafile*) nativeImage, conversionSuccess, - // stream, emfType, description, ???)); - //} - UINT GetDownLevelRasterizationLimit() const - { - UINT result = 0; - updateStatus(DllExports::GdipGetMetafileDownLevelRasterizationLimit( - (GpMetafile*) nativeImage, &result)); - return result; - } - HENHMETAFILE GetHENHMETAFILE() - { - HENHMETAFILE result = NULL; - updateStatus(DllExports::GdipGetHemfFromMetafile( - (GpMetafile*) nativeImage, &result)); - return result; - } - Status GetMetafileHeader(MetafileHeader *header) const - { - return updateStatus(DllExports::GdipGetMetafileHeaderFromMetafile( - (GpMetafile*) nativeImage, header)); - } - Status PlayRecord(EmfPlusRecordType recordType, UINT flags, - UINT dataSize, const BYTE *data) const - { - return updateStatus(DllExports::GdipPlayMetafileRecord( - (GpMetafile*) nativeImage, - recordType, flags, dataSize, data)); - } - Status SetDownLevelRasterizationLimit(UINT limitDpi) - { - return updateStatus(DllExports::GdipSetMetafileDownLevelRasterizationLimit( - (GpMetafile*) nativeImage, limitDpi)); - } - -private: - Metafile(GpImage *image, Status status): Image(image, status) {} - Metafile(const Metafile&); - Metafile& operator=(const Metafile&); -}; - -#endif /* __GDIPLUS_METAFILE_H */ diff --git a/src/gdiplus4/gdiplusmetaheader.h b/src/gdiplus4/gdiplusmetaheader.h deleted file mode 100644 index 499d7a98..00000000 --- a/src/gdiplus4/gdiplusmetaheader.h +++ /dev/null @@ -1,193 +0,0 @@ -/* - * gdiplusmetaheader.h - * - * GDI+ metafile header structure - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_METAHEADER_H -#define __GDIPLUS_METAHEADER_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - - -/* - * FIXME: is 1 the correct value for GDIP_EMFPLUSFLAGS_DISPLAY? This number - * has been determined by calling Metafile::GetMetafileHeader() on a EMF+ - * metafile which was recorded on a display device context (SampleMetafile.emf). - */ -#ifdef __cplusplus -const UINT GDIP_EMFPLUSFLAGS_DISPLAY = 1; -#else -#define GDIP_EMFPLUSFLAGS_DISPLAY ((UINT) 1) -#endif - -typedef struct tagENHMETAHEADER3 { - DWORD iType; - DWORD nSize; - RECTL rclBounds; - RECTL rclFrame; - DWORD dSignature; - DWORD nVersion; - DWORD nBytes; - DWORD nRecords; - WORD nHandles; - WORD sReserved; - DWORD nDescription; - DWORD offDescription; - DWORD nPalEntries; - SIZEL szlDevice; - SIZEL szlMillimeters; -} ENHMETAHEADER3,*LPENHMETAHEADER3; - -typedef struct PWMFRect16 { - INT16 Left; - INT16 Top; - INT16 Right; - INT16 Bottom; -} PWMFRect16; - -typedef struct WmfPlaceableFileHeader { - UINT32 Key; - INT16 Hmf; - PWMFRect16 BoundingBox; - INT16 Inch; - UINT32 Reserved; - INT16 Checksum; -} WmfPlaceableFileHeader; - -typedef struct MetafileHeader { - MetafileType Type; - UINT Size; - UINT Version; - UINT EmfPlusFlags; - REAL DpiX; - REAL DpiY; - INT X; - INT Y; - INT Width; - INT Height; - __extension__ union { - METAHEADER WmfHeader; - ENHMETAHEADER3 EmfHeader; - }; - INT EmfPlusHeaderSize; - INT LogicalDpiX; - INT LogicalDpiY; - - #ifdef __cplusplus - public: - void GetBounds(Rect *rect) const - { - if (rect) - { - rect->X = X; - rect->Y = Y; - rect->Width = Width; - rect->Height = Height; - } - } - REAL GetDpiX() const - { - return DpiX; - } - REAL GetDpiY() const - { - return DpiY; - } - const ENHMETAHEADER3* GetEmfHeader() const - { - if (Type == MetafileTypeEmf - || Type == MetafileTypeEmfPlusOnly - || Type == MetafileTypeEmfPlusDual) - { - return &EmfHeader; - } - else - { - return NULL; - } - } - UINT GetEmfPlusFlags() const - { - return EmfPlusFlags; - } - UINT GetMetafileSize() const - { - return Size; - } - MetafileType GetType() const - { - return Type; - } - UINT GetVersion() const - { - return Version; - } - const METAHEADER* GetWmfHeader() const - { - if (Type == MetafileTypeWmf || Type == MetafileTypeWmfPlaceable) - { - return &WmfHeader; - } - else - { - return NULL; - } - } - BOOL IsDisplay() const - { - return EmfPlusFlags == GDIP_EMFPLUSFLAGS_DISPLAY; - } - BOOL IsEmf() const - { - return Type == MetafileTypeEmf; - } - BOOL IsEmfOrEmfPlus() const - { - return Type == MetafileTypeEmf - || Type == MetafileTypeEmfPlusOnly - || Type == MetafileTypeEmfPlusDual; - } - BOOL IsEmfPlus() const - { - return Type == MetafileTypeEmfPlusOnly - || Type == MetafileTypeEmfPlusDual; - } - BOOL IsEmfPlusDual() const - { - return Type == MetafileTypeEmfPlusDual; - } - BOOL IsEmfPlusOnly() const - { - return Type == MetafileTypeEmfPlusOnly; - } - BOOL IsWmf() const - { - return Type == MetafileTypeWmf - || Type == MetafileTypeWmfPlaceable; - } - BOOL IsWmfPlaceable() const - { - return Type == MetafileTypeWmfPlaceable; - } - #endif -} MetafileHeader; - -#endif /* __GDIPLUS_METAHEADER_H */ diff --git a/src/gdiplus4/gdipluspath.h b/src/gdiplus4/gdipluspath.h deleted file mode 100644 index 393d917e..00000000 --- a/src/gdiplus4/gdipluspath.h +++ /dev/null @@ -1,964 +0,0 @@ -/* - * gdipluspath.h - * - * GDI+ GraphicsPath class - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_PATH_H -#define __GDIPLUS_PATH_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#ifndef __cplusplus -#error "A C++ compiler is required to include gdipluspath.h." -#endif - -// Note that some methods of GraphicsPath are implemented in gdiplusimpl.h. -// This avoids a cyclic dependency on Graphics and Pen. - -class GraphicsPath: public GdiplusBase -{ - friend class CustomLineCap; - friend class Graphics; - friend class GraphicsPathIterator; - friend class PathGradientBrush; - friend class Region; - -public: - GraphicsPath(FillMode fillMode = FillModeAlternate): - nativePath(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipCreatePath(fillMode, &nativePath); - } - GraphicsPath(const PointF *points, const BYTE *types, INT count, - FillMode fillMode = FillModeAlternate): - nativePath(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipCreatePath2( - points, types, count, fillMode, &nativePath); - } - GraphicsPath(const Point *points, const BYTE *types, INT count, - FillMode fillMode = FillModeAlternate): - nativePath(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipCreatePath2I( - points, types, count, fillMode, &nativePath); - } - ~GraphicsPath() - { - DllExports::GdipDeletePath(nativePath); - } - GraphicsPath* Clone() const - { - GpPath *clonePath = NULL; - Status status = updateStatus(DllExports::GdipClonePath( - nativePath, &clonePath)); - if (status == Ok) { - GraphicsPath *result = new GraphicsPath(clonePath, lastStatus); - if (!result) { - DllExports::GdipDeletePath(clonePath); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } - } - - Status AddArc(REAL x, REAL y, REAL width, REAL height, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipAddPathArc(nativePath, - x, y, width, height, startAngle, sweepAngle)); - } - Status AddArc(INT x, INT y, INT width, INT height, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipAddPathArcI(nativePath, - x, y, width, height, startAngle, sweepAngle)); - } - Status AddArc(const RectF& rect, REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipAddPathArc(nativePath, - rect.X, rect.Y, rect.Width, rect.Height, - startAngle, sweepAngle)); - } - Status AddArc(const Rect& rect, REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipAddPathArcI(nativePath, - rect.X, rect.Y, rect.Width, rect.Height, - startAngle, sweepAngle)); - } - Status AddBezier(REAL x1, REAL y1, REAL x2, REAL y2, - REAL x3, REAL y3, REAL x4, REAL y4) - { - return updateStatus(DllExports::GdipAddPathBezier(nativePath, - x1, y1, x2, y2, x3, y3, x4, y4)); - } - Status AddBezier(INT x1, INT y1, INT x2, INT y2, - INT x3, INT y3, INT x4, INT y4) - { - return updateStatus(DllExports::GdipAddPathBezierI(nativePath, - x1, y1, x2, y2, x3, y3, x4, y4)); - } - Status AddBezier(const PointF& pt1, const PointF& pt2, - const PointF& pt3, const PointF& pt4) - { - return updateStatus(DllExports::GdipAddPathBezier(nativePath, - pt1.X, pt1.Y, pt2.X, pt2.Y, - pt3.X, pt3.Y, pt4.X, pt4.Y)); - } - Status AddBezier(const Point& pt1, const Point& pt2, - const Point& pt3, const Point& pt4) - { - return updateStatus(DllExports::GdipAddPathBezierI(nativePath, - pt1.X, pt1.Y, pt2.X, pt2.Y, - pt3.X, pt3.Y, pt4.X, pt4.Y)); - } - Status AddBeziers(const PointF *points, INT count) - { - return updateStatus(DllExports::GdipAddPathBeziers( - nativePath, points, count)); - } - Status AddBeziers(const Point *points, INT count) - { - return updateStatus(DllExports::GdipAddPathBeziersI( - nativePath, points, count)); - } - Status AddClosedCurve(const PointF *points, INT count) - { - return updateStatus(DllExports::GdipAddPathClosedCurve( - nativePath, points, count)); - } - Status AddClosedCurve(const Point *points, INT count) - { - return updateStatus(DllExports::GdipAddPathClosedCurveI( - nativePath, points, count)); - } - Status AddClosedCurve(const PointF *points, INT count, REAL tension) - { - return updateStatus(DllExports::GdipAddPathClosedCurve2( - nativePath, points, count, tension)); - } - Status AddClosedCurve(const Point *points, INT count, REAL tension) - { - return updateStatus(DllExports::GdipAddPathClosedCurve2I( - nativePath, points, count, tension)); - } - Status AddCurve(const PointF *points, INT count) - { - return updateStatus(DllExports::GdipAddPathCurve( - nativePath, points, count)); - } - Status AddCurve(const Point *points, INT count) - { - return updateStatus(DllExports::GdipAddPathCurveI( - nativePath, points, count)); - } - Status AddCurve(const PointF *points, INT count, REAL tension) - { - return updateStatus(DllExports::GdipAddPathCurve2( - nativePath, points, count, tension)); - } - Status AddCurve(const Point *points, INT count, REAL tension) - { - return updateStatus(DllExports::GdipAddPathCurve2I( - nativePath, points, count, tension)); - } - Status AddCurve(const PointF *points, INT count, INT offset, - INT numberOfSegments, REAL tension) - { - return updateStatus(DllExports::GdipAddPathCurve3( - nativePath, points, count, - offset, numberOfSegments, tension)); - } - Status AddCurve(const Point *points, INT count, INT offset, - INT numberOfSegments, REAL tension) - { - return updateStatus(DllExports::GdipAddPathCurve3I( - nativePath, points, count, - offset, numberOfSegments, tension)); - } - Status AddEllipse(REAL x, REAL y, REAL width, REAL height) - { - return updateStatus(DllExports::GdipAddPathEllipse(nativePath, - x, y, width, height)); - } - Status AddEllipse(INT x, INT y, INT width, INT height) - { - return updateStatus(DllExports::GdipAddPathEllipseI(nativePath, - x, y, width, height)); - } - Status AddEllipse(const RectF& rect) - { - return updateStatus(DllExports::GdipAddPathEllipse(nativePath, - rect.X, rect.Y, rect.Width, rect.Height)); - } - Status AddEllipse(const Rect& rect) - { - return updateStatus(DllExports::GdipAddPathEllipseI(nativePath, - rect.X, rect.Y, rect.Width, rect.Height)); - } - Status AddLine(REAL x1, REAL y1, REAL x2, REAL y2) - { - return updateStatus(DllExports::GdipAddPathLine(nativePath, - x1, y1, x2, y2)); - } - Status AddLine(INT x1, INT y1, INT x2, INT y2) - { - return updateStatus(DllExports::GdipAddPathLineI(nativePath, - x1, y1, x2, y2)); - } - Status AddLine(const PointF& pt1, const PointF& pt2) - { - return updateStatus(DllExports::GdipAddPathLine(nativePath, - pt1.X, pt1.Y, pt2.X, pt2.Y)); - } - Status AddLine(const Point& pt1, const Point& pt2) - { - return updateStatus(DllExports::GdipAddPathLineI(nativePath, - pt1.X, pt1.Y, pt2.X, pt2.Y)); - } - Status AddLines(const PointF *points, INT count) - { - return updateStatus(DllExports::GdipAddPathLine2(nativePath, - points, count)); - } - Status AddLines(const Point *points, INT count) - { - return updateStatus(DllExports::GdipAddPathLine2I(nativePath, - points, count)); - } - Status AddPath(const GraphicsPath *addingPath, BOOL connect) - { - return updateStatus(DllExports::GdipAddPathPath(nativePath, - addingPath ? addingPath->nativePath : NULL, - connect)); - } - Status AddPie(REAL x, REAL y, REAL width, REAL height, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipAddPathPie(nativePath, - x, y, width, height, startAngle, sweepAngle)); - } - Status AddPie(INT x, INT y, INT width, INT height, - REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipAddPathPieI(nativePath, - x, y, width, height, startAngle, sweepAngle)); - } - Status AddPie(const RectF& rect, REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipAddPathPie(nativePath, - rect.X, rect.Y, rect.Width, rect.Height, - startAngle, sweepAngle)); - } - Status AddPie(const Rect& rect, REAL startAngle, REAL sweepAngle) - { - return updateStatus(DllExports::GdipAddPathPieI(nativePath, - rect.X, rect.Y, rect.Width, rect.Height, - startAngle, sweepAngle)); - } - Status AddPolygon(const PointF *points, INT count) - { - return updateStatus(DllExports::GdipAddPathPolygon(nativePath, - points, count)); - } - Status AddPolygon(const Point *points, INT count) - { - return updateStatus(DllExports::GdipAddPathPolygonI(nativePath, - points, count)); - } - Status AddRectangle(const RectF& rect) - { - return updateStatus(DllExports::GdipAddPathRectangle(nativePath, - rect.X, rect.Y, rect.Width, rect.Height)); - } - Status AddRectangle(const Rect& rect) - { - return updateStatus(DllExports::GdipAddPathRectangleI( - nativePath, - rect.X, rect.Y, rect.Width, rect.Height)); - } - Status AddRectangles(const RectF *rects, INT count) - { - return updateStatus(DllExports::GdipAddPathRectangles( - nativePath, rects, count)); - } - Status AddRectangles(const Rect *rects, INT count) - { - return updateStatus(DllExports::GdipAddPathRectanglesI( - nativePath, rects, count)); - } - Status AddString(const WCHAR *string, INT length, - const FontFamily *family, INT style, REAL emSize, - const PointF& origin, const StringFormat *format) - { - RectF layoutRect(origin, SizeF(0.0f, 0.0f)); - return updateStatus(DllExports::GdipAddPathString(nativePath, - string, length, - family ? family->nativeFontFamily : NULL, - style, emSize, &layoutRect, - format ? format->nativeStringFormat : NULL)); - } - Status AddString(const WCHAR *string, INT length, - const FontFamily *family, INT style, REAL emSize, - const Point& origin, const StringFormat *format) - { - Rect layoutRect(origin, Size(0, 0)); - return updateStatus(DllExports::GdipAddPathStringI(nativePath, - string, length, - family ? family->nativeFontFamily : NULL, - style, emSize, &layoutRect, - format ? format->nativeStringFormat : NULL)); - } - Status AddString(const WCHAR *string, INT length, - const FontFamily *family, INT style, REAL emSize, - const RectF& layoutRect, const StringFormat *format) - { - return updateStatus(DllExports::GdipAddPathString(nativePath, - string, length, - family ? family->nativeFontFamily : NULL, - style, emSize, &layoutRect, - format ? format->nativeStringFormat : NULL)); - } - Status AddString(const WCHAR *string, INT length, - const FontFamily *family, INT style, REAL emSize, - const Rect& layoutRect, const StringFormat *format) - { - return updateStatus(DllExports::GdipAddPathStringI(nativePath, - string, length, - family ? family->nativeFontFamily : NULL, - style, emSize, &layoutRect, - format ? format->nativeStringFormat : NULL)); - } - Status ClearMarkers() - { - return updateStatus(DllExports::GdipClearPathMarkers( - nativePath)); - } - Status CloseAllFigures() - { - return updateStatus(DllExports::GdipClosePathFigures( - nativePath)); - } - Status CloseFigure() - { - return updateStatus(DllExports::GdipClosePathFigure( - nativePath)); - } - Status Flatten(const Matrix *matrix = NULL, - REAL flatness = FlatnessDefault) - { - return updateStatus(DllExports::GdipFlattenPath(nativePath, - matrix ? matrix->nativeMatrix : NULL, - flatness)); - } - Status GetBounds(RectF *bounds, const Matrix *matrix = NULL, - const Pen *pen = NULL) const - { - return updateStatus(DllExports::GdipGetPathWorldBounds( - nativePath, bounds, - matrix ? matrix->nativeMatrix : NULL, - pen ? pen->nativePen : NULL)); - } - Status GetBounds(Rect *bounds, const Matrix *matrix = NULL, - const Pen *pen = NULL) const - { - return updateStatus(DllExports::GdipGetPathWorldBoundsI( - nativePath, bounds, - matrix ? matrix->nativeMatrix : NULL, - pen ? pen->nativePen : NULL)); - } - FillMode GetFillMode() const - { - FillMode result = FillModeAlternate; - updateStatus(DllExports::GdipGetPathFillMode(nativePath, - &result)); - return result; - } - Status GetLastPoint(PointF *lastPoint) const - { - return updateStatus(DllExports::GdipGetPathLastPoint( - nativePath, lastPoint)); - } - Status GetLastStatus() const - { - Status result = lastStatus; - lastStatus = Ok; - return result; - } - Status GetPathData(PathData *pathData) const - { - if (!pathData) return lastStatus = InvalidParameter; - - Status status; - INT count; - - status = updateStatus(DllExports::GdipGetPointCount( - nativePath, &count)); - if (status != Ok) return status; - - status = updateStatus(pathData->AllocateArrays(count)); - if (status != Ok) return status; - - return updateStatus(DllExports::GdipGetPathData( - nativePath, (GpPathData*) pathData)); - } - Status GetPathPoints(PointF *points, INT count) const - { - return updateStatus(DllExports::GdipGetPathPoints(nativePath, - points, count)); - } - Status GetPathPoints(Point *points, INT count) const - { - return updateStatus(DllExports::GdipGetPathPointsI(nativePath, - points, count)); - } - Status GetPathTypes(BYTE *types, INT count) const - { - return updateStatus(DllExports::GdipGetPathTypes(nativePath, - types, count)); - } - INT GetPointCount() const - { - INT result = 0; - updateStatus(DllExports::GdipGetPointCount(nativePath, - &result)); - return result; - } - BOOL IsOutlineVisible(REAL x, REAL y, const Pen *pen, - const Graphics *g = NULL) const; - BOOL IsOutlineVisible(INT x, INT y, const Pen *pen, - const Graphics *g = NULL) const; - BOOL IsOutlineVisible(const PointF& point, const Pen *pen, - const Graphics *g = NULL) const; - BOOL IsOutlineVisible(const Point& point, const Pen *pen, - const Graphics *g = NULL) const; - BOOL IsVisible(REAL x, REAL y, const Graphics *g = NULL) const; - BOOL IsVisible(INT x, INT y, const Graphics *g = NULL) const; - BOOL IsVisible(const PointF& point, const Graphics *g = NULL) const; - BOOL IsVisible(const Point& point, const Graphics *g = NULL) const; - Status Outline(const Matrix *matrix = NULL, - REAL flatness = FlatnessDefault) - { - return updateStatus(DllExports::GdipWindingModeOutline( - nativePath, - matrix ? matrix->nativeMatrix : NULL, - flatness)); - } - Status Reset() - { - return updateStatus(DllExports::GdipResetPath(nativePath)); - } - Status Reverse() - { - return updateStatus(DllExports::GdipReversePath(nativePath)); - } - Status SetFillMode(FillMode fillMode) - { - return updateStatus(DllExports::GdipSetPathFillMode( - nativePath, fillMode)); - } - Status SetMarker() - { - return updateStatus(DllExports::GdipSetPathMarker(nativePath)); - } - Status StartFigure() - { - return updateStatus(DllExports::GdipStartPathFigure( - nativePath)); - } - Status Transform(const Matrix *matrix) - { - return updateStatus(DllExports::GdipTransformPath( - nativePath, - matrix ? matrix->nativeMatrix : NULL)); - } - Status Warp(const PointF *destPoints, INT count, const RectF& srcRect, - const Matrix *matrix = NULL, - WarpMode warpMode = WarpModePerspective, - REAL flatness = FlatnessDefault) - { - return updateStatus(DllExports::GdipWarpPath(nativePath, - matrix ? matrix->nativeMatrix : NULL, - destPoints, count, - srcRect.X, srcRect.Y, - srcRect.Width, srcRect.Height, - warpMode, flatness)); - } - Status Widen(const Pen *pen, const Matrix *matrix = NULL, - REAL flatness = FlatnessDefault) - { - return updateStatus(DllExports::GdipWidenPath(nativePath, - pen ? pen->nativePen : NULL, - matrix ? matrix->nativeMatrix : NULL, - flatness)); - } - -private: - GraphicsPath(GpPath *path, Status status): - nativePath(path), lastStatus(status) {} - GraphicsPath(const GraphicsPath&); - GraphicsPath& operator=(const GraphicsPath&); - - Status updateStatus(Status newStatus) const - { - if (newStatus != Ok) lastStatus = newStatus; - return newStatus; - } - - GpPath *nativePath; - mutable Status lastStatus; -}; - -class GraphicsPathIterator: public GdiplusBase -{ -public: - GraphicsPathIterator(GraphicsPath *path): - nativePathIterator(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipCreatePathIter( - &nativePathIterator, - path ? path->nativePath : NULL); - } - ~GraphicsPathIterator() - { - DllExports::GdipDeletePathIter(nativePathIterator); - } - - INT CopyData(PointF *points, BYTE *types, INT startIndex, INT endIndex) - { - INT result = 0; - updateStatus(DllExports::GdipPathIterCopyData( - nativePathIterator, &result, - points, types, startIndex, endIndex)); - return result; - } - INT Enumerate(PointF *points, BYTE *types, INT count) - { - INT result = 0; - updateStatus(DllExports::GdipPathIterEnumerate( - nativePathIterator, &result, - points, types, count)); - return result; - } - INT GetCount() const - { - INT result = 0; - updateStatus(DllExports::GdipPathIterGetCount( - nativePathIterator, &result)); - return result; - } - Status GetLastStatus() const - { - Status result = lastStatus; - lastStatus = Ok; - return result; - } - INT GetSubpathCount() const - { - INT result = 0; - updateStatus(DllExports::GdipPathIterGetSubpathCount( - nativePathIterator, &result)); - return result; - } - BOOL HasCurve() const - { - BOOL result = FALSE; - updateStatus(DllExports::GdipPathIterHasCurve( - nativePathIterator, &result)); - return result; - } - INT NextMarker(INT *startIndex, INT *endIndex) - { - INT result = 0; - updateStatus(DllExports::GdipPathIterNextMarker( - nativePathIterator, &result, - startIndex, endIndex)); - return result; - } - INT NextMarker(GraphicsPath *path) - { - INT result = 0; - updateStatus(DllExports::GdipPathIterNextMarkerPath( - nativePathIterator, &result, - path ? path->nativePath : NULL)); - return result; - } - INT NextPathType(BYTE *pathType, INT *startIndex, INT *endIndex) - { - INT result = 0; - updateStatus(DllExports::GdipPathIterNextPathType( - nativePathIterator, &result, - pathType, startIndex, endIndex)); - return result; - } - INT NextSubpath(INT *startIndex, INT *endIndex, BOOL *isClosed) - { - INT result = 0; - updateStatus(DllExports::GdipPathIterNextSubpath( - nativePathIterator, &result, - startIndex, endIndex, isClosed)); - return result; - } - INT NextSubpath(GraphicsPath *path, BOOL *isClosed) - { - INT result = 0; - updateStatus(DllExports::GdipPathIterNextSubpathPath( - nativePathIterator, &result, - path ? path->nativePath : NULL, isClosed)); - return result; - } - VOID Rewind() - { - updateStatus(DllExports::GdipPathIterRewind( - nativePathIterator)); - } - -private: - GraphicsPathIterator(GpPathIterator *pathIterator, Status status): - nativePathIterator(pathIterator), lastStatus(status) {} - GraphicsPathIterator(const GraphicsPathIterator&); - GraphicsPathIterator& operator=(const GraphicsPathIterator&); - - Status updateStatus(Status newStatus) const - { - if (newStatus != Ok) lastStatus = newStatus; - return newStatus; - } - - GpPathIterator *nativePathIterator; - mutable Status lastStatus; -}; - -class PathGradientBrush: public Brush -{ -public: - PathGradientBrush(const PointF *points, INT count, - WrapMode wrapMode = WrapModeClamp) - { - GpPathGradient *nativePathGradient = NULL; - lastStatus = DllExports::GdipCreatePathGradient( - points, count, wrapMode, &nativePathGradient); - nativeBrush = nativePathGradient; - } - PathGradientBrush(const Point *points, INT count, - WrapMode wrapMode = WrapModeClamp) - { - GpPathGradient *nativePathGradient = NULL; - lastStatus = DllExports::GdipCreatePathGradientI( - points, count, wrapMode, &nativePathGradient); - nativeBrush = nativePathGradient; - } - PathGradientBrush(const GraphicsPath *path) - { - GpPathGradient *nativePathGradient = NULL; - lastStatus = DllExports::GdipCreatePathGradientFromPath( - path ? path->nativePath : NULL, - &nativePathGradient); - nativeBrush = nativePathGradient; - } - virtual PathGradientBrush *Clone() const - { - GpBrush *cloneBrush = NULL; - Status status = updateStatus(DllExports::GdipCloneBrush( - nativeBrush, &cloneBrush)); - if (status == Ok) { - PathGradientBrush *result = - new PathGradientBrush(cloneBrush, lastStatus); - if (!result) { - DllExports::GdipDeleteBrush(cloneBrush); - updateStatus(OutOfMemory); - } - return result; - } else { - return NULL; - } - } - - Status GetBlend(REAL *blendFactors, REAL *blendPositions, - INT count) const - { - return updateStatus(DllExports::GdipGetPathGradientBlend( - (GpPathGradient*) nativeBrush, - blendFactors, blendPositions, count)); - } - INT GetBlendCount() const - { - INT result = 0; - updateStatus(DllExports::GdipGetPathGradientBlendCount( - (GpPathGradient*) nativeBrush, &result)); - return result; - } - Status GetCenterColor(Color *color) const - { - return updateStatus(DllExports::GdipGetPathGradientCenterColor( - (GpPathGradient*) nativeBrush, - color ? &color->Value : NULL)); - } - Status GetCenterPoint(PointF *point) const - { - return updateStatus(DllExports::GdipGetPathGradientCenterPoint( - (GpPathGradient*) nativeBrush, point)); - } - Status GetCenterPoint(Point *point) const - { - return updateStatus(DllExports::GdipGetPathGradientCenterPointI( - (GpPathGradient*) nativeBrush, point)); - } - Status GetFocusScales(REAL *xScale, REAL *yScale) const - { - return updateStatus(DllExports::GdipGetPathGradientFocusScales( - (GpPathGradient*) nativeBrush, xScale, yScale)); - } - BOOL GetGammaCorrection() const - { - BOOL result = FALSE; - updateStatus(DllExports::GdipGetPathGradientGammaCorrection( - (GpPathGradient*) nativeBrush, &result)); - return result; - } - //Status GetGraphicsPath(GraphicsPath *path) const - //{ - // // TODO: implement PathGradientBrush::GetGraphicsPath - // return updateStatus(NotImplemented); - //} - INT GetInterpolationColorCount() const - { - INT result = 0; - updateStatus(DllExports::GdipGetPathGradientPresetBlendCount( - (GpPathGradient*) nativeBrush, &result)); - return result; - } - Status GetInterpolationColors(Color *presetColors, - REAL *blendPositions, INT count) const - { - if (!presetColors || count <= 0) - return lastStatus = InvalidParameter; - - ARGB *presetArgb = - (ARGB*) DllExports::GdipAlloc(count * sizeof(ARGB)); - if (!presetArgb) - return lastStatus = OutOfMemory; - - Status status = updateStatus(DllExports::GdipGetPathGradientPresetBlend( - (GpPathGradient*) nativeBrush, - presetArgb, blendPositions, count)); - for (INT i = 0; i < count; ++i) { - presetColors[i].SetValue(presetArgb[i]); - } - DllExports::GdipFree((void*) presetArgb); - return status; - } - INT GetPointCount() const - { - INT result = 0; - updateStatus(DllExports::GdipGetPathGradientPointCount( - (GpPathGradient*) nativeBrush, &result)); - return result; - } - Status GetRectangle(RectF *rect) const - { - return updateStatus(DllExports::GdipGetPathGradientRect( - (GpPathGradient*) nativeBrush, rect)); - } - Status GetRectangle(Rect *rect) const - { - return updateStatus(DllExports::GdipGetPathGradientRectI( - (GpPathGradient*) nativeBrush, rect)); - } - INT GetSurroundColorCount() const - { - INT result = 0; - updateStatus(DllExports::GdipGetPathGradientSurroundColorCount( - (GpPathGradient*) nativeBrush, &result)); - return result; - } - Status GetSurroundColors(Color *colors, INT *count) - { - if (!colors || !count || *count <= 0) - return lastStatus = InvalidParameter; - - ARGB *colorsArgb = - (ARGB*) DllExports::GdipAlloc(*count * sizeof(ARGB)); - if (!colorsArgb) - return lastStatus = OutOfMemory; - - Status status = updateStatus(DllExports::GdipGetPathGradientSurroundColorsWithCount( - (GpPathGradient*) nativeBrush, - colorsArgb, count)); - for (INT i = 0; i < *count; ++i) { - colors[i].SetValue(colorsArgb[i]); - } - DllExports::GdipFree((void*) colorsArgb); - return status; - } - Status GetTransform(Matrix *matrix) const - { - return updateStatus(DllExports::GdipGetPathGradientTransform( - (GpPathGradient*) nativeBrush, - matrix ? matrix->nativeMatrix : NULL)); - } - WrapMode GetWrapMode() const - { - WrapMode result = WrapModeTile; - updateStatus(DllExports::GdipGetPathGradientWrapMode( - (GpPathGradient*) nativeBrush, &result)); - return result; - } - Status MultiplyTransform(const Matrix *matrix, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipMultiplyPathGradientTransform( - (GpPathGradient*) nativeBrush, - matrix ? matrix->nativeMatrix : NULL, order)); - } - Status ResetTransform() - { - return updateStatus(DllExports::GdipResetPathGradientTransform( - (GpPathGradient*) nativeBrush)); - } - Status RotateTransform(REAL angle, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipRotatePathGradientTransform( - (GpPathGradient*) nativeBrush, angle, order)); - } - Status ScaleTransform(REAL sx, REAL sy, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipScalePathGradientTransform( - (GpPathGradient*) nativeBrush, sx, sy, order)); - } - Status SetBlend(REAL *blendFactors, REAL *blendPositions, INT count) - { - return updateStatus(DllExports::GdipSetPathGradientBlend( - (GpPathGradient*) nativeBrush, - blendFactors, blendPositions, count)); - } - Status SetBlendBellShape(REAL focus, REAL scale = 1.0f) - { - return updateStatus(DllExports::GdipSetPathGradientSigmaBlend( - (GpPathGradient*) nativeBrush, focus, scale)); - } - Status SetBlendTriangularShape(REAL focus, REAL scale = 1.0f) - { - return updateStatus(DllExports::GdipSetPathGradientLinearBlend( - (GpPathGradient*) nativeBrush, focus, scale)); - } - Status SetCenterColor(const Color& color) - { - return updateStatus(DllExports::GdipSetPathGradientCenterColor( - (GpPathGradient*) nativeBrush, - color.GetValue())); - } - Status SetCenterPoint(const PointF& point) - { - return updateStatus(DllExports::GdipSetPathGradientCenterPoint( - (GpPathGradient*) nativeBrush, &point)); - } - Status SetCenterPoint(const Point& point) - { - return updateStatus(DllExports::GdipSetPathGradientCenterPointI( - (GpPathGradient*) nativeBrush, &point)); - } - Status SetFocusScales(REAL xScale, REAL yScale) - { - return updateStatus(DllExports::GdipSetPathGradientFocusScales( - (GpPathGradient*) nativeBrush, xScale, yScale)); - } - Status SetGammaCorrection(BOOL useGammaCorrection) - { - return updateStatus(DllExports::GdipSetPathGradientGammaCorrection( - (GpPathGradient*) nativeBrush, - useGammaCorrection)); - } - //Status SetGraphicsPath(const GraphicsPath *path) - //{ - // // TODO: implement PathGradientBrush::SetGraphicsPath - // return updateStatus(NotImplemented); - //} - Status SetInterpolationColors(const Color *presetColors, - REAL *blendPositions, INT count) - { - if (!presetColors || count <= 0) - return lastStatus = InvalidParameter; - - ARGB *presetArgb = - (ARGB*) DllExports::GdipAlloc(count * sizeof(ARGB)); - if (!presetArgb) - return lastStatus = OutOfMemory; - for (INT i = 0; i < count; ++i) { - presetArgb[i] = presetColors[i].GetValue(); - } - - Status status = updateStatus(DllExports::GdipSetPathGradientPresetBlend( - (GpPathGradient*) nativeBrush, - presetArgb, blendPositions, count)); - DllExports::GdipFree((void*) presetArgb); - return status; - } - Status SetSurroundColors(const Color *colors, INT *count) - { - if (!colors || !count || *count <= 0) - return lastStatus = InvalidParameter; - - ARGB *colorsArgb = - (ARGB*) DllExports::GdipAlloc(*count * sizeof(ARGB)); - if (!colorsArgb) - return lastStatus = OutOfMemory; - for (INT i = 0; i < *count; ++i) { - colorsArgb[i] = colors[i].GetValue(); - } - - Status status = updateStatus(DllExports::GdipSetPathGradientSurroundColorsWithCount( - (GpPathGradient*) nativeBrush, - colorsArgb, count)); - DllExports::GdipFree((void*) colorsArgb); - return status; - } - Status SetTransform(const Matrix *matrix) - { - return updateStatus(DllExports::GdipSetPathGradientTransform( - (GpPathGradient*) nativeBrush, - matrix ? matrix->nativeMatrix : NULL)); - } - Status SetWrapMode(WrapMode wrapMode) - { - return updateStatus(DllExports::GdipSetPathGradientWrapMode( - (GpPathGradient*) nativeBrush, wrapMode)); - } - Status TranslateTransform(REAL dx, REAL dy, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipTranslatePathGradientTransform( - (GpPathGradient*) nativeBrush, dx, dy, order)); - } - -private: - PathGradientBrush(GpBrush *brush, Status status): Brush(brush, status) {} - PathGradientBrush(const PathGradientBrush&); - PathGradientBrush& operator=(const PathGradientBrush&); -}; - - - -#endif /* __GDIPLUS_PATH_H */ diff --git a/src/gdiplus4/gdipluspen.h b/src/gdiplus4/gdipluspen.h deleted file mode 100644 index d7efed68..00000000 --- a/src/gdiplus4/gdipluspen.h +++ /dev/null @@ -1,338 +0,0 @@ -/* - * gdipluspen.h - * - * GDI+ Pen class - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_PEN_H -#define __GDIPLUS_PEN_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#ifndef __cplusplus -#error "A C++ compiler is required to include gdipluspen.h." -#endif - -class Pen: public GdiplusBase -{ - friend class Graphics; - friend class GraphicsPath; - -public: - Pen(const Color& color, REAL width = 1.0f): - nativePen(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipCreatePen1( - color.GetValue(), width, UnitWorld, - &nativePen); - } - Pen(const Brush *brush, REAL width = 1.0f): - nativePen(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipCreatePen2( - brush ? brush->nativeBrush : NULL, - width, UnitWorld, &nativePen); - } - ~Pen() - { - DllExports::GdipDeletePen(nativePen); - } - Pen* Clone() const - { - GpPen *clonePen = NULL; - Status status = updateStatus(DllExports::GdipClonePen( - nativePen, &clonePen)); - if (status == Ok) { - Pen *result = new Pen(clonePen, lastStatus); - if (!result) { - DllExports::GdipDeletePen(clonePen); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } - } - - PenAlignment GetAlignment() const - { - PenAlignment result = PenAlignmentCenter; - updateStatus(DllExports::GdipGetPenMode(nativePen, &result)); - return result; - } - // TODO: implement Pen::GetBrush() - //Brush *GetBrush() const - //{ - // // where is the pen brush allocated (static,member,new,other)? - // // GdipGetPenBrushFill just returns a GpBrush* - // updateStatus(NotImplemented); - // return NULL; - //} - Status GetColor(Color *color) const - { - return updateStatus(DllExports::GdipGetPenColor( - nativePen, color ? &color->Value : NULL)); - } - Status GetCompoundArray(REAL *compoundArray, INT count) const - { - return updateStatus(DllExports::GdipGetPenCompoundArray( - nativePen, compoundArray, count)); - } - INT GetCompoundArrayCount() const - { - INT result = 0; - updateStatus(DllExports::GdipGetPenCompoundCount( - nativePen, &result)); - return result; - } - Status GetCustomEndCap(CustomLineCap *customCap) const - { - if (!customCap) return lastStatus = InvalidParameter; - // FIXME: do we need to call GdipDeleteCustomLineCap first? - return updateStatus(DllExports::GdipGetPenCustomEndCap( - nativePen, &customCap->nativeCustomLineCap)); - } - Status GetCustomStartCap(CustomLineCap *customCap) const - { - if (!customCap) return lastStatus = InvalidParameter; - // FIXME: do we need to call GdipDeleteCustomLineCap first? - return updateStatus(DllExports::GdipGetPenCustomStartCap( - nativePen, &customCap->nativeCustomLineCap)); - } - DashCap GetDashCap() const - { - DashCap result = DashCapFlat; - updateStatus(DllExports::GdipGetPenDashCap197819( - nativePen, &result)); - return result; - } - REAL GetDashOffset() const - { - REAL result = 0.0f; - updateStatus(DllExports::GdipGetPenDashOffset( - nativePen, &result)); - return result; - } - Status GetDashPattern(REAL *dashArray, INT count) const - { - return updateStatus(DllExports::GdipGetPenDashArray( - nativePen, dashArray, count)); - } - INT GetDashPatternCount() const - { - INT result = 0; - updateStatus(DllExports::GdipGetPenDashCount( - nativePen, &result)); - return result; - } - DashStyle GetDashStyle() const - { - DashStyle result = DashStyleSolid; - updateStatus(DllExports::GdipGetPenDashStyle( - nativePen, &result)); - return result; - } - LineCap GetEndCap() const - { - LineCap result = LineCapFlat; - updateStatus(DllExports::GdipGetPenEndCap(nativePen, &result)); - return result; - } - Status GetLastStatus() const - { - Status result = lastStatus; - lastStatus = Ok; - return result; - } - LineJoin GetLineJoin() const - { - LineJoin result = LineJoinMiter; - updateStatus(DllExports::GdipGetPenLineJoin( - nativePen, &result)); - return result; - } - REAL GetMiterLimit() const - { - REAL result = 10.0f; - updateStatus(DllExports::GdipGetPenMiterLimit( - nativePen, &result)); - return result; - } - PenType GetPenType() const - { - PenType result = PenTypeUnknown; - updateStatus(DllExports::GdipGetPenFillType( - nativePen, &result)); - return result; - } - LineCap GetStartCap() const - { - LineCap result = LineCapFlat; - updateStatus(DllExports::GdipGetPenStartCap( - nativePen, &result)); - return result; - } - Status GetTransform(Matrix *matrix) const - { - return updateStatus(DllExports::GdipGetPenTransform( - nativePen, - matrix ? matrix->nativeMatrix : NULL)); - } - REAL GetWidth() const - { - REAL result = 1.0f; - updateStatus(DllExports::GdipGetPenWidth(nativePen, &result)); - return result; - } - Status MultiplyTransform(const Matrix *matrix, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipMultiplyPenTransform( - nativePen, - matrix ? matrix->nativeMatrix : NULL, order)); - } - Status ResetTransform() - { - return updateStatus(DllExports::GdipResetPenTransform( - nativePen)); - } - Status RotateTransform(REAL angle, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipRotatePenTransform( - nativePen, angle, order)); - } - Status ScaleTransform(REAL sx, REAL sy, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipScalePenTransform( - nativePen, sx, sy, order)); - } - Status SetAlignment(PenAlignment penAlignment) - { - return updateStatus(DllExports::GdipSetPenMode( - nativePen, penAlignment)); - } - Status SetBrush(const Brush *brush) - { - return updateStatus(DllExports::GdipSetPenBrushFill( - nativePen, brush ? brush->nativeBrush : NULL)); - } - Status SetColor(const Color& color) - { - return updateStatus(DllExports::GdipSetPenColor( - nativePen, color.GetValue())); - } - Status SetCompoundArray(const REAL *compoundArray, INT count) - { - return updateStatus(DllExports::GdipSetPenCompoundArray( - nativePen, compoundArray, count)); - } - Status SetCustomEndCap(const CustomLineCap *customCap) - { - return updateStatus(DllExports::GdipSetPenCustomEndCap( - nativePen, - customCap ? customCap->nativeCustomLineCap : NULL)); - } - Status SetCustomStartCap(const CustomLineCap *customCap) - { - return updateStatus(DllExports::GdipSetPenCustomStartCap( - nativePen, - customCap ? customCap->nativeCustomLineCap : NULL)); - } - Status SetDashCap(DashCap dashCap) - { - return updateStatus(DllExports::GdipSetPenDashCap197819( - nativePen, dashCap)); - } - Status SetDashOffset(REAL dashOffset) - { - return updateStatus(DllExports::GdipSetPenDashOffset( - nativePen, dashOffset)); - } - Status SetDashPattern(const REAL *dashArray, INT count) - { - return updateStatus(DllExports::GdipSetPenDashArray( - nativePen, dashArray, count)); - } - Status SetDashStyle(DashStyle dashStyle) - { - return updateStatus(DllExports::GdipSetPenDashStyle( - nativePen, dashStyle)); - } - Status SetEndCap(LineCap endCap) - { - return updateStatus(DllExports::GdipSetPenEndCap( - nativePen, endCap)); - } - Status SetLineCap(LineCap startCap, LineCap endCap, DashCap dashCap) - { - return updateStatus(DllExports::GdipSetPenLineCap197819( - nativePen, startCap, endCap, dashCap)); - } - Status SetLineJoin(LineJoin lineJoin) - { - return updateStatus(DllExports::GdipSetPenLineJoin( - nativePen, lineJoin)); - } - Status SetMiterLimit(REAL miterLimit) - { - return updateStatus(DllExports::GdipSetPenMiterLimit( - nativePen, miterLimit)); - } - Status SetStartCap(LineCap startCap) - { - return updateStatus(DllExports::GdipSetPenStartCap( - nativePen, startCap)); - } - Status SetTransform(const Matrix *matrix) - { - return updateStatus(DllExports::GdipSetPenTransform( - nativePen, - matrix ? matrix->nativeMatrix : NULL)); - } - Status SetWidth(REAL width) - { - return updateStatus(DllExports::GdipSetPenWidth( - nativePen, width)); - } - Status TranslateTransform(REAL dx, REAL dy, - MatrixOrder order = MatrixOrderPrepend) - { - return updateStatus(DllExports::GdipTranslatePenTransform( - nativePen, dx, dy, order)); - } - -private: - Pen(GpPen *pen, Status status): nativePen(pen), lastStatus(status) {} - Pen(const Pen& pen); - Pen& operator=(const Pen&); - - Status updateStatus(Status newStatus) const - { - if (newStatus != Ok) lastStatus = newStatus; - return newStatus; - } - - GpPen *nativePen; - mutable Status lastStatus; -}; - -#endif /* __GDIPLUS_PEN_H */ diff --git a/src/gdiplus4/gdipluspixelformats.h b/src/gdiplus4/gdipluspixelformats.h deleted file mode 100644 index ea51cc71..00000000 --- a/src/gdiplus4/gdipluspixelformats.h +++ /dev/null @@ -1,120 +0,0 @@ -/* - * gdipluspixelformats.h - * - * GDI+ pixel formats - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_PIXELFORMATS_H -#define __GDIPLUS_PIXELFORMATS_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -typedef DWORD ARGB; -typedef INT PixelFormat; - -#define PixelFormatIndexed ((INT) 0x00010000) -#define PixelFormatGDI ((INT) 0x00020000) -#define PixelFormatAlpha ((INT) 0x00040000) -#define PixelFormatPAlpha ((INT) 0x00080000) -#define PixelFormatExtended ((INT) 0x00100000) -#define PixelFormatCanonical ((INT) 0x00200000) -#define PixelFormatUndefined ((INT) 0) -#define PixelFormatDontCare ((INT) 0) -#define PixelFormat1bppIndexed ((INT) \ - (1 | (1<<8) | PixelFormatIndexed | PixelFormatGDI)) -#define PixelFormat4bppIndexed ((INT) \ - (2 | (4<<8) | PixelFormatIndexed | PixelFormatGDI)) -#define PixelFormat8bppIndexed ((INT) \ - (3 | (8<<8) | PixelFormatIndexed | PixelFormatGDI)) -#define PixelFormat16bppGrayScale ((INT) \ - (4 | (16<<8) | PixelFormatExtended)) -#define PixelFormat16bppRGB555 ((INT) \ - (5 | (16<<8) | PixelFormatGDI)) -#define PixelFormat16bppRGB565 ((INT) \ - (6 | (16<<8) | PixelFormatGDI)) -#define PixelFormat16bppARGB1555 ((INT) \ - (7 | (16<<8) | PixelFormatAlpha | PixelFormatGDI)) -#define PixelFormat24bppRGB ((INT) \ - (8 | (24<<8) | PixelFormatGDI)) -#define PixelFormat32bppRGB ((INT) \ - (9 | (32<<8) | PixelFormatGDI)) -#define PixelFormat32bppARGB ((INT) \ - (10 | (32<<8) | PixelFormatAlpha | PixelFormatGDI | PixelFormatCanonical)) -#define PixelFormat32bppPARGB ((INT) \ - (11 | (32<<8) | PixelFormatAlpha | PixelFormatPAlpha | PixelFormatGDI)) -#define PixelFormat48bppRGB ((INT) \ - (12 | (48<<8) | PixelFormatExtended)) -#define PixelFormat64bppARGB ((INT) \ - (13 | (64<<8) | PixelFormatAlpha | PixelFormatCanonical | PixelFormatExtended)) -#define PixelFormat64bppPARGB ((INT) \ - (14 | (64<<8) | PixelFormatAlpha | PixelFormatPAlpha | PixelFormatExtended)) -#define PixelFormatMax ((INT) 15) - -typedef enum PaletteFlags { - PaletteFlagsHasAlpha = 1, - PaletteFlagsGrayScale = 2, - PaletteFlagsHalftone = 4 -} PaletteFlags; - -typedef enum PaletteType { - PaletteTypeCustom = 0, - PaletteTypeOptimal = 1, - PaletteTypeFixedBW = 2, - PaletteTypeFixedHalftone8 = 3, - PaletteTypeFixedHalftone27 = 4, - PaletteTypeFixedHalftone64 = 5, - PaletteTypeFixedHalftone125 = 6, - PaletteTypeFixedHalftone216 = 7, - PaletteTypeFixedHalftone252 = 8, - PaletteTypeFixedHalftone256 = 9 -} PaletteType; - -typedef struct ColorPalette { - UINT Flags; - UINT Count; - ARGB Entries[1]; -} ColorPalette; - -static __inline__ UINT GetPixelFormatSize(PixelFormat pixfmt) -{ - return (((UINT) pixfmt) & 0xff00U) >> 8; -} - -static __inline__ BOOL IsAlphaPixelFormat(PixelFormat pixfmt) -{ - return (pixfmt & PixelFormatAlpha) != 0; -} - -static __inline__ BOOL IsCanonicalPixelFormat(PixelFormat pixfmt) -{ - return (pixfmt & PixelFormatCanonical) != 0; -} - -static __inline__ BOOL IsExtendedPixelFormat(PixelFormat pixfmt) -{ - return (pixfmt & PixelFormatExtended) != 0; -} - -static __inline__ BOOL IsIndexedPixelFormat(PixelFormat pixfmt) -{ - return (pixfmt & PixelFormatIndexed) != 0; -} - -#endif /* __GDIPLUS_PIXELFORMATS_H */ diff --git a/src/gdiplus4/gdiplusstringformat.h b/src/gdiplus4/gdiplusstringformat.h deleted file mode 100644 index b95d1c36..00000000 --- a/src/gdiplus4/gdiplusstringformat.h +++ /dev/null @@ -1,251 +0,0 @@ -/* - * gdiplusstringformat.h - * - * GDI+ StringFormat class - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_STRINGFORMAT_H -#define __GDIPLUS_STRINGFORMAT_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#ifndef __cplusplus -#error "A C++ compiler is required to include gdiplusstringformat.h." -#endif - -class StringFormat: public GdiplusBase -{ - friend class Graphics; - friend class GraphicsPath; - -public: - static const StringFormat* GenericDefault(); - static const StringFormat* GenericTypographic(); - - StringFormat(INT formatFlags = 0, LANGID language = LANG_NEUTRAL): - nativeStringFormat(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipCreateStringFormat( - formatFlags, language, &nativeStringFormat); - } - StringFormat(const StringFormat *format): - nativeStringFormat(NULL), lastStatus(Ok) - { - lastStatus = DllExports::GdipCloneStringFormat( - format ? format->nativeStringFormat : NULL, - &nativeStringFormat); - } - ~StringFormat() - { - DllExports::GdipDeleteStringFormat(nativeStringFormat); - } - StringFormat* Clone() const - { - GpStringFormat *cloneStringFormat = NULL; - Status status = updateStatus(DllExports::GdipCloneStringFormat( - nativeStringFormat, &cloneStringFormat)); - if (status == Ok) { - StringFormat *result = new StringFormat( - cloneStringFormat, lastStatus); - if (!result) { - DllExports::GdipDeleteStringFormat(cloneStringFormat); - lastStatus = OutOfMemory; - } - return result; - } else { - return NULL; - } - } - - StringAlignment GetAlignment() const - { - StringAlignment result = StringAlignmentNear; - updateStatus(DllExports::GdipGetStringFormatAlign( - nativeStringFormat, &result)); - return result; - } - LANGID GetDigitSubstitutionLanguage() const - { - LANGID result = 0; - StringDigitSubstitute method; - updateStatus(DllExports::GdipGetStringFormatDigitSubstitution( - nativeStringFormat, &result, &method)); - return result; - } - StringDigitSubstitute GetDigitSubstitutionMethod() const - { - LANGID language; - StringDigitSubstitute result = StringDigitSubstituteUser; - updateStatus(DllExports::GdipGetStringFormatDigitSubstitution( - nativeStringFormat, &language, &result)); - return result; - } - INT GetFormatFlags() const - { - INT result = 0; - updateStatus(DllExports::GdipGetStringFormatFlags( - nativeStringFormat, &result)); - return result; - } - HotkeyPrefix GetHotkeyPrefix() const - { - HotkeyPrefix result = HotkeyPrefixNone; - updateStatus(DllExports::GdipGetStringFormatHotkeyPrefix( - nativeStringFormat, (INT*) &result)); - return result; - } - Status GetLastStatus() const - { - Status result = lastStatus; - lastStatus = Ok; - return result; - } - StringAlignment GetLineAlignment() const - { - StringAlignment result = StringAlignmentNear; - updateStatus(DllExports::GdipGetStringFormatLineAlign( - nativeStringFormat, &result)); - return result; - } - INT GetMeasurableCharacterRangeCount() const - { - INT result = 0; - updateStatus(DllExports::GdipGetStringFormatMeasurableCharacterRangeCount( - nativeStringFormat, &result)); - return result; - } - INT GetTabStopCount() const - { - INT result = 0; - updateStatus(DllExports::GdipGetStringFormatTabStopCount( - nativeStringFormat, &result)); - return result; - } - Status GetTabStops(INT count, REAL *firstTabOffset, REAL *tabStops) - { - return updateStatus(DllExports::GdipGetStringFormatTabStops( - nativeStringFormat, count, - firstTabOffset, tabStops)); - } - StringTrimming GetTrimming() const - { - StringTrimming result = StringTrimmingNone; - updateStatus(DllExports::GdipGetStringFormatTrimming( - nativeStringFormat, &result)); - return result; - } - Status SetAlignment(StringAlignment align) - { - return updateStatus(DllExports::GdipSetStringFormatAlign( - nativeStringFormat, align)); - } - Status SetDigitSubstitution(LANGID language, - StringDigitSubstitute substitute) - { - return updateStatus(DllExports::GdipSetStringFormatDigitSubstitution( - nativeStringFormat, language, substitute)); - } - Status SetFormatFlags(INT flags) - { - return updateStatus(DllExports::GdipSetStringFormatFlags( - nativeStringFormat, flags)); - } - Status SetHotkeyPrefix(HotkeyPrefix hotkeyPrefix) - { - return updateStatus(DllExports::GdipSetStringFormatHotkeyPrefix( - nativeStringFormat, (INT) hotkeyPrefix)); - } - Status SetLineAlignment(StringAlignment align) - { - return updateStatus(DllExports::GdipSetStringFormatLineAlign( - nativeStringFormat, align)); - } - Status SetMeasurableCharacterRanges(INT rangeCount, - const CharacterRange *ranges) - { - return updateStatus(DllExports::GdipSetStringFormatMeasurableCharacterRanges( - nativeStringFormat, rangeCount, ranges)); - } - Status SetTabStops(REAL firstTabOffset, INT count, const REAL *tabStops) - { - return updateStatus(DllExports::GdipSetStringFormatTabStops( - nativeStringFormat, firstTabOffset, - count, tabStops)); - } - Status SetTrimming(StringTrimming trimming) - { - return updateStatus(DllExports::GdipSetStringFormatTrimming( - nativeStringFormat, trimming)); - } - -private: - StringFormat(GpStringFormat *stringFormat, Status status): - nativeStringFormat(stringFormat), lastStatus(status) {} - StringFormat(const StringFormat&); - StringFormat& operator=(const StringFormat&); - - Status updateStatus(Status newStatus) const - { - if (newStatus != Ok) lastStatus = newStatus; - return newStatus; - } - - GpStringFormat *nativeStringFormat; - mutable Status lastStatus; -}; - - -// FIXME: do StringFormat::GenericDefault() et al. need to be thread safe? -// FIXME: maybe put this in gdiplus.c? - -extern "C" void *_GdipStringFormatCachedGenericDefault; -extern "C" void *_GdipStringFormatCachedGenericTypographic; - -__inline__ const StringFormat* StringFormat::GenericDefault() -{ - if (!_GdipStringFormatCachedGenericDefault) { - GpStringFormat *nativeStringFormat = 0; - Status status = DllExports::GdipStringFormatGetGenericDefault( - &nativeStringFormat); - if (status == Ok && nativeStringFormat) { - _GdipStringFormatCachedGenericDefault = (void*) - new StringFormat(nativeStringFormat, Ok); - } - } - return (StringFormat*) _GdipStringFormatCachedGenericDefault; -} - -__inline__ const StringFormat* StringFormat::GenericTypographic() -{ - if (!_GdipStringFormatCachedGenericTypographic) { - GpStringFormat *nativeStringFormat = 0; - Status status = DllExports::GdipStringFormatGetGenericTypographic( - &nativeStringFormat); - if (status == Ok && nativeStringFormat) { - _GdipStringFormatCachedGenericTypographic = (void*) - new StringFormat(nativeStringFormat, Ok); - } - } - return (StringFormat*) _GdipStringFormatCachedGenericTypographic; -} - - - -#endif /* __GDIPLUS_STRINGFORMAT_H */ diff --git a/src/gdiplus4/gdiplustypes.h b/src/gdiplus4/gdiplustypes.h deleted file mode 100644 index 08a42378..00000000 --- a/src/gdiplus4/gdiplustypes.h +++ /dev/null @@ -1,456 +0,0 @@ -/* - * gdiplustypes.h - * - * GDI+ basic type declarations - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Markus Koenig - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __GDIPLUS_TYPES_H -#define __GDIPLUS_TYPES_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#define WINGDIPAPI __stdcall -#define GDIPCONST const - -typedef enum GpStatus { - Ok = 0, - GenericError = 1, - InvalidParameter = 2, - OutOfMemory = 3, - ObjectBusy = 4, - InsufficientBuffer = 5, - NotImplemented = 6, - Win32Error = 7, - WrongState = 8, - Aborted = 9, - FileNotFound = 10, - ValueOverflow = 11, - AccessDenied = 12, - UnknownImageFormat = 13, - FontFamilyNotFound = 14, - FontStyleNotFound = 15, - NotTrueTypeFont = 16, - UnsupportedGdiplusVersion = 17, - GdiplusNotInitialized = 18, - PropertyNotFound = 19, - PropertyNotSupported = 20, - ProfileNotFound = 21 -} GpStatus; - -#ifdef __cplusplus -typedef GpStatus Status; -#endif - -typedef struct Size { - INT Width; - INT Height; - - #ifdef __cplusplus - Size(): Width(0), Height(0) {} - Size(INT width, INT height): Width(width), Height(height) {} - Size(const Size& size): Width(size.Width), Height(size.Height) {} - - BOOL Empty() const { - return Width == 0 && Height == 0; - } - BOOL Equals(const Size& size) const { - return Width == size.Width && Height == size.Height; - } - Size operator+(const Size& size) const { - return Size(Width + size.Width, Height + size.Height); - } - Size operator-(const Size& size) const { - return Size(Width - size.Width, Height - size.Height); - } - #endif /* __cplusplus */ -} Size; - -typedef struct SizeF { - REAL Width; - REAL Height; - - #ifdef __cplusplus - SizeF(): Width(0.0f), Height(0.0f) {} - SizeF(REAL width, REAL height): Width(width), Height(height) {} - SizeF(const SizeF& size): Width(size.Width), Height(size.Height) {} - - BOOL Empty() const { - return Width == 0.0f && Height == 0.0f; - } - BOOL Equals(const SizeF& size) const { - return Width == size.Width && Height == size.Height; - } - SizeF operator+(const SizeF& size) const { - return SizeF(Width + size.Width, Height + size.Height); - } - SizeF operator-(const SizeF& size) const { - return SizeF(Width - size.Width, Height - size.Height); - } - #endif /* __cplusplus */ -} SizeF; - -typedef struct Point { - INT X; - INT Y; - - #ifdef __cplusplus - Point(): X(0), Y(0) {} - Point(INT x, INT y): X(x), Y(y) {} - Point(const Point& point): X(point.X), Y(point.Y) {} - Point(const Size& size): X(size.Width), Y(size.Height) {} - - BOOL Equals(const Point& point) const { - return X == point.X && Y == point.Y; - } - Point operator+(const Point& point) const { - return Point(X + point.X, Y + point.Y); - } - Point operator-(const Point& point) const { - return Point(X - point.X, Y - point.Y); - } - #endif /* __cplusplus */ -} Point; - -typedef struct PointF { - REAL X; - REAL Y; - - #ifdef __cplusplus - PointF(): X(0.0f), Y(0.0f) {} - PointF(REAL x, REAL y): X(x), Y(y) {} - PointF(const PointF& point): X(point.X), Y(point.Y) {} - PointF(const SizeF& size): X(size.Width), Y(size.Height) {} - - BOOL Equals(const PointF& point) const { - return X == point.X && Y == point.Y; - } - PointF operator+(const PointF& point) const { - return PointF(X + point.X, Y + point.Y); - } - PointF operator-(const PointF& point) const { - return PointF(X - point.X, Y - point.Y); - } - #endif /* __cplusplus */ -} PointF; - -typedef struct Rect { - INT X; - INT Y; - INT Width; - INT Height; - - #ifdef __cplusplus - Rect(): X(0), Y(0), Width(0), Height(0) {} - Rect(const Point& location, const Size& size): - X(location.X), Y(location.Y), - Width(size.Width), Height(size.Height) {} - Rect(INT x, INT y, INT width, INT height): - X(x), Y(y), Width(width), Height(height) {} - - Rect* Clone() const { - return new Rect(X, Y, Width, Height); - } - BOOL Contains(INT x, INT y) const { - return X <= x && Y <= y && x < X+Width && y < Y+Height; - } - BOOL Contains(const Point& point) const { - return Contains(point.X, point.Y); - } - BOOL Contains(const Rect& rect) const { - return X <= rect.X && Y <= rect.Y - && rect.X+rect.Width <= X+Width - && rect.Y+rect.Height <= Y+Height; - } - BOOL Equals(const Rect& rect) const { - return X == rect.X && Y == rect.Y - && Width == rect.Width && Height == rect.Height; - } - INT GetBottom() const { - return Y+Height; - } - VOID GetBounds(Rect *rect) const { - if (rect != NULL) { - rect->X = X; - rect->Y = Y; - rect->Width = Width; - rect->Height = Height; - } - } - INT GetLeft() const { - return X; - } - VOID GetLocation(Point *point) const { - if (point != NULL) { - point->X = X; - point->Y = Y; - } - } - INT GetRight() const { - return X+Width; - } - VOID GetSize(Size *size) const { - if (size != NULL) { - size->Width = Width; - size->Height = Height; - } - } - INT GetTop() const { - return Y; - } - BOOL IsEmptyArea() const { - return Width <= 0 || Height <= 0; - } - VOID Inflate(INT dx, INT dy) { - X -= dx; - Y -= dy; - Width += 2*dx; - Height += 2*dy; - } - VOID Inflate(const Point& point) { - Inflate(point.X, point.Y); - } - static BOOL Intersect(Rect& c, const Rect& a, const Rect& b) { - INT intersectLeft = (a.X < b.X) ? b.X : a.X; - INT intersectTop = (a.Y < b.Y) ? b.Y : a.Y; - INT intersectRight = (a.GetRight() < b.GetRight()) - ? a.GetRight() : b.GetRight(); - INT intersectBottom = (a.GetBottom() < b.GetBottom()) - ? a.GetBottom() : b.GetBottom(); - c.X = intersectLeft; - c.Y = intersectTop; - c.Width = intersectRight - intersectLeft; - c.Height = intersectBottom - intersectTop; - return !c.IsEmptyArea(); - } - BOOL Intersect(const Rect& rect) { - return Intersect(*this, *this, rect); - } - BOOL IntersectsWith(const Rect& rc) const { - INT intersectLeft = (X < rc.X) ? rc.X : X; - INT intersectTop = (Y < rc.Y) ? rc.Y : Y; - INT intersectRight = (GetRight() < rc.GetRight()) - ? GetRight() : rc.GetRight(); - INT intersectBottom = (GetBottom() < rc.GetBottom()) - ? GetBottom() : rc.GetBottom(); - return intersectLeft < intersectRight - && intersectTop < intersectBottom; - } - VOID Offset(INT dx, INT dy) { - X += dx; - Y += dy; - } - VOID Offset(const Point& point) { - Offset(point.X, point.Y); - } - static BOOL Union(Rect& c, const Rect& a, const Rect& b) { - INT unionLeft = (a.X < b.X) ? a.X : b.X; - INT unionTop = (a.Y < b.Y) ? a.Y : b.Y; - INT unionRight = (a.GetRight() < b.GetRight()) - ? b.GetRight() : a.GetRight(); - INT unionBottom = (a.GetBottom() < b.GetBottom()) - ? b.GetBottom() : a.GetBottom(); - c.X = unionLeft; - c.Y = unionTop; - c.Width = unionRight - unionLeft; - c.Height = unionBottom - unionTop; - return !c.IsEmptyArea(); - } - #endif /* __cplusplus */ -} Rect; - -typedef struct RectF { - REAL X; - REAL Y; - REAL Width; - REAL Height; - - #ifdef __cplusplus - RectF(): X(0.0f), Y(0.0f), Width(0.0f), Height(0.0f) {} - RectF(const PointF& location, const SizeF& size): - X(location.X), Y(location.Y), - Width(size.Width), Height(size.Height) {} - RectF(REAL x, REAL y, REAL width, REAL height): - X(x), Y(y), Width(width), Height(height) {} - - RectF* Clone() const { - return new RectF(X, Y, Width, Height); - } - BOOL Contains(REAL x, REAL y) const { - return X <= x && Y <= y && x < X+Width && y < Y+Height; - } - BOOL Contains(const PointF& point) const { - return Contains(point.X, point.Y); - } - BOOL Contains(const RectF& rect) const { - return X <= rect.X && Y <= rect.Y - && rect.X+rect.Width <= X+Width - && rect.Y+rect.Height <= Y+Height; - } - BOOL Equals(const RectF& rect) const { - return X == rect.X && Y == rect.Y - && Width == rect.Width && Height == rect.Height; - } - REAL GetBottom() const { - return Y+Height; - } - VOID GetBounds(RectF *rect) const { - if (rect != NULL) { - rect->X = X; - rect->Y = Y; - rect->Width = Width; - rect->Height = Height; - } - } - REAL GetLeft() const { - return X; - } - VOID GetLocation(PointF *point) const { - if (point != NULL) { - point->X = X; - point->Y = Y; - } - } - REAL GetRight() const { - return X+Width; - } - VOID GetSize(SizeF *size) const { - if (size != NULL) { - size->Width = Width; - size->Height = Height; - } - } - REAL GetTop() const { - return Y; - } - BOOL IsEmptyArea() const { - return Width <= 0.0f || Height <= 0.0f; - } - VOID Inflate(REAL dx, REAL dy) { - X -= dx; - Y -= dy; - Width += 2*dx; - Height += 2*dy; - } - VOID Inflate(const PointF& point) { - Inflate(point.X, point.Y); - } - static BOOL Intersect(RectF& c, const RectF& a, const RectF& b) { - INT intersectLeft = (a.X < b.X) ? b.X : a.X; - INT intersectTop = (a.Y < b.Y) ? b.Y : a.Y; - INT intersectRight = (a.GetRight() < b.GetRight()) - ? a.GetRight() : b.GetRight(); - INT intersectBottom = (a.GetBottom() < b.GetBottom()) - ? a.GetBottom() : b.GetBottom(); - c.X = intersectLeft; - c.Y = intersectTop; - c.Width = intersectRight - intersectLeft; - c.Height = intersectBottom - intersectTop; - return !c.IsEmptyArea(); - } - BOOL Intersect(const RectF& rect) { - return Intersect(*this, *this, rect); - } - BOOL IntersectsWith(const RectF& rc) const { - INT intersectLeft = (X < rc.X) ? rc.X : X; - INT intersectTop = (Y < rc.Y) ? rc.Y : Y; - INT intersectRight = (GetRight() < rc.GetRight()) - ? GetRight() : rc.GetRight(); - INT intersectBottom = (GetBottom() < rc.GetBottom()) - ? GetBottom() : rc.GetBottom(); - return intersectLeft < intersectRight - && intersectTop < intersectBottom; - } - VOID Offset(REAL dx, REAL dy) { - X += dx; - Y += dy; - } - VOID Offset(const PointF& point) { - Offset(point.X, point.Y); - } - static BOOL Union(RectF& c, const RectF& a, const RectF& b) { - INT unionLeft = (a.X < b.X) ? a.X : b.X; - INT unionTop = (a.Y < b.Y) ? a.Y : b.Y; - INT unionRight = (a.GetRight() < b.GetRight()) - ? b.GetRight() : a.GetRight(); - INT unionBottom = (a.GetBottom() < b.GetBottom()) - ? b.GetBottom() : a.GetBottom(); - c.X = unionLeft; - c.Y = unionTop; - c.Width = unionRight - unionLeft; - c.Height = unionBottom - unionTop; - return !c.IsEmptyArea(); - } - #endif /* __cplusplus */ -} RectF; - -/* FIXME: Are descendants of this class, when compiled with g++, - binary compatible with MSVC++ code (especially GDIPLUS.DLL of course)? */ -#ifdef __cplusplus -struct GdiplusAbort { - virtual HRESULT __stdcall Abort(void) {} -}; -#else -typedef struct GdiplusAbort GdiplusAbort; /* incomplete type */ -#endif - -typedef struct CharacterRange { - INT First; - INT Length; - - #ifdef __cplusplus - CharacterRange(): First(0), Length(0) {} - CharacterRange(INT first, INT length): First(first), Length(length) {} - CharacterRange& operator=(const CharacterRange& rhs) { - /* This gracefully handles self-assignment */ - First = rhs.First; - Length = rhs.Length; - return *this; - } - #endif /* __cplusplus */ -} CharacterRange; - -typedef struct PathData { - INT Count; - PointF *Points; - BYTE *Types; - - #ifdef __cplusplus - friend class GraphicsPath; - - PathData(): Count(0), Points(NULL), Types(NULL) {} - ~PathData() { - FreeArrays(); - } -private: - /* used by GraphicsPath::GetPathData, defined in gdipluspath.h */ - Status AllocateArrays(INT capacity); - VOID FreeArrays(); - #endif /* __cplusplus */ -} PathData; - -/* Callback function types */ -/* FIXME: need a correct definition for these function pointer types */ -typedef void *DebugEventProc; -typedef BOOL CALLBACK (*EnumerateMetafileProc)(EmfPlusRecordType,UINT,UINT,const BYTE*,VOID*); -typedef void *DrawImageAbort; -typedef void *GetThumbnailImageAbort; - - -#endif /* __GDIPLUS_TYPES_H */ diff --git a/src/includes/GdiPlus.h b/src/includes/GdiPlus.h deleted file mode 100644 index 75eb5094..00000000 --- a/src/includes/GdiPlus.h +++ /dev/null @@ -1,156 +0,0 @@ -/**************************************************************************\ -* -* Copyright (c) 1998-2000, Microsoft Corp. All Rights Reserved. -* -* Module Name: -* -* Gdiplus.h -* -* Abstract: -* -* GDI+ Native C++ public header file -* -\**************************************************************************/ - -#ifndef _GDIPLUS_H -#define _GDIPLUS_H - -struct IDirectDrawSurface7; - -typedef signed short INT16; -typedef unsigned short UINT16; - -#ifndef DCR_REMOVE_INTERNAL - -#ifndef DCR_USE_NEW_105760 - #define DCR_USE_NEW_105760 -#endif -#ifndef DCR_USE_NEW_127084 - #define DCR_USE_NEW_127084 -#endif -#ifndef DCR_USE_NEW_135429 - #define DCR_USE_NEW_135429 -#endif -#ifndef DCR_USE_NEW_140782 - #define DCR_USE_NEW_140782 -#endif -#ifndef DCR_USE_NEW_140855 - #define DCR_USE_NEW_140855 -#endif -#ifndef DCR_USE_NEW_140857 - #define DCR_USE_NEW_140857 -#endif -#ifndef DCR_USE_NEW_140861 - #define DCR_USE_NEW_140861 -#endif -#ifndef DCR_USE_NEW_145135 - #define DCR_USE_NEW_145135 -#endif -#ifndef DCR_USE_NEW_145138 - #define DCR_USE_NEW_145138 -#endif -#ifndef DCR_USE_NEW_145139 - #define DCR_USE_NEW_145139 -#endif -#ifndef DCR_USE_NEW_145804 - #define DCR_USE_NEW_145804 -#endif -#ifndef DCR_USE_NEW_146933 - #define DCR_USE_NEW_146933 -#endif -#ifndef DCR_USE_NEW_152154 - #define DCR_USE_NEW_152154 -#endif -#ifndef DCR_USE_NEW_175866 - #define DCR_USE_NEW_175866 -#endif - -#ifndef DCR_USE_NEW_188922 - #define DCR_USE_NEW_188922 -#endif -#ifndef DCR_USE_NEW_137252 - #define DCR_USE_NEW_137252 -#endif -#ifndef DCR_USE_NEW_202903 - #define DCR_USE_NEW_202903 -#endif -#ifndef DCR_USE_NEW_197819 - #define DCR_USE_NEW_197819 -#endif -#ifndef DCR_USE_NEW_186091 - #define DCR_USE_NEW_186091 -#endif -#ifndef DCR_USE_NEW_125467 - #define DCR_USE_NEW_125467 -#endif -#ifndef DCR_USE_NEW_168772 - #define DCR_USE_NEW_168772 -#endif -#ifndef DCR_USE_NEW_186764 - #define DCR_USE_NEW_186764 -#endif -#ifndef DCR_USE_NEW_174340 - #define DCR_USE_NEW_174340 -#endif -#ifndef DCR_USE_NEW_186151 - #define DCR_USE_NEW_186151 -#endif - -#ifndef DCR_USE_NEW_235072 - #define DCR_USE_NEW_235072 -#endif - -#endif // DCR_REMOVE_INTERNAL - -namespace Gdiplus -{ - namespace DllExports - { - #include "GdiplusMem.h" - }; - - #include "GdiplusBase.h" - - // The following headers are used internally as well - #include "GdiplusEnums.h" - #include "GdiplusTypes.h" - #include "GdiplusInit.h" - #include "GdiplusPixelFormats.h" - #include "GdiplusColor.h" - #include "GdiplusMetaHeader.h" - #include "GdiplusImaging.h" - #include "GdiplusColorMatrix.h" - - // The rest of these are used only by the application - - #include "GdiplusGpStubs.h" - #include "GdiplusHeaders.h" - - namespace DllExports - { - #include "GdiplusFlat.h" - }; - - - #include "GdiplusImageAttributes.h" - #include "GdiplusMatrix.h" - #include "GdiplusBrush.h" - #include "GdiplusPen.h" - #include "GdiplusStringFormat.h" - #include "GdiplusPath.h" - #include "GdiplusLineCaps.h" - #include "GdiplusMetafile.h" - #include "GdiplusGraphics.h" - #include "GdiplusCachedBitmap.h" - #include "GdiplusRegion.h" - #include "GdiplusFontCollection.h" - #include "GdiplusFontFamily.h" - #include "GdiplusFont.h" - #include "GdiplusBitmap.h" - #include "GdiplusImageCodec.h" - -}; // namespace Gdiplus - - - -#endif // !_GDIPLUS_HPP diff --git a/src/includes/GdiPlusBase.h b/src/includes/GdiPlusBase.h deleted file mode 100644 index 59f7cc2f..00000000 --- a/src/includes/GdiPlusBase.h +++ /dev/null @@ -1,40 +0,0 @@ -/**************************************************************************\ -* -* Copyright (c) 1998-2000, Microsoft Corp. All Rights Reserved. -* -* Module Name: -* -* GdiplusBase.h -* -* Abstract: -* -* Represents the base class for GDIPlus memory allocation. -* -\**************************************************************************/ - -#ifndef _GDIPLUSBASE_H -#define _GDIPLUSBASE_H - -class GdiplusBase -{ -public: - void (operator delete)(void* in_pVoid) - { - DllExports::GdipFree(in_pVoid); - } - void* (operator new)(size_t in_size) - { - return DllExports::GdipAlloc(in_size); - } - void (operator delete[])(void* in_pVoid) - { - DllExports::GdipFree(in_pVoid); - } - void* (operator new[])(size_t in_size) - { - return DllExports::GdipAlloc(in_size); - } -}; - -#endif - diff --git a/src/includes/GdiPlusBitmap.h b/src/includes/GdiPlusBitmap.h deleted file mode 100644 index 16d66bda..00000000 --- a/src/includes/GdiPlusBitmap.h +++ /dev/null @@ -1,1004 +0,0 @@ -/**************************************************************************\ -* -* Copyright (c) 1998-2000, Microsoft Corp. All Rights Reserved. -* -* Module Name: -* -* GdiplusBitmap.h -* -* Abstract: -* -* Bitmap related declarations -* -\**************************************************************************/ - -#ifndef _GDIPLUSBITMAP_H -#define _GDIPLUSBITMAP_H - -// NOTE: -// Our current choice for the public API is to use constructors -// instead of static load functions to create image objects. -// -// I've kept the static load functions here for now so that -// existing test programs are not broken. But they should -// eventually be taken out. - -#ifndef DCR_USE_NEW_140782 - -inline -Image::Image( - IN const WCHAR* filename - ) -{ - nativeImage = NULL; - lastResult = DllExports::GdipLoadImageFromFile(filename, &nativeImage); -} - -inline -Image::Image( - IN IStream* stream - ) -{ - nativeImage = NULL; - lastResult = DllExports::GdipLoadImageFromStream(stream, &nativeImage); -} - -inline Image* -Image::FromFile( - IN const WCHAR* filename - ) -{ - return new Image(filename); -} - -inline Image* -Image::FromStream( - IN IStream* stream - ) -{ - return new Image(stream); -} - -#else - -inline -Image::Image( - IN const WCHAR* filename, - IN BOOL useEmbeddedColorManagement - ) -{ - nativeImage = NULL; - if(useEmbeddedColorManagement) - { - lastResult = DllExports::GdipLoadImageFromFileICM( - filename, - &nativeImage - ); - } - else - { - lastResult = DllExports::GdipLoadImageFromFile( - filename, - &nativeImage - ); - } -} - -inline -Image::Image( - IN IStream* stream, - IN BOOL useEmbeddedColorManagement - ) -{ - nativeImage = NULL; - if(useEmbeddedColorManagement) - { - lastResult = DllExports::GdipLoadImageFromStreamICM( - stream, - &nativeImage - ); - } - else - { - lastResult = DllExports::GdipLoadImageFromStream( - stream, - &nativeImage - ); - } -} - -inline Image* -Image::FromFile( - IN const WCHAR* filename, - IN BOOL useEmbeddedColorManagement - ) -{ - return new Image( - filename, - useEmbeddedColorManagement - ); -} - -inline Image* -Image::FromStream( - IN IStream* stream, - IN BOOL useEmbeddedColorManagement - ) -{ - return new Image( - stream, - useEmbeddedColorManagement - ); -} - -#endif - -inline -Image::~Image() -{ - DllExports::GdipDisposeImage(nativeImage); -} - -inline Image* -Image::Clone() -{ - GpImage *cloneimage = NULL; - - SetStatus(DllExports::GdipCloneImage(nativeImage, &cloneimage)); - - return new Image(cloneimage, lastResult); -} - -// Encorder Parameter - -inline UINT -Image::GetEncoderParameterListSize( - IN const CLSID* clsidEncoder - ) -{ - UINT size = 0; - - SetStatus(DllExports::GdipGetEncoderParameterListSize(nativeImage, - clsidEncoder, - &size)); - return size; -} - -inline Status -Image::GetEncoderParameterList( - IN const CLSID* clsidEncoder, - IN UINT size, - OUT EncoderParameters* buffer - ) -{ - return SetStatus(DllExports::GdipGetEncoderParameterList(nativeImage, - clsidEncoder, - size, - buffer)); -} - -// Save images - -inline Status -Image::Save( - IN const WCHAR* filename, - IN const CLSID* clsidEncoder, - IN const EncoderParameters *encoderParams - ) -{ - return SetStatus(DllExports::GdipSaveImageToFile(nativeImage, - filename, - clsidEncoder, - encoderParams)); -} - -inline Status -Image::Save( - IN IStream* stream, - IN const CLSID* clsidEncoder, - IN const EncoderParameters *encoderParams - ) -{ - return SetStatus(DllExports::GdipSaveImageToStream(nativeImage, - stream, - clsidEncoder, - encoderParams)); -} - -inline Status -Image::SaveAdd( - IN const EncoderParameters *encoderParams - ) -{ - return SetStatus(DllExports::GdipSaveAdd(nativeImage, - encoderParams)); -} - -inline Status -Image::SaveAdd( - IN Image* newImage, - IN const EncoderParameters *encoderParams - ) -{ - if ( newImage == NULL ) - { - return SetStatus(InvalidParameter); - } - - return SetStatus(DllExports::GdipSaveAddImage(nativeImage, - newImage->nativeImage, - encoderParams)); -} - -// Get size and type information -inline ImageType -Image::GetType() const -{ - ImageType type = ImageTypeUnknown; - - SetStatus(DllExports::GdipGetImageType(nativeImage, &type)); - - return type; -} - -inline Status -Image::GetPhysicalDimension( - OUT SizeF* size - ) -{ - if (size == NULL) - { - return SetStatus(InvalidParameter); - } - - REAL width, height; - Status status; - - status = SetStatus(DllExports::GdipGetImageDimension(nativeImage, - &width, &height)); - - size->Width = width; - size->Height = height; - - return status; -} - -inline Status -Image::GetBounds( - OUT RectF *srcRect, - OUT Unit *srcUnit - ) -{ - return SetStatus(DllExports::GdipGetImageBounds(nativeImage, - srcRect, srcUnit)); -} - -inline UINT -Image::GetWidth() -{ - UINT width = 0; - - SetStatus(DllExports::GdipGetImageWidth(nativeImage, &width)); - - return width; -} - -inline UINT -Image::GetHeight() -{ - UINT height = 0; - - SetStatus(DllExports::GdipGetImageHeight(nativeImage, &height)); - - return height; -} - -inline REAL -Image::GetHorizontalResolution() -{ - REAL resolution = 0.0f; - - SetStatus(DllExports::GdipGetImageHorizontalResolution(nativeImage, &resolution)); - - return resolution; -} - -inline REAL -Image::GetVerticalResolution() -{ - REAL resolution = 0.0f; - - SetStatus(DllExports::GdipGetImageVerticalResolution(nativeImage, &resolution)); - - return resolution; -} - -inline UINT -Image::GetFlags() -{ - UINT flags = 0; - - SetStatus(DllExports::GdipGetImageFlags(nativeImage, &flags)); - - return flags; -} - -inline Status -Image::GetRawFormat(OUT GUID *format) -{ - return SetStatus(DllExports::GdipGetImageRawFormat(nativeImage, format)); -} - -inline PixelFormat -Image::GetPixelFormat() -{ - PixelFormat format; - - SetStatus(DllExports::GdipGetImagePixelFormat(nativeImage, &format)); - - return format; -} - -inline INT -Image::GetPaletteSize() -{ - INT size = 0; - - SetStatus(DllExports::GdipGetImagePaletteSize(nativeImage, &size)); - - return size; -} - -inline Status -Image::GetPalette( - OUT ColorPalette *palette, - IN INT size -) -{ - return SetStatus(DllExports::GdipGetImagePalette(nativeImage, palette, size)); -} - -inline Status -Image::SetPalette( - IN const ColorPalette *palette - ) -{ - return SetStatus(DllExports::GdipSetImagePalette(nativeImage, palette)); -} - -// Thumbnail support - -inline Image* -Image::GetThumbnailImage( - IN UINT thumbWidth, - IN UINT thumbHeight, - IN GetThumbnailImageAbort callback, - IN VOID* callbackData - ) -{ - GpImage *thumbimage = NULL; - - SetStatus(DllExports::GdipGetImageThumbnail(nativeImage, - thumbWidth, thumbHeight, - &thumbimage, - callback, callbackData)); - - Image *newImage = new Image(thumbimage, lastResult); - - if (newImage == NULL) - { - DllExports::GdipDisposeImage(thumbimage); - } - - return newImage; -} - -// Multi-frame support -inline UINT -Image::GetFrameDimensionsCount() -{ - UINT count = 0; - - SetStatus(DllExports::GdipImageGetFrameDimensionsCount(nativeImage, - &count)); - - return count; -} - -inline Status -Image::GetFrameDimensionsList( - OUT GUID* dimensionIDs, - IN UINT count - ) -{ - return SetStatus(DllExports::GdipImageGetFrameDimensionsList(nativeImage, - dimensionIDs, - count)); -} - -inline UINT -Image::GetFrameCount( - IN const GUID* dimensionID - ) -{ - UINT count = 0; - - SetStatus(DllExports::GdipImageGetFrameCount(nativeImage, - dimensionID, - &count)); - return count; -} - -inline Status -Image::SelectActiveFrame( - IN const GUID *dimensionID, - IN UINT frameIndex - ) -{ - return SetStatus(DllExports::GdipImageSelectActiveFrame(nativeImage, - dimensionID, - frameIndex)); -} - -inline Status -Image::RotateFlip( - IN RotateFlipType rotateFlipType - ) -{ - return SetStatus(DllExports::GdipImageRotateFlip(nativeImage, - rotateFlipType)); -} - -// Image property related functions - -inline UINT -Image::GetPropertyCount() -{ - UINT numProperty = 0; - - SetStatus(DllExports::GdipGetPropertyCount(nativeImage, - &numProperty)); - - return numProperty; -} - -inline Status -Image::GetPropertyIdList( - IN UINT numOfProperty, - OUT PROPID* list - ) -{ - return SetStatus(DllExports::GdipGetPropertyIdList(nativeImage, - numOfProperty, list)); -} - -inline UINT -Image::GetPropertyItemSize( - IN PROPID propId - ) -{ - UINT size = 0; - - SetStatus(DllExports::GdipGetPropertyItemSize(nativeImage, - propId, - &size)); - - return size; -} - -inline Status -Image::GetPropertyItem( - IN PROPID propId, - IN UINT propSize, - OUT PropertyItem* buffer - ) -{ - return SetStatus(DllExports::GdipGetPropertyItem(nativeImage, - propId, propSize, buffer)); -} - -inline Status -Image::GetPropertySize( - OUT UINT* totalBufferSize, - OUT UINT* numProperties - ) -{ - return SetStatus(DllExports::GdipGetPropertySize(nativeImage, - totalBufferSize, - numProperties)); -} - -inline Status -Image::GetAllPropertyItems( - IN UINT totalBufferSize, - IN UINT numProperties, - OUT PropertyItem* allItems - ) -{ - if (allItems == NULL) - { - return SetStatus(InvalidParameter); - } - return SetStatus(DllExports::GdipGetAllPropertyItems(nativeImage, - totalBufferSize, - numProperties, - allItems)); -} - -inline Status -Image::RemovePropertyItem( - IN PROPID propId - ) -{ - return SetStatus(DllExports::GdipRemovePropertyItem(nativeImage, propId)); -} - -inline Status -Image::SetPropertyItem( - IN const PropertyItem* item - ) -{ - return SetStatus(DllExports::GdipSetPropertyItem(nativeImage, item)); -} - -// Get/SetLayout -// Support for Middle East localization (right-to-left mirroring) - -inline ImageLayout -Image::GetLayout() const -{ - ImageLayout layout; - - SetStatus(DllExports::GdipGetImageLayout(nativeImage, &layout)); - - return layout; -} - -inline Status -Image::SetLayout(IN const ImageLayout layout) -{ - return SetStatus( - DllExports::GdipSetImageLayout(nativeImage, layout) - ); -} - -inline Status -Image::GetLastStatus() const -{ - Status lastStatus = lastResult; - lastResult = Ok; - - return lastStatus; -} - -inline -Image::Image(GpImage *nativeImage, Status status) -{ - SetNativeImage(nativeImage); - lastResult = status; -} - -inline VOID -Image::SetNativeImage(GpImage *nativeImage) -{ - this->nativeImage = nativeImage; -} - -inline -Bitmap::Bitmap( - IN const WCHAR *filename, - IN BOOL useEmbeddedColorManagement - ) -{ - GpBitmap *bitmap = NULL; - - if(useEmbeddedColorManagement) - { - lastResult = DllExports::GdipCreateBitmapFromFileICM(filename, &bitmap); - } - else - { - lastResult = DllExports::GdipCreateBitmapFromFile(filename, &bitmap); - } - - SetNativeImage(bitmap); -} - -inline -Bitmap::Bitmap( - IN IStream *stream, - IN BOOL useEmbeddedColorManagement - ) -{ - GpBitmap *bitmap = NULL; - - if(useEmbeddedColorManagement) - { - lastResult = DllExports::GdipCreateBitmapFromStreamICM(stream, &bitmap); - } - else - { - lastResult = DllExports::GdipCreateBitmapFromStream(stream, &bitmap); - } - - SetNativeImage(bitmap); -} - -inline -Bitmap::Bitmap( - IN INT width, - IN INT height, - IN INT stride, - IN PixelFormat format, - IN BYTE *scan0 - ) -{ - GpBitmap *bitmap = NULL; - - lastResult = DllExports::GdipCreateBitmapFromScan0(width, - height, - stride, - format, - scan0, - &bitmap); - - SetNativeImage(bitmap); -} - -inline -Bitmap::Bitmap( - IN INT width, - IN INT height, - IN PixelFormat format - ) -{ - GpBitmap *bitmap = NULL; - - lastResult = DllExports::GdipCreateBitmapFromScan0(width, - height, - 0, - format, - NULL, - &bitmap); - - SetNativeImage(bitmap); -} - -inline -Bitmap::Bitmap( - IN INT width, - IN INT height, - IN Graphics* target) -{ - GpBitmap *bitmap = NULL; - - lastResult = DllExports::GdipCreateBitmapFromGraphics(width, - height, - target->nativeGraphics, - &bitmap); - - SetNativeImage(bitmap); -} - -inline -Bitmap::Bitmap( - IN IDirectDrawSurface7 * surface - ) -{ - GpBitmap *bitmap = NULL; - - lastResult = DllExports::GdipCreateBitmapFromDirectDrawSurface(surface, - &bitmap); - - SetNativeImage(bitmap); -} - -inline -Bitmap::Bitmap( - IN const BITMAPINFO* gdiBitmapInfo, - IN VOID* gdiBitmapData - ) -{ - GpBitmap *bitmap = NULL; - - lastResult = DllExports::GdipCreateBitmapFromGdiDib(gdiBitmapInfo, - gdiBitmapData, - &bitmap); - - SetNativeImage(bitmap); -} - -inline -Bitmap::Bitmap( - IN HBITMAP hbm, - IN HPALETTE hpal - ) -{ - GpBitmap *bitmap = NULL; - - lastResult = DllExports::GdipCreateBitmapFromHBITMAP(hbm, hpal, &bitmap); - - SetNativeImage(bitmap); -} - -inline -Bitmap::Bitmap( - IN HICON hicon - ) -{ - GpBitmap *bitmap = NULL; - - lastResult = DllExports::GdipCreateBitmapFromHICON(hicon, &bitmap); - - SetNativeImage(bitmap); -} - -inline -Bitmap::Bitmap( - IN HINSTANCE hInstance, - IN const WCHAR *bitmapName - ) -{ - GpBitmap *bitmap = NULL; - - lastResult = DllExports::GdipCreateBitmapFromResource(hInstance, - bitmapName, - &bitmap); - - SetNativeImage(bitmap); -} - - -inline Bitmap* -Bitmap::FromFile( - IN const WCHAR *filename, - IN BOOL useEmbeddedColorManagement - ) -{ - return new Bitmap( - filename, - useEmbeddedColorManagement - ); -} - -inline Bitmap* -Bitmap::FromStream( - IN IStream *stream, - IN BOOL useEmbeddedColorManagement - ) -{ - return new Bitmap( - stream, - useEmbeddedColorManagement - ); -} - -inline Bitmap* -Bitmap::FromDirectDrawSurface7( - IN IDirectDrawSurface7* surface - ) -{ - return new Bitmap(surface); -} - -inline Bitmap* -Bitmap::FromBITMAPINFO( - IN const BITMAPINFO* gdiBitmapInfo, - IN VOID* gdiBitmapData) -{ - return new Bitmap(gdiBitmapInfo, gdiBitmapData); -} - -inline Bitmap* -Bitmap::FromHBITMAP( - IN HBITMAP hbm, - IN HPALETTE hpal - ) -{ - return new Bitmap(hbm, hpal); -} - -inline Bitmap* -Bitmap::FromHICON( - IN HICON hicon - ) -{ - return new Bitmap(hicon); -} - -inline Bitmap* -Bitmap::FromResource( - IN HINSTANCE hInstance, - IN const WCHAR *bitmapName) -{ - return new Bitmap(hInstance, bitmapName); -} - -inline Status -Bitmap::GetHBITMAP( - IN const Color& colorBackground, - OUT HBITMAP* hbmReturn - ) -{ - return SetStatus(DllExports::GdipCreateHBITMAPFromBitmap( - static_cast(nativeImage), - hbmReturn, - colorBackground.GetValue())); -} - -inline Status -Bitmap::GetHICON( - OUT HICON* hiconReturn - ) -{ - return SetStatus(DllExports::GdipCreateHICONFromBitmap( - static_cast(nativeImage), - hiconReturn)); -} - -inline Bitmap* -Bitmap::Clone( - IN const Rect& rect, - IN PixelFormat format - ) -{ - return Clone(rect.X, rect.Y, rect.Width, rect.Height, format); -} - -inline Bitmap* -Bitmap::Clone( - IN INT x, - IN INT y, - IN INT width, - IN INT height, - IN PixelFormat format - ) -{ - GpBitmap* gpdstBitmap = NULL; - Bitmap* bitmap; - - lastResult = DllExports::GdipCloneBitmapAreaI( - x, - y, - width, - height, - format, - (GpBitmap *)nativeImage, - &gpdstBitmap); - - if (lastResult == Ok) - { - bitmap = new Bitmap(gpdstBitmap); - - if (bitmap == NULL) - { - DllExports::GdipDisposeImage(gpdstBitmap); - } - - return bitmap; - } - else - return NULL; -} - -inline Bitmap* -Bitmap::Clone( - IN const RectF& rect, - IN PixelFormat format - ) -{ - return Clone(rect.X, rect.Y, rect.Width, rect.Height, format); -} - -inline Bitmap* -Bitmap::Clone( - IN REAL x, - IN REAL y, - IN REAL width, - IN REAL height, - IN PixelFormat format - ) -{ - GpBitmap* gpdstBitmap = NULL; - Bitmap* bitmap; - - SetStatus(DllExports::GdipCloneBitmapArea( - x, - y, - width, - height, - format, - (GpBitmap *)nativeImage, - &gpdstBitmap)); - - if (lastResult == Ok) - { - bitmap = new Bitmap(gpdstBitmap); - - if (bitmap == NULL) - { - DllExports::GdipDisposeImage(gpdstBitmap); - } - - return bitmap; - } - else - return NULL; -} - -inline Bitmap::Bitmap(GpBitmap *nativeBitmap) -{ - lastResult = Ok; - - SetNativeImage(nativeBitmap); -} - -inline Status -Bitmap::LockBits( - IN const Rect& rect, - IN UINT flags, - IN PixelFormat format, - OUT BitmapData* lockedBitmapData -) -{ - return SetStatus(DllExports::GdipBitmapLockBits( - static_cast(nativeImage), - &rect, - flags, - format, - lockedBitmapData)); -} - -inline Status -Bitmap::UnlockBits( - IN BitmapData* lockedBitmapData - ) -{ - return SetStatus(DllExports::GdipBitmapUnlockBits( - static_cast(nativeImage), - lockedBitmapData)); -} - -inline Status -Bitmap::GetPixel( - IN INT x, - IN INT y, - OUT Color *color) -{ - ARGB argb; - - Status status = SetStatus(DllExports::GdipBitmapGetPixel( - static_cast(nativeImage), - x, y, - &argb)); - - if (status == Ok) - { - color->SetValue(argb); - } - - return status; -} - -inline Status -Bitmap::SetPixel( - IN INT x, - IN INT y, - IN const Color& color) -{ - return SetStatus(DllExports::GdipBitmapSetPixel( - static_cast(nativeImage), - x, y, - color.GetValue())); -} - -inline Status -Bitmap::SetResolution( - IN REAL xdpi, - IN REAL ydpi) -{ - return SetStatus(DllExports::GdipBitmapSetResolution( - static_cast(nativeImage), - xdpi, ydpi)); -} -#endif diff --git a/src/includes/GdiPlusBrush.h b/src/includes/GdiPlusBrush.h deleted file mode 100644 index c25e34ae..00000000 --- a/src/includes/GdiPlusBrush.h +++ /dev/null @@ -1,951 +0,0 @@ -/**************************************************************************\ -* -* Copyright (c) 1998-2000, Microsoft Corp. All Rights Reserved. -* -* Module Name: -* -* GdiplusBrush.h -* -* Abstract: -* -* Brush API related declarations -* -\**************************************************************************/ - -#ifndef _GDIPLUSBRUSH_H -#define _GDIPLUSBRUSH_H - -//-------------------------------------------------------------------------- -// Abstract base class for various brush types -//-------------------------------------------------------------------------- - -class GraphicsPath; - -class Brush : public GdiplusBase -{ -public: - friend class Pen; - friend class Graphics; - - virtual ~Brush() - { - DllExports::GdipDeleteBrush(nativeBrush); - } - - virtual Brush* Clone() const - { - GpBrush *brush = NULL; - - SetStatus(DllExports::GdipCloneBrush(nativeBrush, &brush)); - - Brush *newBrush = new Brush(brush, lastResult); - - if (newBrush == NULL) - { - DllExports::GdipDeleteBrush(brush); - } - - return newBrush; - } - - BrushType GetType() const - { - BrushType type = static_cast(-1); - - SetStatus(DllExports::GdipGetBrushType(nativeBrush, &type)); - - return type; - } - - Status GetLastStatus() const - { - Status lastStatus = lastResult; - lastResult = Ok; - - return lastStatus; - } - -protected: - - Brush() - { - SetStatus(NotImplemented); - } - -#ifdef DCR_USE_NEW_250932 - -private: - Brush(const Brush& brush); - Brush& operator=(const Brush& brush); -protected: - -#else - - Brush(const Brush& brush) - { - brush; - SetStatus(NotImplemented); - } - - Brush& operator=(const Brush& brush) - { - brush; - SetStatus(NotImplemented); - return *this; - } - -#endif - - Brush(GpBrush* nativeBrush, Status status) - { - lastResult = status; - SetNativeBrush(nativeBrush); - } - - VOID SetNativeBrush(GpBrush* nativeBrush) - { - this->nativeBrush = nativeBrush; - } - - Status SetStatus(Status status) const - { - if (status != Ok) - return (lastResult = status); - else - return status; - } - - GpBrush* nativeBrush; - mutable Status lastResult; -}; - -//-------------------------------------------------------------------------- -// Represent solid fill brush object -//-------------------------------------------------------------------------- - -class SolidBrush : public Brush -{ -public: - friend class Pen; - - SolidBrush(IN const Color& color) - { - GpSolidFill *brush = NULL; - - lastResult = DllExports::GdipCreateSolidFill(color.GetValue(), &brush); - - SetNativeBrush(brush); - } - - Status GetColor(OUT Color* color) const - { - ARGB argb; - - if (color == NULL) - { - return SetStatus(InvalidParameter); - } - - SetStatus(DllExports::GdipGetSolidFillColor((GpSolidFill*)nativeBrush, - &argb)); - - *color = Color(argb); - - return lastResult; - } - - Status SetColor(IN const Color& color) - { - return SetStatus(DllExports::GdipSetSolidFillColor((GpSolidFill*)nativeBrush, - color.GetValue())); - } - -#ifdef DCR_USE_NEW_250932 - -private: - SolidBrush(const SolidBrush &); - SolidBrush& operator=(const SolidBrush &); - -#endif - -protected: - - SolidBrush() - { - } -}; - -class TextureBrush : public Brush -{ -public: - friend class Pen; - - TextureBrush(IN Image* image, - IN WrapMode wrapMode = WrapModeTile) - { - GpTexture *texture = NULL; - - lastResult = DllExports::GdipCreateTexture( - image->nativeImage, - wrapMode, &texture); - - SetNativeBrush(texture); - } - - // When creating a texture brush from a metafile image, the dstRect - // is used to specify the size that the metafile image should be - // rendered at in the device units of the destination graphics. - // It is NOT used to crop the metafile image, so only the width - // and height values matter for metafiles. - TextureBrush(IN Image* image, - IN WrapMode wrapMode, - IN const RectF &dstRect) - { - GpTexture *texture = NULL; - - lastResult = DllExports::GdipCreateTexture2( - image->nativeImage, - wrapMode, - dstRect.X, - dstRect.Y, - dstRect.Width, - dstRect.Height, - &texture); - - SetNativeBrush(texture); - } - - // When creating a texture brush from a metafile image, the dstRect - // is used to specify the size that the metafile image should be - // rendered at in the device units of the destination graphics. - // It is NOT used to crop the metafile image, so only the width - // and height values matter for metafiles. - - TextureBrush(IN Image *image, - IN const RectF &dstRect, - IN const ImageAttributes *imageAttributes = NULL) - { - GpTexture *texture = NULL; - - lastResult = DllExports::GdipCreateTextureIA( - image->nativeImage, - (imageAttributes)?imageAttributes->nativeImageAttr:NULL, - dstRect.X, - dstRect.Y, - dstRect.Width, - dstRect.Height, - &texture - ); - - SetNativeBrush(texture); - } - - #ifdef DCR_USE_NEW_145138 - TextureBrush(IN Image *image, - IN const Rect &dstRect, - IN const ImageAttributes *imageAttributes = NULL) - { - GpTexture *texture = NULL; - - lastResult = DllExports::GdipCreateTextureIAI( - image->nativeImage, - (imageAttributes)?imageAttributes->nativeImageAttr:NULL, - dstRect.X, - dstRect.Y, - dstRect.Width, - dstRect.Height, - &texture - ); - - SetNativeBrush(texture); - } - #endif - - // When creating a texture brush from a metafile image, the dstRect - // is used to specify the size that the metafile image should be - // rendered at in the device units of the destination graphics. - // It is NOT used to crop the metafile image, so only the width - // and height values matter for metafiles. - - TextureBrush( - IN Image* image, - IN WrapMode wrapMode, - - #ifdef DCR_USE_NEW_145138 - const IN Rect &dstRect - #else - IN Rect &dstRect - #endif - ) - { - GpTexture *texture = NULL; - - lastResult = DllExports::GdipCreateTexture2I( - image->nativeImage, - wrapMode, - dstRect.X, - dstRect.Y, - dstRect.Width, - dstRect.Height, - &texture); - - SetNativeBrush(texture); - } - - // When creating a texture brush from a metafile image, the dstRect - // is used to specify the size that the metafile image should be - // rendered at in the device units of the destination graphics. - // It is NOT used to crop the metafile image, so only the width - // and height values matter for metafiles. - TextureBrush(IN Image* image, - IN WrapMode wrapMode, - IN REAL dstX, - IN REAL dstY, - IN REAL dstWidth, - IN REAL dstHeight) - { - GpTexture *texture = NULL; - - lastResult = DllExports::GdipCreateTexture2( - image->nativeImage, - wrapMode, - dstX, - dstY, - dstWidth, - dstHeight, - &texture); - - SetNativeBrush(texture); - } - - // When creating a texture brush from a metafile image, the dstRect - // is used to specify the size that the metafile image should be - // rendered at in the device units of the destination graphics. - // It is NOT used to crop the metafile image, so only the width - // and height values matter for metafiles. - TextureBrush(IN Image* image, - IN WrapMode wrapMode, - IN INT dstX, - IN INT dstY, - IN INT dstWidth, - IN INT dstHeight) - { - GpTexture *texture = NULL; - - lastResult = DllExports::GdipCreateTexture2I( - image->nativeImage, - wrapMode, - dstX, - dstY, - dstWidth, - dstHeight, - &texture); - - SetNativeBrush(texture); - } - - /** - * Set/get brush transform - */ - Status SetTransform(IN const Matrix* matrix) - { - return SetStatus(DllExports::GdipSetTextureTransform((GpTexture*)nativeBrush, - matrix->nativeMatrix)); - } - - Status GetTransform(OUT Matrix* matrix) const - { - return SetStatus(DllExports::GdipGetTextureTransform((GpTexture*)nativeBrush, - matrix->nativeMatrix)); - } - - Status ResetTransform() - { - return SetStatus(DllExports::GdipResetTextureTransform((GpTexture*)nativeBrush)); - } - - Status MultiplyTransform(IN const Matrix* matrix, - IN MatrixOrder order = MatrixOrderPrepend) - { - return SetStatus(DllExports::GdipMultiplyTextureTransform((GpTexture*)nativeBrush, - matrix->nativeMatrix, - order)); - } - - Status TranslateTransform(IN REAL dx, - IN REAL dy, - IN MatrixOrder order = MatrixOrderPrepend) - { - return SetStatus(DllExports::GdipTranslateTextureTransform((GpTexture*)nativeBrush, - dx, dy, order)); - } - - Status ScaleTransform(IN REAL sx, - IN REAL sy, - IN MatrixOrder order = MatrixOrderPrepend) - { - return SetStatus(DllExports::GdipScaleTextureTransform((GpTexture*)nativeBrush, - sx, sy, order)); - } - - Status RotateTransform(IN REAL angle, - IN MatrixOrder order = MatrixOrderPrepend) - { - return SetStatus(DllExports::GdipRotateTextureTransform((GpTexture*)nativeBrush, - angle, order)); - } - - /** - * Set/get brush wrapping mode - */ - Status SetWrapMode(IN WrapMode wrapMode) - { - return SetStatus(DllExports::GdipSetTextureWrapMode((GpTexture*)nativeBrush, - wrapMode)); - } - - WrapMode GetWrapMode() const - { - WrapMode wrapMode; - - SetStatus(DllExports::GdipGetTextureWrapMode((GpTexture*)nativeBrush, - &wrapMode)); - return wrapMode; - } - - // Get texture brush attributes - - Image *GetImage() const - { - GpImage *image; - - SetStatus(DllExports::GdipGetTextureImage((GpTexture *)nativeBrush, - &image)); - - Image *retimage = new Image(image, lastResult); - - if (retimage == NULL) - { - DllExports::GdipDisposeImage(image); - } - - return retimage; - } - -#ifdef DCR_USE_NEW_250932 - -private: - TextureBrush(const TextureBrush &); - TextureBrush& operator=(const TextureBrush &); - -#endif - -protected: - - TextureBrush() - { - } -}; - -//-------------------------------------------------------------------------- -// Represent line gradient brush object -//-------------------------------------------------------------------------- - -class LinearGradientBrush : public Brush -{ -public: - friend class Pen; - - LinearGradientBrush(IN const PointF& point1, - IN const PointF& point2, - IN const Color& color1, - IN const Color& color2) - { - GpLineGradient *brush = NULL; - - lastResult = DllExports::GdipCreateLineBrush(&point1, - &point2, - color1.GetValue(), - color2.GetValue(), - WrapModeTile, - &brush); - - SetNativeBrush(brush); - } - - LinearGradientBrush(IN const Point& point1, - IN const Point& point2, - IN const Color& color1, - IN const Color& color2) - { - GpLineGradient *brush = NULL; - - lastResult = DllExports::GdipCreateLineBrushI(&point1, - &point2, - color1.GetValue(), - color2.GetValue(), - WrapModeTile, - &brush); - - SetNativeBrush(brush); - } - - LinearGradientBrush(IN const RectF& rect, - IN const Color& color1, - IN const Color& color2, - IN LinearGradientMode mode) - { - GpLineGradient *brush = NULL; - - lastResult = DllExports::GdipCreateLineBrushFromRect(&rect, - color1.GetValue(), - color2.GetValue(), - mode, - WrapModeTile, - &brush); - - SetNativeBrush(brush); - } - - LinearGradientBrush(IN const Rect& rect, - IN const Color& color1, - IN const Color& color2, - IN LinearGradientMode mode) - { - GpLineGradient *brush = NULL; - - lastResult = DllExports::GdipCreateLineBrushFromRectI(&rect, - color1.GetValue(), - color2.GetValue(), - mode, - WrapModeTile, - &brush); - - SetNativeBrush(brush); - } - - LinearGradientBrush(IN const RectF& rect, - IN const Color& color1, - IN const Color& color2, - IN REAL angle, - IN BOOL isAngleScalable = FALSE) - { - GpLineGradient *brush = NULL; - - lastResult = DllExports::GdipCreateLineBrushFromRectWithAngle(&rect, - color1.GetValue(), - color2.GetValue(), - angle, - isAngleScalable, - WrapModeTile, - &brush); - - SetNativeBrush(brush); - } - - LinearGradientBrush(IN const Rect& rect, - IN const Color& color1, - IN const Color& color2, - IN REAL angle, - IN BOOL isAngleScalable = FALSE) - { - GpLineGradient *brush = NULL; - - lastResult = DllExports::GdipCreateLineBrushFromRectWithAngleI(&rect, - color1.GetValue(), - color2.GetValue(), - angle, - isAngleScalable, - WrapModeTile, - &brush); - - SetNativeBrush(brush); - } - - // Get/set point attributes - - Status SetLinearPoints(IN const PointF& point1, - IN const PointF& point2) - { - return SetStatus(DllExports::GdipSetLinePoints((GpLineGradient*)nativeBrush, - &point1, &point2)); - } - - Status GetLinearPoints(OUT PointF* points) const - { - return SetStatus(DllExports::GdipGetLinePoints((GpLineGradient*) nativeBrush, - points)); - } - - Status SetLinearPoints(IN const Point& point1, - IN const Point& point2) - { - return SetStatus(DllExports::GdipSetLinePointsI((GpLineGradient*)nativeBrush, - &point1, &point2)); - } - - Status GetLinearPoints(OUT Point* points) const - { - return SetStatus(DllExports::GdipGetLinePointsI((GpLineGradient*) nativeBrush, - points)); - } - // Get/set color attributes - - Status SetLinearColors(IN const Color& color1, - IN const Color& color2) - { - return SetStatus(DllExports::GdipSetLineColors((GpLineGradient*)nativeBrush, - color1.GetValue(), - color2.GetValue())); - } - - Status GetLinearColors(OUT Color* colors) const - { - ARGB argb[2]; - - if (colors == NULL) - { - return SetStatus(InvalidParameter); - } - - SetStatus(DllExports::GdipGetLineColors((GpLineGradient*) nativeBrush, argb)); - - if (lastResult == Ok) - { - // use bitwise copy operator for Color copy - colors[0] = Color(argb[0]); - colors[1] = Color(argb[1]); - } - - return lastResult; - } - - Status GetRectangle(OUT RectF* rect) const - { - return SetStatus(DllExports::GdipGetLineRect((GpLineGradient*)nativeBrush, rect)); - } - - // integer version - Status GetRectangle(OUT Rect* rect) const - { - return SetStatus(DllExports::GdipGetLineRectI((GpLineGradient*)nativeBrush, rect)); - } - - // Gamma correction in interporlation. - - Status SetGammaCorrection(IN BOOL useGammaCorrection) - { - return SetStatus(DllExports::GdipSetLineGammaCorrection((GpLineGradient*)nativeBrush, - useGammaCorrection)); - } - - BOOL GetGammaCorrection() const - { - BOOL useGammaCorrection; - - SetStatus(DllExports::GdipGetLineGammaCorrection((GpLineGradient*)nativeBrush, - &useGammaCorrection)); - - return useGammaCorrection; - } - - INT GetBlendCount() const - { - INT count = 0; - - SetStatus(DllExports::GdipGetLineBlendCount((GpLineGradient*) - nativeBrush, - &count)); - - return count; - } - - Status SetBlend(IN const REAL* blendFactors, - IN const REAL* blendPositions, - IN INT count) - { - return SetStatus(DllExports::GdipSetLineBlend((GpLineGradient*) - nativeBrush, - blendFactors, - blendPositions, - count)); - } - - Status GetBlend(OUT REAL* blendFactors, - OUT REAL* blendPositions, - IN INT count) const - { - return SetStatus(DllExports::GdipGetLineBlend((GpLineGradient*)nativeBrush, - blendFactors, - blendPositions, - count)); - } - - INT GetInterpolationColorCount() const - { - INT count = 0; - - SetStatus(DllExports::GdipGetLinePresetBlendCount((GpLineGradient*) - nativeBrush, - &count)); - - return count; - } - - Status SetInterpolationColors(IN const Color* presetColors, - IN const REAL* blendPositions, - IN INT count) - { - if ((count <= 0) || !presetColors) - return SetStatus(InvalidParameter); - - ARGB *argbs = (ARGB*) new BYTE[count*sizeof(ARGB)]; - - if (argbs) - { - for (INT i = 0; i < count; i++) - { - argbs[i] = presetColors[i].GetValue(); - } - - Status status = SetStatus(DllExports::GdipSetLinePresetBlend( - (GpLineGradient*) nativeBrush, - argbs, - blendPositions, - count)); - delete [] argbs; - return status; - } - else - { - return SetStatus(OutOfMemory); - } - } - - Status GetInterpolationColors(OUT Color* presetColors, - OUT REAL* blendPositions, - IN INT count) const - { - if ((count <= 0) || !presetColors) - return SetStatus(InvalidParameter); - - ARGB* argbs = (ARGB*) new BYTE[count*sizeof(ARGB)]; - - if (!argbs) - { - return SetStatus(OutOfMemory); - } - - Status status = SetStatus(DllExports::GdipGetLinePresetBlend((GpLineGradient*)nativeBrush, - argbs, - blendPositions, - count)); - if (status == Ok) - { - for (INT i = 0; i < count; i++) - { - presetColors[i] = Color(argbs[i]); - } - } - - delete [] argbs; - - return status; - } - - Status SetBlendBellShape(IN REAL focus, - IN REAL scale = 1.0) - { - return SetStatus(DllExports::GdipSetLineSigmaBlend((GpLineGradient*)nativeBrush, focus, scale)); - } - - #ifdef DCR_USE_NEW_145135 - Status SetBlendTriangularShape( - IN REAL focus, - IN REAL scale = 1.0 - ) - #else - Status SetBlendTrianglarShape(IN REAL focus, - IN REAL scale = 1.0) - #endif - { - return SetStatus(DllExports::GdipSetLineLinearBlend((GpLineGradient*)nativeBrush, focus, scale)); - } - - /** - * Set/get brush transform - */ - Status SetTransform(IN const Matrix* matrix) - { - return SetStatus(DllExports::GdipSetLineTransform((GpLineGradient*)nativeBrush, - matrix->nativeMatrix)); - } - - Status GetTransform(OUT Matrix *matrix) const - { - return SetStatus(DllExports::GdipGetLineTransform((GpLineGradient*)nativeBrush, - matrix->nativeMatrix)); - } - - Status ResetTransform() - { - return SetStatus(DllExports::GdipResetLineTransform((GpLineGradient*)nativeBrush)); - } - - Status MultiplyTransform(IN const Matrix* matrix, - IN MatrixOrder order = MatrixOrderPrepend) - { - return SetStatus(DllExports::GdipMultiplyLineTransform((GpLineGradient*)nativeBrush, - matrix->nativeMatrix, - order)); - } - - Status TranslateTransform(IN REAL dx, - IN REAL dy, - IN MatrixOrder order = MatrixOrderPrepend) - { - return SetStatus(DllExports::GdipTranslateLineTransform((GpLineGradient*)nativeBrush, - dx, dy, order)); - } - - Status ScaleTransform(IN REAL sx, - IN REAL sy, - IN MatrixOrder order = MatrixOrderPrepend) - { - return SetStatus(DllExports::GdipScaleLineTransform((GpLineGradient*)nativeBrush, - sx, sy, order)); - } - - Status RotateTransform(IN REAL angle, - IN MatrixOrder order = MatrixOrderPrepend) - { - return SetStatus(DllExports::GdipRotateLineTransform((GpLineGradient*)nativeBrush, - angle, order)); - } - - /** - * Set/get brush wrapping mode - */ - Status SetWrapMode(IN WrapMode wrapMode) - { - return SetStatus(DllExports::GdipSetLineWrapMode((GpLineGradient*)nativeBrush, - wrapMode)); - } - - WrapMode GetWrapMode() const - { - WrapMode wrapMode; - - SetStatus(DllExports::GdipGetLineWrapMode((GpLineGradient*) - nativeBrush, - &wrapMode)); - - return wrapMode; - } - -#ifdef DCR_USE_NEW_250932 - -private: - LinearGradientBrush(const LinearGradientBrush &); - LinearGradientBrush& operator=(const LinearGradientBrush &); - -#endif - -protected: - - LinearGradientBrush() - { - } -}; - -//-------------------------------------------------------------------------- -// PathGradientBrush object is defined -// in gdipluspath.h. -//-------------------------------------------------------------------------- - -//-------------------------------------------------------------------------- -// Represent hatch brush object -//-------------------------------------------------------------------------- - -class HatchBrush : public Brush -{ -public: - friend class Pen; - - // Constructors - - HatchBrush(IN HatchStyle hatchStyle, - IN const Color& foreColor, - IN const Color& backColor = Color()) - { - GpHatch *brush = NULL; - - lastResult = DllExports::GdipCreateHatchBrush(hatchStyle, - foreColor.GetValue(), - backColor.GetValue(), - &brush); - SetNativeBrush(brush); - } - - HatchStyle GetHatchStyle() const - { - HatchStyle hatchStyle; - - SetStatus(DllExports::GdipGetHatchStyle((GpHatch*)nativeBrush, - &hatchStyle)); - - return hatchStyle; - } - - Status GetForegroundColor(OUT Color* color) const - { - ARGB argb; - - if (color == NULL) - { - return SetStatus(InvalidParameter); - } - - Status status = SetStatus(DllExports::GdipGetHatchForegroundColor( - (GpHatch*)nativeBrush, - &argb)); - - color->SetValue(argb); - - return status; - } - - Status GetBackgroundColor(OUT Color *color) const - { - ARGB argb; - - if (color == NULL) - { - return SetStatus(InvalidParameter); - } - - Status status = SetStatus(DllExports::GdipGetHatchBackgroundColor( - (GpHatch*)nativeBrush, - &argb)); - - color->SetValue(argb); - - return status; - } - -#ifdef DCR_USE_NEW_250932 - -private: - HatchBrush(const HatchBrush &); - HatchBrush& operator=(const HatchBrush &); - -#endif - -protected: - - HatchBrush() - { - } -}; - -#endif diff --git a/src/includes/GdiPlusCachedBitmap.h b/src/includes/GdiPlusCachedBitmap.h deleted file mode 100644 index 3bafebeb..00000000 --- a/src/includes/GdiPlusCachedBitmap.h +++ /dev/null @@ -1,71 +0,0 @@ -/************************************************************************** -* -* Copyright (c) 2000 Microsoft Corporation -* -* Module Name: -* -* CachedBitmap class definition -* -* Abstract: -* -* CachedBitmap is a representation of an accelerated drawing -* that has restrictions on what operations are allowed in order -* to accelerate the drawing to the destination. -* -**************************************************************************/ - -#ifndef _GDIPLUSCACHEDBITMAP_H -#define _GDIPLUSCACHEDBITMAP_H - -/************************************************************************** -* -* Class Name: -* -* CachedBitmap -* -* Abstract: -* -* An object to store a bitmap prepared for rendering on a particular -* Graphics object. The memory storage for the CachedBitmap is opaque -* to the other Engine code, so the only operations supported are -* initializing the data (with a bitmap) and using the graphics to -* draw it on the screen with an integer offset. -* -* Look for the class definition in GdiplusHeaders.h -* -* Created: -* -* 04/23/2000 asecchia -* Created it. -* -**************************************************************************/ -inline -CachedBitmap::CachedBitmap( - IN Bitmap *bitmap, - IN Graphics *graphics) -{ - nativeCachedBitmap = NULL; - - lastResult = DllExports::GdipCreateCachedBitmap( - (GpBitmap *)bitmap->nativeImage, - graphics->nativeGraphics, - &nativeCachedBitmap - ); -} - -inline -CachedBitmap::~CachedBitmap() -{ - DllExports::GdipDeleteCachedBitmap(nativeCachedBitmap); -} - -inline Status -CachedBitmap::GetLastStatus() const -{ - Status lastStatus = lastResult; - lastResult = Ok; - return (lastStatus); -} - -#endif - diff --git a/src/includes/GdiPlusColor.h b/src/includes/GdiPlusColor.h deleted file mode 100644 index 7ec10f84..00000000 --- a/src/includes/GdiPlusColor.h +++ /dev/null @@ -1,209 +0,0 @@ -/**************************************************************************\ -* -* Copyright (c) 1998-2000, Microsoft Corp. All Rights Reserved. -* -* Module Name: -* -* GdiplusColor.h -* -* Abstract: -* -* Represents a GDI+ color. -* -\**************************************************************************/ - -#ifndef _GDIPLUSCOLOR_H -#define _GDIPLUSCOLOR_H - -//---------------------------------------------------------------------------- -// Color mode -//---------------------------------------------------------------------------- - -enum ColorMode -{ - ColorModeARGB32 = 0, - ColorModeARGB64 = 1 -}; - -//---------------------------------------------------------------------------- -// Color Channel flags -//---------------------------------------------------------------------------- - -enum ColorChannelFlags -{ - ColorChannelFlagsC = 0, - ColorChannelFlagsM, - ColorChannelFlagsY, - ColorChannelFlagsK, - ColorChannelFlagsLast -}; - -//---------------------------------------------------------------------------- -// Color -//---------------------------------------------------------------------------- - -class Color -{ -public: - - Color() - { - Argb = (ARGB)Color::Black; - } - - // Construct an opaque Color object with - // the specified R, G, B values. - - Color(IN BYTE r, - IN BYTE g, - IN BYTE b) - { - Argb = MakeARGB(255, r, g, b); - } - - // Construct a Color object with - // the specified A, R, G, B values. - // - // NOTE: R, G, B color values are not premultiplied. - - Color(IN BYTE a, - IN BYTE r, - IN BYTE g, - IN BYTE b) - { - Argb = MakeARGB(a, r, g, b); - } - - // Construct a Color object with - // the specified ARGB values. - // - // NOTE: R, G, B color components are not premultiplied. - - Color(IN ARGB argb) - { - Argb = argb; - } - - // Extract A, R, G, B components - - BYTE GetAlpha() const - { - return (BYTE) (Argb >> AlphaShift); - } - - BYTE GetA() const - { - return GetAlpha(); - } - - BYTE GetRed() const - { - return (BYTE) (Argb >> RedShift); - } - - BYTE GetR() const - { - return GetRed(); - } - - BYTE GetGreen() const - { - return (BYTE) (Argb >> GreenShift); - } - - BYTE GetG() const - { - return GetGreen(); - } - - BYTE GetBlue() const - { - return (BYTE) (Argb >> BlueShift); - } - - BYTE GetB() const - { - return GetBlue(); - } - - // Retrieve ARGB values - - ARGB GetValue() const - { - return Argb; - } - - VOID SetValue(IN ARGB argb) - { - Argb = argb; - } - - VOID SetFromCOLORREF(IN COLORREF rgb) - { - Argb = MakeARGB(255, GetRValue(rgb), GetGValue(rgb), GetBValue(rgb)); - } - - COLORREF ToCOLORREF() const - { - return RGB(GetRed(), GetGreen(), GetBlue()); - } - -public: - - // Standard color constants - enum - { - Black = 0xff000000, - Silver = 0xffc0c0c0, - Gray = 0xff808080, - White = 0xffffffff, - Maroon = 0xff800000, - Red = 0xffff0000, - Purple = 0xff800080, - Fuchsia = 0xffff00ff, - Green = 0xff008000, - Lime = 0xff00ff00, - Olive = 0xff808000, - Yellow = 0xffffff00, - Navy = 0xff000080, - Blue = 0xff0000ff, - Teal = 0xff008080, - Aqua = 0xff00ffff - }; - - // Shift count and bit mask for A, R, G, B components - enum - { - AlphaShift = 24, - RedShift = 16, - GreenShift = 8, - BlueShift = 0 - }; - - enum - { - AlphaMask = 0xff000000, - RedMask = 0x00ff0000, - GreenMask = 0x0000ff00, - BlueMask = 0x000000ff - }; - - // Assemble A, R, G, B values into a 32-bit integer - static ARGB MakeARGB(IN BYTE a, - IN BYTE r, - IN BYTE g, - IN BYTE b) - { - return (((ARGB) (b) << BlueShift) | - ((ARGB) (g) << GreenShift) | - ((ARGB) (r) << RedShift) | - ((ARGB) (a) << AlphaShift)); - } - -protected: - - ARGB Argb; -}; - -#endif - diff --git a/src/includes/GdiPlusColorMatrix.h b/src/includes/GdiPlusColorMatrix.h deleted file mode 100644 index ec4d14b1..00000000 --- a/src/includes/GdiPlusColorMatrix.h +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************\ -* -* Copyright (c) 1998-2000, Microsoft Corp. All Rights Reserved. -* -* Module Name: -* -* GdiplusColorMatrix.h -* -* Abstract: -* -* Class for color adjustment object passed to Graphics.DrawImage -* -\**************************************************************************/ - -#ifndef _GDIPLUSCOLORMATRIX_H -#define _GDIPLUSCOLORMATRIX_H - -//---------------------------------------------------------------------------- -// Color matrix -//---------------------------------------------------------------------------- - -struct ColorMatrix -{ - REAL m[5][5]; -}; - -//---------------------------------------------------------------------------- -// Color Matrix flags -//---------------------------------------------------------------------------- - -enum ColorMatrixFlags -{ - ColorMatrixFlagsDefault = 0, - ColorMatrixFlagsSkipGrays = 1, - ColorMatrixFlagsAltGray = 2 -}; - -//---------------------------------------------------------------------------- -// Color Adjust Type -//---------------------------------------------------------------------------- - -enum ColorAdjustType -{ - ColorAdjustTypeDefault, - ColorAdjustTypeBitmap, - ColorAdjustTypeBrush, - ColorAdjustTypePen, - ColorAdjustTypeText, - ColorAdjustTypeCount, // must be immediately after all the individual ones - ColorAdjustTypeAny // internal use: for querying if any type has recoloring -}; - -//---------------------------------------------------------------------------- -// Color Map -//---------------------------------------------------------------------------- - -struct ColorMap -{ - Color oldColor; - Color newColor; -}; - -#endif diff --git a/src/includes/GdiPlusEnums.h b/src/includes/GdiPlusEnums.h deleted file mode 100644 index 9962ff58..00000000 --- a/src/includes/GdiPlusEnums.h +++ /dev/null @@ -1,1252 +0,0 @@ -/**************************************************************************\ -* -* Copyright (c) 1998-2000, Microsoft Corp. All Rights Reserved. -* -* Module Name: -* -* GdiplusEnums.h -* -* Abstract: -* -* Various enumeration types -* -\**************************************************************************/ - -#ifndef _GDIPLUSENUMS_H -#define _GDIPLUSENUMS_H - - -//-------------------------------------------------------------------------- -// Default bezier flattening tolerance in device pixels. -//-------------------------------------------------------------------------- - -const float FlatnessDefault = 1.0f/4.0f; - -//-------------------------------------------------------------------------- -// Graphics and Container State cookies -//-------------------------------------------------------------------------- - -typedef UINT GraphicsState; -typedef UINT GraphicsContainer; - -//-------------------------------------------------------------------------- -// Fill mode constants -//-------------------------------------------------------------------------- - -enum FillMode -{ - FillModeAlternate, // 0 - FillModeWinding // 1 -}; - -//-------------------------------------------------------------------------- -// Quality mode constants -//-------------------------------------------------------------------------- - -enum QualityMode -{ - QualityModeInvalid = -1, - QualityModeDefault = 0, - QualityModeLow = 1, // for apps that need the best performance - QualityModeHigh = 2 // for apps that need the best rendering quality -}; - -//-------------------------------------------------------------------------- -// Alpha compositing mode constants -//-------------------------------------------------------------------------- - -enum CompositingMode -{ - CompositingModeSourceOver, // 0 - CompositingModeSourceCopy // 1 -}; - -//-------------------------------------------------------------------------- -// Alpha compositing quality constants -//-------------------------------------------------------------------------- - -enum CompositingQuality -{ - CompositingQualityInvalid = QualityModeInvalid, - CompositingQualityDefault = QualityModeDefault, - CompositingQualityHighSpeed = QualityModeLow, - CompositingQualityHighQuality = QualityModeHigh, - CompositingQualityGammaCorrected, - CompositingQualityAssumeLinear -}; - -//-------------------------------------------------------------------------- -// Unit constants -//-------------------------------------------------------------------------- - -enum Unit -{ - UnitWorld, // 0 -- World coordinate (non-physical unit) - UnitDisplay, // 1 -- Variable -- for PageTransform only - UnitPixel, // 2 -- Each unit is one device pixel. - UnitPoint, // 3 -- Each unit is a printer's point, or 1/72 inch. - UnitInch, // 4 -- Each unit is 1 inch. - UnitDocument, // 5 -- Each unit is 1/300 inch. - UnitMillimeter // 6 -- Each unit is 1 millimeter. -}; - -//-------------------------------------------------------------------------- -// MetafileFrameUnit -// -// The frameRect for creating a metafile can be specified in any of these -// units. There is an extra frame unit value (MetafileFrameUnitGdi) so -// that units can be supplied in the same units that GDI expects for -// frame rects -- these units are in .01 (1/100ths) millimeter units -// as defined by GDI. -//-------------------------------------------------------------------------- -enum MetafileFrameUnit -{ - MetafileFrameUnitPixel = UnitPixel, - MetafileFrameUnitPoint = UnitPoint, - MetafileFrameUnitInch = UnitInch, - MetafileFrameUnitDocument = UnitDocument, - MetafileFrameUnitMillimeter = UnitMillimeter, - MetafileFrameUnitGdi // GDI compatible .01 MM units -}; - -//-------------------------------------------------------------------------- -// Coordinate space identifiers -//-------------------------------------------------------------------------- - -enum CoordinateSpace -{ - CoordinateSpaceWorld, // 0 - CoordinateSpacePage, // 1 - CoordinateSpaceDevice // 2 -}; - -//-------------------------------------------------------------------------- -// Various wrap modes for brushes -//-------------------------------------------------------------------------- - -enum WrapMode -{ - WrapModeTile, // 0 - WrapModeTileFlipX, // 1 - WrapModeTileFlipY, // 2 - WrapModeTileFlipXY, // 3 - WrapModeClamp // 4 -}; - -//-------------------------------------------------------------------------- -// Various hatch styles -//-------------------------------------------------------------------------- - -enum HatchStyle -{ - HatchStyleHorizontal, // 0 - HatchStyleVertical, // 1 - HatchStyleForwardDiagonal, // 2 - HatchStyleBackwardDiagonal, // 3 - HatchStyleCross, // 4 - HatchStyleDiagonalCross, // 5 - HatchStyle05Percent, // 6 - HatchStyle10Percent, // 7 - HatchStyle20Percent, // 8 - HatchStyle25Percent, // 9 - HatchStyle30Percent, // 10 - HatchStyle40Percent, // 11 - HatchStyle50Percent, // 12 - HatchStyle60Percent, // 13 - HatchStyle70Percent, // 14 - HatchStyle75Percent, // 15 - HatchStyle80Percent, // 16 - HatchStyle90Percent, // 17 - HatchStyleLightDownwardDiagonal, // 18 - HatchStyleLightUpwardDiagonal, // 19 - HatchStyleDarkDownwardDiagonal, // 20 - HatchStyleDarkUpwardDiagonal, // 21 - HatchStyleWideDownwardDiagonal, // 22 - HatchStyleWideUpwardDiagonal, // 23 - HatchStyleLightVertical, // 24 - HatchStyleLightHorizontal, // 25 - HatchStyleNarrowVertical, // 26 - HatchStyleNarrowHorizontal, // 27 - HatchStyleDarkVertical, // 28 - HatchStyleDarkHorizontal, // 29 - HatchStyleDashedDownwardDiagonal, // 30 - HatchStyleDashedUpwardDiagonal, // 31 - HatchStyleDashedHorizontal, // 32 - HatchStyleDashedVertical, // 33 - HatchStyleSmallConfetti, // 34 - HatchStyleLargeConfetti, // 35 - HatchStyleZigZag, // 36 - HatchStyleWave, // 37 - HatchStyleDiagonalBrick, // 38 - HatchStyleHorizontalBrick, // 39 - HatchStyleWeave, // 40 - HatchStylePlaid, // 41 - HatchStyleDivot, // 42 - HatchStyleDottedGrid, // 43 - HatchStyleDottedDiamond, // 44 - HatchStyleShingle, // 45 - HatchStyleTrellis, // 46 - HatchStyleSphere, // 47 - HatchStyleSmallGrid, // 48 - HatchStyleSmallCheckerBoard, // 49 - HatchStyleLargeCheckerBoard, // 50 - HatchStyleOutlinedDiamond, // 51 - HatchStyleSolidDiamond, // 52 - - HatchStyleTotal, // must be after all unique hatch styles - - HatchStyleLargeGrid = HatchStyleCross, // 4 an alias for the cross style - - HatchStyleMin = HatchStyleHorizontal, - HatchStyleMax = HatchStyleTotal - 1, -}; - -//-------------------------------------------------------------------------- -// Dash style constants -//-------------------------------------------------------------------------- - -enum DashStyle -{ - DashStyleSolid, // 0 - DashStyleDash, // 1 - DashStyleDot, // 2 - DashStyleDashDot, // 3 - DashStyleDashDotDot, // 4 - DashStyleCustom // 5 -}; - -//-------------------------------------------------------------------------- -// Dash cap constants -//-------------------------------------------------------------------------- - -enum DashCap -{ - DashCapFlat = 0, - DashCapRound = 2, - DashCapTriangle = 3 -}; - -//-------------------------------------------------------------------------- -// Line cap constants (only the lowest 8 bits are used). -//-------------------------------------------------------------------------- - -enum LineCap -{ - LineCapFlat = 0, - LineCapSquare = 1, - LineCapRound = 2, - LineCapTriangle = 3, - - LineCapNoAnchor = 0x10, // corresponds to flat cap - LineCapSquareAnchor = 0x11, // corresponds to square cap - LineCapRoundAnchor = 0x12, // corresponds to round cap - LineCapDiamondAnchor = 0x13, // corresponds to triangle cap - LineCapArrowAnchor = 0x14, // no correspondence - - LineCapCustom = 0xff, // custom cap - - LineCapAnchorMask = 0xf0 // mask to check for anchor or not. -}; - -//-------------------------------------------------------------------------- -// Custom Line cap type constants -//-------------------------------------------------------------------------- - -enum CustomLineCapType -{ - CustomLineCapTypeDefault = 0, - CustomLineCapTypeAdjustableArrow = 1 -}; - -//-------------------------------------------------------------------------- -// Line join constants -//-------------------------------------------------------------------------- - -enum LineJoin -{ - LineJoinMiter = 0, - LineJoinBevel = 1, - LineJoinRound = 2, - LineJoinMiterClipped = 3 -}; - -//-------------------------------------------------------------------------- -// Path point types (only the lowest 8 bits are used.) -// The lowest 3 bits are interpreted as point type -// The higher 5 bits are reserved for flags. -//-------------------------------------------------------------------------- - -enum PathPointType -{ - PathPointTypeStart = 0, // move - PathPointTypeLine = 1, // line - PathPointTypeBezier = 3, // default Beizer (= cubic Bezier) - PathPointTypePathTypeMask = 0x07, // type mask (lowest 3 bits). - PathPointTypeDashMode = 0x10, // currently in dash mode. - PathPointTypePathMarker = 0x20, // a marker for the path. - PathPointTypeCloseSubpath = 0x80, // closed flag - - // Path types used for advanced path. - - PathPointTypeBezier2 = 2, // quadratic Beizer - PathPointTypeBezier3 = 3, // cubic Bezier - PathPointTypeBezier4 = 4, // quartic (4th order) Beizer - PathPointTypeBezier5 = 5, // quintic (5th order) Bezier - PathPointTypeBezier6 = 6 // hexaic (6th order) Bezier -}; - - -//-------------------------------------------------------------------------- -// WarpMode constants -//-------------------------------------------------------------------------- - -enum WarpMode -{ - WarpModePerspective, // 0 - WarpModeBilinear // 1 -}; - -//-------------------------------------------------------------------------- -// LineGradient Mode -//-------------------------------------------------------------------------- - -enum LinearGradientMode -{ - LinearGradientModeHorizontal, // 0 - LinearGradientModeVertical, // 1 - LinearGradientModeForwardDiagonal, // 2 - LinearGradientModeBackwardDiagonal // 3 -}; - -//-------------------------------------------------------------------------- -// Region Comine Modes -//-------------------------------------------------------------------------- - -enum CombineMode -{ - CombineModeReplace, // 0 - CombineModeIntersect, // 1 - CombineModeUnion, // 2 - CombineModeXor, // 3 - CombineModeExclude, // 4 - CombineModeComplement // 5 (does exclude from) -}; - -//-------------------------------------------------------------------------- - // Image types -//-------------------------------------------------------------------------- - -enum ImageType -{ - ImageTypeUnknown, // 0 - ImageTypeBitmap, // 1 - ImageTypeMetafile // 2 -}; - -//-------------------------------------------------------------------------- -// Interpolation modes -//-------------------------------------------------------------------------- - -enum InterpolationMode -{ - InterpolationModeInvalid = QualityModeInvalid, - InterpolationModeDefault = QualityModeDefault, - InterpolationModeLowQuality = QualityModeLow, - InterpolationModeHighQuality = QualityModeHigh, - InterpolationModeBilinear, - InterpolationModeBicubic, - InterpolationModeNearestNeighbor, - InterpolationModeHighQualityBilinear, - InterpolationModeHighQualityBicubic -}; - -//-------------------------------------------------------------------------- -// Pen types -//-------------------------------------------------------------------------- -enum PenAlignment -{ - PenAlignmentCenter = 0, - PenAlignmentInset = 1, - PenAlignmentOutset = 2, - PenAlignmentLeft = 3, - PenAlignmentRight = 4 -}; - -//-------------------------------------------------------------------------- -// Brush types -//-------------------------------------------------------------------------- - -enum BrushType -{ - BrushTypeSolidColor = 0, - BrushTypeHatchFill = 1, - BrushTypeTextureFill = 2, - BrushTypePathGradient = 3, - BrushTypeLinearGradient = 4 -}; - -//-------------------------------------------------------------------------- -// Pen's Fill types -//-------------------------------------------------------------------------- - -enum PenType -{ - PenTypeSolidColor = BrushTypeSolidColor, - PenTypeHatchFill = BrushTypeHatchFill, - PenTypeTextureFill = BrushTypeTextureFill, - PenTypePathGradient = BrushTypePathGradient, - PenTypeLinearGradient = BrushTypeLinearGradient, - PenTypeUnknown = -1 -}; - -//-------------------------------------------------------------------------- -// Matrix Order -//-------------------------------------------------------------------------- - -enum MatrixOrder -{ - MatrixOrderPrepend = 0, - MatrixOrderAppend = 1 -}; - -//-------------------------------------------------------------------------- -// Generic font families -//-------------------------------------------------------------------------- - -enum GenericFontFamily -{ - GenericFontFamilySerif, - GenericFontFamilySansSerif, - GenericFontFamilyMonospace - -}; - -//-------------------------------------------------------------------------- -// FontStyle: face types and common styles -//-------------------------------------------------------------------------- - -// These should probably be flags - -// Must have: -// Regular = 0 -// Bold = 1 -// Italic = 2 -// BoldItalic = 3 - -enum FontStyle -{ - FontStyleRegular = 0, - FontStyleBold = 1, - FontStyleItalic = 2, - FontStyleBoldItalic = 3, - FontStyleUnderline = 4, - FontStyleStrikeout = 8 -}; - -//--------------------------------------------------------------------------- -// Smoothing Mode -//--------------------------------------------------------------------------- - -enum SmoothingMode -{ - SmoothingModeInvalid = QualityModeInvalid, - SmoothingModeDefault = QualityModeDefault, - SmoothingModeHighSpeed = QualityModeLow, - SmoothingModeHighQuality = QualityModeHigh, - SmoothingModeNone, - SmoothingModeAntiAlias -}; - -//--------------------------------------------------------------------------- -// Pixel Format Mode -//--------------------------------------------------------------------------- - -enum PixelOffsetMode -{ - PixelOffsetModeInvalid = QualityModeInvalid, - PixelOffsetModeDefault = QualityModeDefault, - PixelOffsetModeHighSpeed = QualityModeLow, - PixelOffsetModeHighQuality = QualityModeHigh, - PixelOffsetModeNone, // no pixel offset - PixelOffsetModeHalf // offset by -0.5, -0.5 for fast anti-alias perf -}; - -//--------------------------------------------------------------------------- -// Text Rendering Hint -//--------------------------------------------------------------------------- - -enum TextRenderingHint -{ -#ifdef DCR_USE_NEW_186764 - TextRenderingHintSystemDefault = 0, // Glyph with system default rendering hint - TextRenderingHintSingleBitPerPixelGridFit, // Glyph bitmap with hinting -#else - TextRenderingHintSingleBitPerPixelGridFit = 0, // Glyph bitmap with hinting -#endif // DCR_USE_NEW_186764 - TextRenderingHintSingleBitPerPixel, // Glyph bitmap without hinting - TextRenderingHintAntiAliasGridFit, // Glyph anti-alias bitmap with hinting - TextRenderingHintAntiAlias, // Glyph anti-alias bitmap without hinting - TextRenderingHintClearTypeGridFit // Glyph CT bitmap with hinting -}; - -//--------------------------------------------------------------------------- -// Metafile Types -//--------------------------------------------------------------------------- -enum MetafileType -{ - MetafileTypeInvalid, // Invalid metafile - MetafileTypeWmf, // Standard WMF - MetafileTypeWmfAldus, // Aldus Placeable Metafile format - MetafileTypeEmf, // EMF (not EMF+) - MetafileTypeEmfPlusOnly, // EMF+ without dual, down-level records - MetafileTypeEmfPlusDual // EMF+ with dual, down-level records -}; - -// Specifies the type of EMF to record -enum EmfType -{ - EmfTypeEmfOnly = MetafileTypeEmf, // no EMF+, only EMF - EmfTypeEmfPlusOnly = MetafileTypeEmfPlusOnly, // no EMF, only EMF+ - EmfTypeEmfPlusDual = MetafileTypeEmfPlusDual // both EMF+ and EMF -}; - -// All persistent objects must have a type listed here -enum ObjectType -{ - ObjectTypeInvalid, - ObjectTypeBrush, - ObjectTypePen, - ObjectTypePath, - ObjectTypeRegion, - ObjectTypeImage, - ObjectTypeFont, - ObjectTypeStringFormat, - ObjectTypeImageAttributes, - ObjectTypeCustomLineCap, - - ObjectTypeMax = ObjectTypeCustomLineCap, - ObjectTypeMin = ObjectTypeBrush -}; - -inline BOOL -ObjectTypeIsValid( - ObjectType type - ) -{ - return ((type >= ObjectTypeMin) && (type <= ObjectTypeMax)); -} - -//--------------------------------------------------------------------------- -// EMF+ Records -//--------------------------------------------------------------------------- - -// We have to change the WMF record numbers so that they don't conflict with -// the EMF and EMF+ record numbers. -enum EmfPlusRecordType; -#define GDIP_EMFPLUS_RECORD_BASE 0x00004000 -#define GDIP_WMF_RECORD_BASE 0x00010000 -#define GDIP_WMF_RECORD_TO_EMFPLUS(n) ((EmfPlusRecordType)((n) | GDIP_WMF_RECORD_BASE)) -#define GDIP_EMFPLUS_RECORD_TO_WMF(n) ((n) & (~GDIP_WMF_RECORD_BASE)) -#define GDIP_IS_WMF_RECORDTYPE(n) (((n) & GDIP_WMF_RECORD_BASE) != 0) - -enum EmfPlusRecordType -{ - // Since we have to enumerate GDI records right along with GDI+ records, - // we list all the GDI records here so that they can be part of the - // same enumeration type which is used in the enumeration callback. - - WmfRecordTypeSetBkColor = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETBKCOLOR), - WmfRecordTypeSetBkMode = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETBKMODE), - WmfRecordTypeSetMapMode = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETMAPMODE), - WmfRecordTypeSetROP2 = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETROP2), - WmfRecordTypeSetRelAbs = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETRELABS), - WmfRecordTypeSetPolyFillMode = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETPOLYFILLMODE), - WmfRecordTypeSetStretchBltMode = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETSTRETCHBLTMODE), - WmfRecordTypeSetTextCharExtra = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETTEXTCHAREXTRA), - WmfRecordTypeSetTextColor = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETTEXTCOLOR), - WmfRecordTypeSetTextJustification = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETTEXTJUSTIFICATION), - WmfRecordTypeSetWindowOrg = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETWINDOWORG), - WmfRecordTypeSetWindowExt = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETWINDOWEXT), - WmfRecordTypeSetViewportOrg = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETVIEWPORTORG), - WmfRecordTypeSetViewportExt = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETVIEWPORTEXT), - WmfRecordTypeOffsetWindowOrg = GDIP_WMF_RECORD_TO_EMFPLUS(META_OFFSETWINDOWORG), - WmfRecordTypeScaleWindowExt = GDIP_WMF_RECORD_TO_EMFPLUS(META_SCALEWINDOWEXT), - WmfRecordTypeOffsetViewportOrg = GDIP_WMF_RECORD_TO_EMFPLUS(META_OFFSETVIEWPORTORG), - WmfRecordTypeScaleViewportExt = GDIP_WMF_RECORD_TO_EMFPLUS(META_SCALEVIEWPORTEXT), - WmfRecordTypeLineTo = GDIP_WMF_RECORD_TO_EMFPLUS(META_LINETO), - WmfRecordTypeMoveTo = GDIP_WMF_RECORD_TO_EMFPLUS(META_MOVETO), - WmfRecordTypeExcludeClipRect = GDIP_WMF_RECORD_TO_EMFPLUS(META_EXCLUDECLIPRECT), - WmfRecordTypeIntersectClipRect = GDIP_WMF_RECORD_TO_EMFPLUS(META_INTERSECTCLIPRECT), - WmfRecordTypeArc = GDIP_WMF_RECORD_TO_EMFPLUS(META_ARC), - WmfRecordTypeEllipse = GDIP_WMF_RECORD_TO_EMFPLUS(META_ELLIPSE), - WmfRecordTypeFloodFill = GDIP_WMF_RECORD_TO_EMFPLUS(META_FLOODFILL), - WmfRecordTypePie = GDIP_WMF_RECORD_TO_EMFPLUS(META_PIE), - WmfRecordTypeRectangle = GDIP_WMF_RECORD_TO_EMFPLUS(META_RECTANGLE), - WmfRecordTypeRoundRect = GDIP_WMF_RECORD_TO_EMFPLUS(META_ROUNDRECT), - WmfRecordTypePatBlt = GDIP_WMF_RECORD_TO_EMFPLUS(META_PATBLT), - WmfRecordTypeSaveDC = GDIP_WMF_RECORD_TO_EMFPLUS(META_SAVEDC), - WmfRecordTypeSetPixel = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETPIXEL), - WmfRecordTypeOffsetClipRgn = GDIP_WMF_RECORD_TO_EMFPLUS(META_OFFSETCLIPRGN), - WmfRecordTypeTextOut = GDIP_WMF_RECORD_TO_EMFPLUS(META_TEXTOUT), - WmfRecordTypeBitBlt = GDIP_WMF_RECORD_TO_EMFPLUS(META_BITBLT), - WmfRecordTypeStretchBlt = GDIP_WMF_RECORD_TO_EMFPLUS(META_STRETCHBLT), - WmfRecordTypePolygon = GDIP_WMF_RECORD_TO_EMFPLUS(META_POLYGON), - WmfRecordTypePolyline = GDIP_WMF_RECORD_TO_EMFPLUS(META_POLYLINE), - WmfRecordTypeEscape = GDIP_WMF_RECORD_TO_EMFPLUS(META_ESCAPE), - WmfRecordTypeRestoreDC = GDIP_WMF_RECORD_TO_EMFPLUS(META_RESTOREDC), - WmfRecordTypeFillRegion = GDIP_WMF_RECORD_TO_EMFPLUS(META_FILLREGION), - WmfRecordTypeFrameRegion = GDIP_WMF_RECORD_TO_EMFPLUS(META_FRAMEREGION), - WmfRecordTypeInvertRegion = GDIP_WMF_RECORD_TO_EMFPLUS(META_INVERTREGION), - WmfRecordTypePaintRegion = GDIP_WMF_RECORD_TO_EMFPLUS(META_PAINTREGION), - WmfRecordTypeSelectClipRegion = GDIP_WMF_RECORD_TO_EMFPLUS(META_SELECTCLIPREGION), - WmfRecordTypeSelectObject = GDIP_WMF_RECORD_TO_EMFPLUS(META_SELECTOBJECT), - WmfRecordTypeSetTextAlign = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETTEXTALIGN), - WmfRecordTypeDrawText = GDIP_WMF_RECORD_TO_EMFPLUS(0x062F), // META_DRAWTEXT - WmfRecordTypeChord = GDIP_WMF_RECORD_TO_EMFPLUS(META_CHORD), - WmfRecordTypeSetMapperFlags = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETMAPPERFLAGS), - WmfRecordTypeExtTextOut = GDIP_WMF_RECORD_TO_EMFPLUS(META_EXTTEXTOUT), - WmfRecordTypeSetDIBToDev = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETDIBTODEV), - WmfRecordTypeSelectPalette = GDIP_WMF_RECORD_TO_EMFPLUS(META_SELECTPALETTE), - WmfRecordTypeRealizePalette = GDIP_WMF_RECORD_TO_EMFPLUS(META_REALIZEPALETTE), - WmfRecordTypeAnimatePalette = GDIP_WMF_RECORD_TO_EMFPLUS(META_ANIMATEPALETTE), - WmfRecordTypeSetPalEntries = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETPALENTRIES), - WmfRecordTypePolyPolygon = GDIP_WMF_RECORD_TO_EMFPLUS(META_POLYPOLYGON), - WmfRecordTypeResizePalette = GDIP_WMF_RECORD_TO_EMFPLUS(META_RESIZEPALETTE), - WmfRecordTypeDIBBitBlt = GDIP_WMF_RECORD_TO_EMFPLUS(META_DIBBITBLT), - WmfRecordTypeDIBStretchBlt = GDIP_WMF_RECORD_TO_EMFPLUS(META_DIBSTRETCHBLT), - WmfRecordTypeDIBCreatePatternBrush = GDIP_WMF_RECORD_TO_EMFPLUS(META_DIBCREATEPATTERNBRUSH), - WmfRecordTypeStretchDIB = GDIP_WMF_RECORD_TO_EMFPLUS(META_STRETCHDIB), - WmfRecordTypeExtFloodFill = GDIP_WMF_RECORD_TO_EMFPLUS(META_EXTFLOODFILL), - WmfRecordTypeSetLayout = GDIP_WMF_RECORD_TO_EMFPLUS(0x0149), // META_SETLAYOUT - WmfRecordTypeResetDC = GDIP_WMF_RECORD_TO_EMFPLUS(0x014C), // META_RESETDC - WmfRecordTypeStartDoc = GDIP_WMF_RECORD_TO_EMFPLUS(0x014D), // META_STARTDOC - WmfRecordTypeStartPage = GDIP_WMF_RECORD_TO_EMFPLUS(0x004F), // META_STARTPAGE - WmfRecordTypeEndPage = GDIP_WMF_RECORD_TO_EMFPLUS(0x0050), // META_ENDPAGE - WmfRecordTypeAbortDoc = GDIP_WMF_RECORD_TO_EMFPLUS(0x0052), // META_ABORTDOC - WmfRecordTypeEndDoc = GDIP_WMF_RECORD_TO_EMFPLUS(0x005E), // META_ENDDOC - WmfRecordTypeDeleteObject = GDIP_WMF_RECORD_TO_EMFPLUS(META_DELETEOBJECT), - WmfRecordTypeCreatePalette = GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEPALETTE), - WmfRecordTypeCreateBrush = GDIP_WMF_RECORD_TO_EMFPLUS(0x00F8), // META_CREATEBRUSH - WmfRecordTypeCreatePatternBrush = GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEPATTERNBRUSH), - WmfRecordTypeCreatePenIndirect = GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEPENINDIRECT), - WmfRecordTypeCreateFontIndirect = GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEFONTINDIRECT), - WmfRecordTypeCreateBrushIndirect = GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEBRUSHINDIRECT), - WmfRecordTypeCreateBitmapIndirect = GDIP_WMF_RECORD_TO_EMFPLUS(0x02FD), // META_CREATEBITMAPINDIRECT - WmfRecordTypeCreateBitmap = GDIP_WMF_RECORD_TO_EMFPLUS(0x06FE), // META_CREATEBITMAP - WmfRecordTypeCreateRegion = GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEREGION), - - EmfRecordTypeHeader = EMR_HEADER, - EmfRecordTypePolyBezier = EMR_POLYBEZIER, - EmfRecordTypePolygon = EMR_POLYGON, - EmfRecordTypePolyline = EMR_POLYLINE, - EmfRecordTypePolyBezierTo = EMR_POLYBEZIERTO, - EmfRecordTypePolyLineTo = EMR_POLYLINETO, - EmfRecordTypePolyPolyline = EMR_POLYPOLYLINE, - EmfRecordTypePolyPolygon = EMR_POLYPOLYGON, - EmfRecordTypeSetWindowExtEx = EMR_SETWINDOWEXTEX, - EmfRecordTypeSetWindowOrgEx = EMR_SETWINDOWORGEX, - EmfRecordTypeSetViewportExtEx = EMR_SETVIEWPORTEXTEX, - EmfRecordTypeSetViewportOrgEx = EMR_SETVIEWPORTORGEX, - EmfRecordTypeSetBrushOrgEx = EMR_SETBRUSHORGEX, - EmfRecordTypeEOF = EMR_EOF, - EmfRecordTypeSetPixelV = EMR_SETPIXELV, - EmfRecordTypeSetMapperFlags = EMR_SETMAPPERFLAGS, - EmfRecordTypeSetMapMode = EMR_SETMAPMODE, - EmfRecordTypeSetBkMode = EMR_SETBKMODE, - EmfRecordTypeSetPolyFillMode = EMR_SETPOLYFILLMODE, - EmfRecordTypeSetROP2 = EMR_SETROP2, - EmfRecordTypeSetStretchBltMode = EMR_SETSTRETCHBLTMODE, - EmfRecordTypeSetTextAlign = EMR_SETTEXTALIGN, - EmfRecordTypeSetColorAdjustment = EMR_SETCOLORADJUSTMENT, - EmfRecordTypeSetTextColor = EMR_SETTEXTCOLOR, - EmfRecordTypeSetBkColor = EMR_SETBKCOLOR, - EmfRecordTypeOffsetClipRgn = EMR_OFFSETCLIPRGN, - EmfRecordTypeMoveToEx = EMR_MOVETOEX, - EmfRecordTypeSetMetaRgn = EMR_SETMETARGN, - EmfRecordTypeExcludeClipRect = EMR_EXCLUDECLIPRECT, - EmfRecordTypeIntersectClipRect = EMR_INTERSECTCLIPRECT, - EmfRecordTypeScaleViewportExtEx = EMR_SCALEVIEWPORTEXTEX, - EmfRecordTypeScaleWindowExtEx = EMR_SCALEWINDOWEXTEX, - EmfRecordTypeSaveDC = EMR_SAVEDC, - EmfRecordTypeRestoreDC = EMR_RESTOREDC, - EmfRecordTypeSetWorldTransform = EMR_SETWORLDTRANSFORM, - EmfRecordTypeModifyWorldTransform = EMR_MODIFYWORLDTRANSFORM, - EmfRecordTypeSelectObject = EMR_SELECTOBJECT, - EmfRecordTypeCreatePen = EMR_CREATEPEN, - EmfRecordTypeCreateBrushIndirect = EMR_CREATEBRUSHINDIRECT, - EmfRecordTypeDeleteObject = EMR_DELETEOBJECT, - EmfRecordTypeAngleArc = EMR_ANGLEARC, - EmfRecordTypeEllipse = EMR_ELLIPSE, - EmfRecordTypeRectangle = EMR_RECTANGLE, - EmfRecordTypeRoundRect = EMR_ROUNDRECT, - EmfRecordTypeArc = EMR_ARC, - EmfRecordTypeChord = EMR_CHORD, - EmfRecordTypePie = EMR_PIE, - EmfRecordTypeSelectPalette = EMR_SELECTPALETTE, - EmfRecordTypeCreatePalette = EMR_CREATEPALETTE, - EmfRecordTypeSetPaletteEntries = EMR_SETPALETTEENTRIES, - EmfRecordTypeResizePalette = EMR_RESIZEPALETTE, - EmfRecordTypeRealizePalette = EMR_REALIZEPALETTE, - EmfRecordTypeExtFloodFill = EMR_EXTFLOODFILL, - EmfRecordTypeLineTo = EMR_LINETO, - EmfRecordTypeArcTo = EMR_ARCTO, - EmfRecordTypePolyDraw = EMR_POLYDRAW, - EmfRecordTypeSetArcDirection = EMR_SETARCDIRECTION, - EmfRecordTypeSetMiterLimit = EMR_SETMITERLIMIT, - EmfRecordTypeBeginPath = EMR_BEGINPATH, - EmfRecordTypeEndPath = EMR_ENDPATH, - EmfRecordTypeCloseFigure = EMR_CLOSEFIGURE, - EmfRecordTypeFillPath = EMR_FILLPATH, - EmfRecordTypeStrokeAndFillPath = EMR_STROKEANDFILLPATH, - EmfRecordTypeStrokePath = EMR_STROKEPATH, - EmfRecordTypeFlattenPath = EMR_FLATTENPATH, - EmfRecordTypeWidenPath = EMR_WIDENPATH, - EmfRecordTypeSelectClipPath = EMR_SELECTCLIPPATH, - EmfRecordTypeAbortPath = EMR_ABORTPATH, - EmfRecordTypeReserved_069 = 69, // Not Used - EmfRecordTypeGdiComment = EMR_GDICOMMENT, - EmfRecordTypeFillRgn = EMR_FILLRGN, - EmfRecordTypeFrameRgn = EMR_FRAMERGN, - EmfRecordTypeInvertRgn = EMR_INVERTRGN, - EmfRecordTypePaintRgn = EMR_PAINTRGN, - EmfRecordTypeExtSelectClipRgn = EMR_EXTSELECTCLIPRGN, - EmfRecordTypeBitBlt = EMR_BITBLT, - EmfRecordTypeStretchBlt = EMR_STRETCHBLT, - EmfRecordTypeMaskBlt = EMR_MASKBLT, - EmfRecordTypePlgBlt = EMR_PLGBLT, - EmfRecordTypeSetDIBitsToDevice = EMR_SETDIBITSTODEVICE, - EmfRecordTypeStretchDIBits = EMR_STRETCHDIBITS, - EmfRecordTypeExtCreateFontIndirect = EMR_EXTCREATEFONTINDIRECTW, - EmfRecordTypeExtTextOutA = EMR_EXTTEXTOUTA, - EmfRecordTypeExtTextOutW = EMR_EXTTEXTOUTW, - EmfRecordTypePolyBezier16 = EMR_POLYBEZIER16, - EmfRecordTypePolygon16 = EMR_POLYGON16, - EmfRecordTypePolyline16 = EMR_POLYLINE16, - EmfRecordTypePolyBezierTo16 = EMR_POLYBEZIERTO16, - EmfRecordTypePolylineTo16 = EMR_POLYLINETO16, - EmfRecordTypePolyPolyline16 = EMR_POLYPOLYLINE16, - EmfRecordTypePolyPolygon16 = EMR_POLYPOLYGON16, - EmfRecordTypePolyDraw16 = EMR_POLYDRAW16, - EmfRecordTypeCreateMonoBrush = EMR_CREATEMONOBRUSH, - EmfRecordTypeCreateDIBPatternBrushPt = EMR_CREATEDIBPATTERNBRUSHPT, - EmfRecordTypeExtCreatePen = EMR_EXTCREATEPEN, - EmfRecordTypePolyTextOutA = EMR_POLYTEXTOUTA, - EmfRecordTypePolyTextOutW = EMR_POLYTEXTOUTW, - EmfRecordTypeSetICMMode = 98, // EMR_SETICMMODE, - EmfRecordTypeCreateColorSpace = 99, // EMR_CREATECOLORSPACE, - EmfRecordTypeSetColorSpace = 100, // EMR_SETCOLORSPACE, - EmfRecordTypeDeleteColorSpace = 101, // EMR_DELETECOLORSPACE, - EmfRecordTypeGLSRecord = 102, // EMR_GLSRECORD, - EmfRecordTypeGLSBoundedRecord = 103, // EMR_GLSBOUNDEDRECORD, - EmfRecordTypePixelFormat = 104, // EMR_PIXELFORMAT, - EmfRecordTypeDrawEscape = 105, // EMR_RESERVED_105, - EmfRecordTypeExtEscape = 106, // EMR_RESERVED_106, - EmfRecordTypeStartDoc = 107, // EMR_RESERVED_107, - EmfRecordTypeSmallTextOut = 108, // EMR_RESERVED_108, - EmfRecordTypeForceUFIMapping = 109, // EMR_RESERVED_109, - EmfRecordTypeNamedEscape = 110, // EMR_RESERVED_110, - EmfRecordTypeColorCorrectPalette = 111, // EMR_COLORCORRECTPALETTE, - EmfRecordTypeSetICMProfileA = 112, // EMR_SETICMPROFILEA, - EmfRecordTypeSetICMProfileW = 113, // EMR_SETICMPROFILEW, - EmfRecordTypeAlphaBlend = 114, // EMR_ALPHABLEND, - EmfRecordTypeSetLayout = 115, // EMR_SETLAYOUT, - EmfRecordTypeTransparentBlt = 116, // EMR_TRANSPARENTBLT, - EmfRecordTypeReserved_117 = 117, // Not Used - EmfRecordTypeGradientFill = 118, // EMR_GRADIENTFILL, - EmfRecordTypeSetLinkedUFIs = 119, // EMR_RESERVED_119, - EmfRecordTypeSetTextJustification = 120, // EMR_RESERVED_120, - EmfRecordTypeColorMatchToTargetW = 121, // EMR_COLORMATCHTOTARGETW, - EmfRecordTypeCreateColorSpaceW = 122, // EMR_CREATECOLORSPACEW, - EmfRecordTypeMax = 122, - EmfRecordTypeMin = 1, - - // That is the END of the GDI EMF records. - - // Now we start the list of EMF+ records. We leave quite - // a bit of room here for the addition of any new GDI - // records that may be added later. - - EmfPlusRecordTypeInvalid = GDIP_EMFPLUS_RECORD_BASE, - EmfPlusRecordTypeHeader, - EmfPlusRecordTypeEndOfFile, - - EmfPlusRecordTypeComment, - - EmfPlusRecordTypeGetDC, // the application grabbed the metafile dc - - EmfPlusRecordTypeMultiFormatStart, - EmfPlusRecordTypeMultiFormatSection, - EmfPlusRecordTypeMultiFormatEnd, - - // For all persistent objects - EmfPlusRecordTypeObject, // brush,pen,path,region,image,font,string-format - - // Drawing Records - EmfPlusRecordTypeClear, - EmfPlusRecordTypeFillRects, - EmfPlusRecordTypeDrawRects, - EmfPlusRecordTypeFillPolygon, - EmfPlusRecordTypeDrawLines, - EmfPlusRecordTypeFillEllipse, - EmfPlusRecordTypeDrawEllipse, - EmfPlusRecordTypeFillPie, - EmfPlusRecordTypeDrawPie, - EmfPlusRecordTypeDrawArc, - EmfPlusRecordTypeFillRegion, - EmfPlusRecordTypeFillPath, - EmfPlusRecordTypeDrawPath, - EmfPlusRecordTypeFillClosedCurve, - EmfPlusRecordTypeDrawClosedCurve, - EmfPlusRecordTypeDrawCurve, - EmfPlusRecordTypeDrawBeziers, - EmfPlusRecordTypeDrawImage, - EmfPlusRecordTypeDrawImagePoints, - EmfPlusRecordTypeDrawString, - - // Graphics State Records - EmfPlusRecordTypeSetRenderingOrigin, - EmfPlusRecordTypeSetAntiAliasMode, - EmfPlusRecordTypeSetTextRenderingHint, -#ifdef DCR_USE_NEW_188922 - EmfPlusRecordTypeSetTextContrast, -#else - EmfPlusRecordTypeSetGammaValue, -#endif // DCR_USE_NEW_188922 - EmfPlusRecordTypeSetInterpolationMode, - EmfPlusRecordTypeSetPixelOffsetMode, - EmfPlusRecordTypeSetCompositingMode, - EmfPlusRecordTypeSetCompositingQuality, - EmfPlusRecordTypeSave, - EmfPlusRecordTypeRestore, - EmfPlusRecordTypeBeginContainer, - EmfPlusRecordTypeBeginContainerNoParams, - EmfPlusRecordTypeEndContainer, - EmfPlusRecordTypeSetWorldTransform, - EmfPlusRecordTypeResetWorldTransform, - EmfPlusRecordTypeMultiplyWorldTransform, - EmfPlusRecordTypeTranslateWorldTransform, - EmfPlusRecordTypeScaleWorldTransform, - EmfPlusRecordTypeRotateWorldTransform, - EmfPlusRecordTypeSetPageTransform, - EmfPlusRecordTypeResetClip, - EmfPlusRecordTypeSetClipRect, - EmfPlusRecordTypeSetClipPath, - EmfPlusRecordTypeSetClipRegion, - EmfPlusRecordTypeOffsetClip, - - // New record types must be added here (at the end) -- do not add above, - // since that will invalidate previous metafiles! - EmfPlusRecordTypeDrawDriverString, - - // Have this here so you don't need to keep changing the value of - // EmfPlusRecordTypeMax every time you add a new record. - - EmfPlusRecordTotal, - - EmfPlusRecordTypeMax = EmfPlusRecordTotal-1, - EmfPlusRecordTypeMin = EmfPlusRecordTypeHeader, -}; - -//--------------------------------------------------------------------------- -// StringFormatFlags -//--------------------------------------------------------------------------- - -//--------------------------------------------------------------------------- -// String format flags -// -// DirectionRightToLeft - For horizontal text, the reading order is -// right to left. This value is called -// the base embedding level by the Unicode -// bidirectional engine. -// For vertical text, columns are read from -// right to left. -// By default, horizontal or vertical text is -// read from left to right. -// -// DirectionVertical - Individual lines of text are vertical. In -// each line, characters progress from top to -// bottom. -// By default, lines of text are horizontal, -// each new line below the previous line. -// -// NoFitBlackBox - Allows parts of glyphs to overhang the -// bounding rectangle. -// By default glyphs are first aligned -// inside the margines, then any glyphs which -// still overhang the bounding box are -// repositioned to avoid any overhang. -// For example when an italic -// lower case letter f in a font such as -// Garamond is aligned at the far left of a -// rectangle, the lower part of the f will -// reach slightly further left than the left -// edge of the rectangle. Setting this flag -// will ensure the character aligns visually -// with the lines above and below, but may -// cause some pixels outside the formatting -// rectangle to be clipped or painted. -// -#ifndef DCR_USE_NEW_137252 -// NumberContextArabic - Causes any initial numeric in the string to -// be analysed for bidirection layout as if -// it was preceeded by Arabic text. -// -// DisableKashidaJustification - Arabic text will not be justified by the -// insertion of kashidas (i.e. extending the -// joining line between characters). Instead -// Arabic script will be justified by the -// widening of the whitespace between words. -// -#endif -// DisplayFormatControl - Causes control characters such as the -// left-to-right mark to be shown in the -// output with a representative glyph. -// -#ifndef DCR_USE_NEW_137252 -// DisableKerning - Disables Truetype and OpenType kerning. -// -// DisableLigatures - Disables Truetype and OpenType ligatures. -// -// LayoutLegacyBidi - Causes the bidirection algorithm to use -// slightly different classifications for -// '+', '-' and '/' that make their layout -// much closer to that expected by files -// generated in Windows or by Windows -// applications. -// -// NoChanges - A text imager created with this flag set -// does not support those APIs that change -// it's contents or formatting, but for most -// simple text will be significantly faster in -// performing measurement and drawing -// functions. -// -#endif -// NoFontFallback - Disables fallback to alternate fonts for -// characters not supported in the requested -// font. Any missing characters will be -// be displayed with the fonts missing glyph, -// usually an open square. -// -// NoWrap - Disables wrapping of text between lines -// when formatting within a rectangle. -// NoWrap is implied when a point is passed -// instead of a rectangle, or when the -// specified rectangle has a zero line length. -// -// NoClip - By default text is clipped to the -// formatting rectangle. Setting NoClip -// allows overhanging pixels to affect the -// device outside the formatting rectangle. -// Pixels at the end of the line may be -// affected if the glyphs overhang their -// cells, and either the NoFitBlackBox flag -// has been set, or the glyph extends to far -// to be fitted. -// Pixels above/before the first line or -// below/after the last line may be affected -// if the glyphs extend beyond their cell -// ascent / descent. This can occur rarely -// with unusual diacritic mark combinations. - -//--------------------------------------------------------------------------- - -enum StringFormatFlags -{ - StringFormatFlagsDirectionRightToLeft = 0x00000001, - StringFormatFlagsDirectionVertical = 0x00000002, - StringFormatFlagsNoFitBlackBox = 0x00000004, -#ifndef DCR_USE_NEW_137252 - StringFormatFlagsNumberContextArabic = 0x00000008, - StringFormatFlagsDisableKashidaJustification = 0x00000010, -#endif - StringFormatFlagsDisplayFormatControl = 0x00000020, -#ifndef DCR_USE_NEW_137252 - StringFormatFlagsDisableKerning = 0x00000040, - StringFormatFlagsDisableLigatures = 0x00000080, - StringFormatFlagsLayoutLegacyBidi = 0x00000100, - StringFormatFlagsNoChanges = 0x00000200, -#endif - StringFormatFlagsNoFontFallback = 0x00000400, - StringFormatFlagsMeasureTrailingSpaces = 0x00000800, - StringFormatFlagsNoWrap = 0x00001000, - StringFormatFlagsLineLimit = 0x00002000, - - StringFormatFlagsNoClip = 0x00004000 -}; - -//--------------------------------------------------------------------------- -// StringTrimming -//--------------------------------------------------------------------------- - -enum StringTrimming { - StringTrimmingNone = 0, - StringTrimmingCharacter = 1, - StringTrimmingWord = 2, - StringTrimmingEllipsisCharacter = 3, - StringTrimmingEllipsisWord = 4, - StringTrimmingEllipsisPath = 5 -}; - -#ifndef DCR_USE_NEW_137252 -//--------------------------------------------------------------------------- -// String units -// -// String units are like length units in CSS, they may be absolute, or -// they may be relative to a font size. -// -//--------------------------------------------------------------------------- - -enum StringUnit { - StringUnitWorld = UnitWorld, - StringUnitDisplay = UnitDisplay, - StringUnitPixel = UnitPixel, - StringUnitPoint = UnitPoint, - StringUnitInch = UnitInch, - StringUnitDocument = UnitDocument, - StringUnitMillimeter = UnitMillimeter, - StringUnitEm = 32 -}; -#endif - -#ifndef DCR_USE_NEW_152154 -//--------------------------------------------------------------------------- -// Line spacing flags -//--------------------------------------------------------------------------- - -enum LineSpacing { - LineSpacingWorld = UnitWorld, - LineSpacingDisplay = UnitDisplay, - LineSpacingPixel = UnitPixel, - LineSpacingPoint = UnitPoint, - LineSpacingInch = UnitInch, - LineSpacingDocument = UnitDocument, - LineSpacingMillimeter = UnitMillimeter, - - LineSpacingRecommended = 32, - LineSpacingAtLeast = 33, - LineSpacingAtLeastMultiple = 34, - LineSpacingCell = 35, - LineSpacingCellAtLeast = 36, - LineSpacingCellAtLeastMultiple = 37 -}; - -/// The following methods of linespacing are relative to the font size -// -// =========== Method =========== =============== Relative to =============== -// -// LineSpacingRecommended recommended line spacing specified by font -// LineSpacingAtLeast max(recommended, tallest glyph cell) -// LineSpacingAtLeastMultiple smallest multiple of recommended big enough -// for all glyph cells on the line -// LineSpacingCell cell height -// LineSpacingCellAtLeast max(font cell height, tallest glyph cell) -// LineSpacingCellAtLeastMultiple smallest multiple of cell height big enough -// for all glyph cells on the line -#endif - - -//--------------------------------------------------------------------------- -// National language digit substitution -//--------------------------------------------------------------------------- - -enum StringDigitSubstitute -{ - StringDigitSubstituteUser = 0, // As NLS setting - StringDigitSubstituteNone = 1, - StringDigitSubstituteNational = 2, - StringDigitSubstituteTraditional = 3 -}; - -//--------------------------------------------------------------------------- -// Hotkey prefix interpretation -//--------------------------------------------------------------------------- - -enum HotkeyPrefix -{ - HotkeyPrefixNone = 0, - HotkeyPrefixShow = 1, - HotkeyPrefixHide = 2 -}; - -//--------------------------------------------------------------------------- -// Text alignment flags -//--------------------------------------------------------------------------- - -enum StringAlignment -{ - // Left edge for left-to-right text, - // right for right-to-left text, - // and top for vertical - StringAlignmentNear = 0, - StringAlignmentCenter = 1, - StringAlignmentFar = 2 -}; - -//--------------------------------------------------------------------------- -// DriverStringOptions -//--------------------------------------------------------------------------- - -enum DriverStringOptions -{ - DriverStringOptionsCmapLookup = 1, - DriverStringOptionsVertical = 2, - DriverStringOptionsRealizedAdvance = 4, -#ifndef DCR_USE_NEW_137252 - DriverStringOptionsCompensateResolution = 8 -#endif -}; - -//--------------------------------------------------------------------------- -// Flush Intention flags -//--------------------------------------------------------------------------- - -enum FlushIntention -{ - FlushIntentionFlush = 0, // Flush all batched rendering operations - FlushIntentionSync = 1 // Flush all batched rendering operations - // and wait for them to complete -}; - -#ifndef DCR_USE_NEW_175866 - -//--------------------------------------------------------------------------- -// Window Change Notification types -//--------------------------------------------------------------------------- - -enum WindowNotifyEnum -{ - WindowNotifyEnumEnable = 0, - WindowNotifyEnumDisable, - WindowNotifyEnumPalette, - WindowNotifyEnumDisplay, - WindowNotifyEnumSysColor -}; - -#endif - -//--------------------------------------------------------------------------- -// Image encoder parameter related types -//--------------------------------------------------------------------------- - -#ifdef DCR_USE_NEW_145804 -enum EncoderParameterValueType -{ - EncoderParameterValueTypeByte = 1, // 8-bit unsigned int - EncoderParameterValueTypeASCII = 2, // 8-bit byte containing one 7-bit ASCII - // code. NULL terminated. - EncoderParameterValueTypeShort = 3, // 16-bit unsigned int - EncoderParameterValueTypeLong = 4, // 32-bit unsigned int - EncoderParameterValueTypeRational = 5, // Two Longs. The first Long is the - // numerator, the second Long expresses the - // denomintor. - EncoderParameterValueTypeLongRange = 6, // Two longs which specify a range of - // integer values. The first Long specifies - // the lower end and the second one - // specifies the higher end. All values - // are inclusive at both ends - EncoderParameterValueTypeUndefined = 7, // 8-bit byte that can take any value - // depending on field definition - EncoderParameterValueTypeRationalRange = 8 // Two Rationals. The first Rational - // specifies the lower end and the second - // specifies the higher end. All values - // are inclusive at both ends -}; -#else -enum ValueType -{ - ValueTypeByte = 1, // 8-bit unsigned int - ValueTypeASCII = 2, // 8-bit byte containing one 7-bit ASCII - // code. NULL terminated. - ValueTypeShort = 3, // 16-bit unsigned int - ValueTypeLong = 4, // 32-bit unsigned int - ValueTypeRational = 5, // Two Longs. The first Long is the - // numerator, the second Long expresses the - // denomintor. - ValueTypeLongRange = 6, // Two longs which specify a range of - // integer values. The first Long specifies - // the lower end and the second one - // specifies the higher end. All values - // are inclusive at both ends - ValueTypeUndefined = 7, // 8-bit byte that can take any value - // depending on field definition - ValueTypeRationalRange = 8 // Two Rationals. The first Rational - // specifies the lower end and the second - // specifies the higher end. All values - // are inclusive at both ends -}; -#endif - -//--------------------------------------------------------------------------- -// Image encoder value types -//--------------------------------------------------------------------------- - -enum EncoderValue -{ - EncoderValueColorTypeCMYK, - EncoderValueColorTypeYCCK, - EncoderValueCompressionLZW, - EncoderValueCompressionCCITT3, - EncoderValueCompressionCCITT4, - EncoderValueCompressionRle, - EncoderValueCompressionNone, - EncoderValueScanMethodInterlaced, - EncoderValueScanMethodNonInterlaced, - EncoderValueVersionGif87, - EncoderValueVersionGif89, - EncoderValueRenderProgressive, - EncoderValueRenderNonProgressive, - EncoderValueTransformRotate90, - EncoderValueTransformRotate180, - EncoderValueTransformRotate270, - EncoderValueTransformFlipHorizontal, - EncoderValueTransformFlipVertical, - #ifdef DCR_USE_NEW_140861 - EncoderValueMultiFrame, - #else - EncodeValueMultiFrame, - #endif - EncoderValueLastFrame, - EncoderValueFlush, - #ifdef DCR_USE_NEW_140861 - EncoderValueFrameDimensionTime, - EncoderValueFrameDimensionResolution, - EncoderValueFrameDimensionPage - #else - EncodeValueFrameDimensionTime, - EncodeValueFrameDimensionResolution, - EncodeValueFrameDimensionPage - #endif -}; - -//--------------------------------------------------------------------------- -// Graphics layout values (support for Middle East localization) -//--------------------------------------------------------------------------- - -enum GraphicsLayout -{ - GraphicsLayoutNormal, - GraphicsLayoutMirrored, - GraphicsLayoutMirroredIgnoreImages, - GraphicsLayoutMirroredForceImages -}; - -//--------------------------------------------------------------------------- -// Image layout values (support for Middle East localization) -//--------------------------------------------------------------------------- - -enum ImageLayout -{ - ImageLayoutNormal, - ImageLayoutIgnoreMirrored -}; - -enum EmfToWmfBitsFlags -{ - EmfToWmfBitsFlagsDefault = 0x00000000, - EmfToWmfBitsFlagsEmbedEmf = 0x00000001, - EmfToWmfBitsFlagsIncludeAPM = 0x00000002, - EmfToWmfBitsFlagsNoXORClip = 0x00000004 -}; - -#endif // !_GDIPLUSENUMS_H diff --git a/src/includes/GdiPlusFlat.h b/src/includes/GdiPlusFlat.h deleted file mode 100644 index 1dd8d466..00000000 --- a/src/includes/GdiPlusFlat.h +++ /dev/null @@ -1,2740 +0,0 @@ -/**************************************************************************\ -* -* Copyright (c) 1998-2000, Microsoft Corp. All Rights Reserved. -* -* Module Name: -* -* GdiplusFlat.h -* -* Abstract: -* -* Flat GDI+ API wrappers - header file -* -\**************************************************************************/ - -// TODO: this file style needs to be made internally consistent with the way -// it handles breaking the long argument lists across multiple lines - -#ifndef _FLATAPI_H -#define _FLATAPI_H - -#define WINGDIPAPI __stdcall - -// currently, only C++ wrapper API's force const. - -#define GDIPCONST const - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef DCR_USE_NEW_175866 - -VOID -WINGDIPAPI -GdipDisplayPaletteWindowNotify(WindowNotifyEnum notify); - -#endif - -//---------------------------------------------------------------------------- -// GraphicsPath methods -//---------------------------------------------------------------------------- - -GpStatus WINGDIPAPI -GdipCreatePath(GpFillMode brushMode, GpPath **path); - -GpStatus WINGDIPAPI -GdipCreatePath2(GDIPCONST GpPointF*, GDIPCONST BYTE*, INT, GpFillMode, - GpPath **path); - -GpStatus WINGDIPAPI -GdipCreatePath2I(GDIPCONST GpPoint*, GDIPCONST BYTE*, INT, GpFillMode, - GpPath **path); - -GpStatus WINGDIPAPI -GdipClonePath(GpPath* path, GpPath **clonePath); - -GpStatus WINGDIPAPI -GdipDeletePath(GpPath* path); - -GpStatus WINGDIPAPI -GdipResetPath(GpPath* path); - -GpStatus WINGDIPAPI -GdipGetPointCount(GpPath* path, INT* count); - -GpStatus WINGDIPAPI -GdipGetPathTypes(GpPath* path, BYTE* types, INT count); - -GpStatus WINGDIPAPI -GdipGetPathPoints(GpPath*, GpPointF* points, INT count); - -GpStatus WINGDIPAPI -GdipGetPathPointsI(GpPath*, GpPoint* points, INT count); - -GpStatus WINGDIPAPI -GdipGetPathFillMode(GpPath *path, GpFillMode *fillmode); - -GpStatus WINGDIPAPI -GdipSetPathFillMode(GpPath *path, GpFillMode fillmode); - -GpStatus WINGDIPAPI -GdipGetPathData(GpPath *path, GpPathData* pathData); - -GpStatus WINGDIPAPI -GdipStartPathFigure(GpPath *path); - -GpStatus WINGDIPAPI -GdipClosePathFigure(GpPath *path); - -GpStatus WINGDIPAPI -GdipClosePathFigures(GpPath *path); - -GpStatus WINGDIPAPI -GdipSetPathMarker(GpPath* path); - -GpStatus WINGDIPAPI -GdipClearPathMarkers(GpPath* path); - -GpStatus WINGDIPAPI -GdipReversePath(GpPath* path); - -GpStatus WINGDIPAPI -GdipGetPathLastPoint(GpPath* path, GpPointF* lastPoint); - -GpStatus WINGDIPAPI -GdipAddPathLine(GpPath *path, REAL x1, REAL y1, REAL x2, REAL y2); - -GpStatus WINGDIPAPI -GdipAddPathLine2(GpPath *path, GDIPCONST GpPointF *points, INT count); - -GpStatus WINGDIPAPI -GdipAddPathArc(GpPath *path, REAL x, REAL y, REAL width, REAL height, - REAL startAngle, REAL sweepAngle); - -GpStatus WINGDIPAPI -GdipAddPathBezier(GpPath *path, REAL x1, REAL y1, REAL x2, REAL y2, - REAL x3, REAL y3, REAL x4, REAL y4); - -GpStatus WINGDIPAPI -GdipAddPathBeziers(GpPath *path, GDIPCONST GpPointF *points, INT count); - -GpStatus WINGDIPAPI -GdipAddPathCurve(GpPath *path, GDIPCONST GpPointF *points, INT count); - -GpStatus WINGDIPAPI -GdipAddPathCurve2(GpPath *path, GDIPCONST GpPointF *points, INT count, - REAL tension); - -GpStatus WINGDIPAPI -GdipAddPathCurve3(GpPath *path, GDIPCONST GpPointF *points, INT count, - INT offset, INT numberOfSegments, REAL tension); - -GpStatus WINGDIPAPI -GdipAddPathClosedCurve(GpPath *path, GDIPCONST GpPointF *points, INT count); - -GpStatus WINGDIPAPI -GdipAddPathClosedCurve2(GpPath *path, GDIPCONST GpPointF *points, INT count, - REAL tension); - -GpStatus WINGDIPAPI -GdipAddPathRectangle(GpPath *path, REAL x, REAL y, REAL width, REAL height); - -GpStatus WINGDIPAPI -GdipAddPathRectangles(GpPath *path, GDIPCONST GpRectF *rects, INT count); - -GpStatus WINGDIPAPI -GdipAddPathEllipse(GpPath *path, REAL x, REAL y, REAL width, - REAL height); - -GpStatus WINGDIPAPI -GdipAddPathPie(GpPath *path, REAL x, REAL y, REAL width, REAL height, - REAL startAngle, REAL sweepAngle); - -GpStatus WINGDIPAPI -GdipAddPathPolygon(GpPath *path, GDIPCONST GpPointF *points, INT count); - -GpStatus WINGDIPAPI -GdipAddPathPath(GpPath *path, GDIPCONST GpPath* addingPath, BOOL connect); - -GpStatus WINGDIPAPI -GdipAddPathString(GpPath *path, GDIPCONST WCHAR *string, - INT length, GDIPCONST GpFontFamily *family, INT style, - REAL emSize, GDIPCONST RectF *layoutRect, - GDIPCONST GpStringFormat *format); - -GpStatus WINGDIPAPI -GdipAddPathStringI(GpPath *path, GDIPCONST WCHAR *string, - INT length, GDIPCONST GpFontFamily *family, INT style, - REAL emSize, GDIPCONST Rect *layoutRect, - GDIPCONST GpStringFormat *format); - -GpStatus WINGDIPAPI -GdipAddPathLineI(GpPath *path, INT x1, INT y1, INT x2, INT y2); - -GpStatus WINGDIPAPI -GdipAddPathLine2I(GpPath *path, GDIPCONST GpPoint *points, INT count); - -GpStatus WINGDIPAPI -GdipAddPathArcI(GpPath *path, INT x, INT y, INT width, INT height, - REAL startAngle, REAL sweepAngle); - -GpStatus WINGDIPAPI -GdipAddPathBezierI(GpPath *path, INT x1, INT y1, INT x2, INT y2, - INT x3, INT y3, INT x4, INT y4); - -GpStatus WINGDIPAPI -GdipAddPathBeziersI(GpPath *path, GDIPCONST GpPoint *points, INT count); - -GpStatus WINGDIPAPI -GdipAddPathCurveI(GpPath *path, GDIPCONST GpPoint *points, INT count); - -GpStatus WINGDIPAPI -GdipAddPathCurve2I(GpPath *path, GDIPCONST GpPoint *points, INT count, - REAL tension); - -GpStatus WINGDIPAPI -GdipAddPathCurve3I(GpPath *path, GDIPCONST GpPoint *points, INT count, - INT offset, INT numberOfSegments, REAL tension); - -GpStatus WINGDIPAPI -GdipAddPathClosedCurveI(GpPath *path, GDIPCONST GpPoint *points, INT count); - -GpStatus WINGDIPAPI -GdipAddPathClosedCurve2I(GpPath *path, GDIPCONST GpPoint *points, INT count, - REAL tension); - -GpStatus WINGDIPAPI -GdipAddPathRectangleI(GpPath *path, INT x, INT y, INT width, INT height); - -GpStatus WINGDIPAPI -GdipAddPathRectanglesI(GpPath *path, GDIPCONST GpRect *rects, INT count); - -GpStatus WINGDIPAPI -GdipAddPathEllipseI(GpPath *path, INT x, INT y, INT width, INT height); - -GpStatus WINGDIPAPI -GdipAddPathPieI(GpPath *path, INT x, INT y, INT width, INT height, - REAL startAngle, REAL sweepAngle); - -GpStatus WINGDIPAPI -GdipAddPathPolygonI(GpPath *path, GDIPCONST GpPoint *points, INT count); - -GpStatus WINGDIPAPI -GdipFlattenPath(GpPath *path, GpMatrix* matrix, REAL flatness); - -GpStatus WINGDIPAPI -GdipWindingModeOutline( - GpPath *path, - GpMatrix *matrix, - REAL flatness -); - - -#ifdef DCR_USE_NEW_202903 - -GpStatus WINGDIPAPI -GdipWidenPath( - GpPath *nativePath, - GpPen *pen, - GpMatrix *matrix, - REAL flatness -); - -#else - -GpStatus WINGDIPAPI -GdipWidenPathWithMinimumResolutions(GpPath *path, GpPen *pen, REAL minXres, - REAL minYres, GpMatrix *matrix, BOOL removeSelftIntersects); - -#endif - -GpStatus WINGDIPAPI -GdipWarpPath(GpPath *path, GpMatrix* matrix, - GDIPCONST GpPointF *points, INT count, - REAL srcx, REAL srcy, REAL srcwidth, REAL srcheight, - WarpMode warpMode, REAL flatness); - -GpStatus WINGDIPAPI -GdipTransformPath(GpPath* path, GpMatrix* matrix); - -GpStatus WINGDIPAPI -GdipGetPathWorldBounds(GpPath* path, GpRectF* bounds, GDIPCONST GpMatrix *matrix, - GDIPCONST GpPen *pen); - -GpStatus WINGDIPAPI -GdipGetPathWorldBoundsI(GpPath* path, GpRect* bounds, GDIPCONST GpMatrix *matrix, - GDIPCONST GpPen *pen); - -GpStatus WINGDIPAPI -GdipIsVisiblePathPoint(GpPath* path, REAL x, REAL y, - GpGraphics *graphics, BOOL *result); - -GpStatus WINGDIPAPI -GdipIsVisiblePathPointI(GpPath* path, INT x, INT y, - GpGraphics *graphics, BOOL *result); - -GpStatus WINGDIPAPI -GdipIsOutlineVisiblePathPoint(GpPath* path, REAL x, REAL y, GpPen *pen, - GpGraphics *graphics, BOOL *result); - -GpStatus WINGDIPAPI -GdipIsOutlineVisiblePathPointI(GpPath* path, INT x, INT y, GpPen *pen, - GpGraphics *graphics, BOOL *result); - - -//---------------------------------------------------------------------------- -// Path Enumeration methods -//---------------------------------------------------------------------------- - -GpStatus WINGDIPAPI -GdipCreatePathIter(GpPathIterator **iterator, GpPath* path); - -GpStatus WINGDIPAPI -GdipDeletePathIter(GpPathIterator *iterator); - -GpStatus WINGDIPAPI -GdipPathIterNextSubpath(GpPathIterator* iterator, INT *resultCount, - INT* startIndex, INT* endIndex, BOOL* isClosed); - -GpStatus WINGDIPAPI -GdipPathIterNextSubpathPath(GpPathIterator* iterator, INT* resultCount, - GpPath* path, BOOL* isClosed); - -GpStatus WINGDIPAPI -GdipPathIterNextPathType(GpPathIterator* iterator, INT* resultCount, - BYTE* pathType, INT* startIndex, INT* endIndex); - -GpStatus WINGDIPAPI -GdipPathIterNextMarker(GpPathIterator* iterator, INT *resultCount, - INT* startIndex, INT* endIndex); - -GpStatus WINGDIPAPI -GdipPathIterNextMarkerPath(GpPathIterator* iterator, INT* resultCount, - GpPath* path); - -GpStatus WINGDIPAPI -GdipPathIterGetCount(GpPathIterator* iterator, INT* count); - -GpStatus WINGDIPAPI -GdipPathIterGetSubpathCount(GpPathIterator* iterator, INT* count); - -GpStatus WINGDIPAPI -GdipPathIterIsValid(GpPathIterator* iterator, BOOL* valid); - -GpStatus WINGDIPAPI -GdipPathIterHasCurve(GpPathIterator* iterator, BOOL* hasCurve); - -GpStatus WINGDIPAPI -GdipPathIterRewind(GpPathIterator* iterator); - -GpStatus WINGDIPAPI -GdipPathIterEnumerate(GpPathIterator* iterator, INT* resultCount, - GpPointF *points, BYTE *types, INT count); - -GpStatus WINGDIPAPI -GdipPathIterCopyData(GpPathIterator* iterator, INT* resultCount, - GpPointF* points, BYTE* types, INT startIndex, INT endIndex); - -//---------------------------------------------------------------------------- -// Matrix methods -//---------------------------------------------------------------------------- - -GpStatus WINGDIPAPI -GdipCreateMatrix(GpMatrix **matrix); - -GpStatus WINGDIPAPI -GdipCreateMatrix2(REAL m11, REAL m12, REAL m21, REAL m22, REAL dx, - REAL dy, GpMatrix **matrix); - -GpStatus WINGDIPAPI -GdipCreateMatrix3(GDIPCONST GpRectF *rect, GDIPCONST GpPointF *dstplg, - GpMatrix **matrix); - -GpStatus WINGDIPAPI -GdipCreateMatrix3I(GDIPCONST GpRect *rect, GDIPCONST GpPoint *dstplg, - GpMatrix **matrix); - -GpStatus WINGDIPAPI -GdipCloneMatrix(GpMatrix *matrix, GpMatrix **cloneMatrix); - -GpStatus WINGDIPAPI -GdipDeleteMatrix(GpMatrix *matrix); - -GpStatus WINGDIPAPI -GdipSetMatrixElements(GpMatrix *matrix, REAL m11, REAL m12, REAL m21, REAL m22, - REAL dx, REAL dy); - -GpStatus WINGDIPAPI -GdipMultiplyMatrix(GpMatrix *matrix, GpMatrix* matrix2, - GpMatrixOrder order); - -GpStatus WINGDIPAPI -GdipTranslateMatrix(GpMatrix *matrix, REAL offsetX, REAL offsetY, - GpMatrixOrder order); - -GpStatus WINGDIPAPI -GdipScaleMatrix(GpMatrix *matrix, REAL scaleX, REAL scaleY, - GpMatrixOrder order); - -GpStatus WINGDIPAPI -GdipRotateMatrix(GpMatrix *matrix, REAL angle, GpMatrixOrder order); - -GpStatus WINGDIPAPI -GdipShearMatrix(GpMatrix *matrix, REAL shearX, REAL shearY, - GpMatrixOrder order); - -GpStatus WINGDIPAPI -GdipInvertMatrix(GpMatrix *matrix); - -GpStatus WINGDIPAPI -GdipTransformMatrixPoints(GpMatrix *matrix, GpPointF *pts, INT count); - -GpStatus WINGDIPAPI -GdipTransformMatrixPointsI(GpMatrix *matrix, GpPoint *pts, INT count); - -GpStatus WINGDIPAPI -GdipVectorTransformMatrixPoints(GpMatrix *matrix, GpPointF *pts, - INT count); - -GpStatus WINGDIPAPI -GdipVectorTransformMatrixPointsI(GpMatrix *matrix, GpPoint *pts, - INT count); - -GpStatus WINGDIPAPI -GdipGetMatrixElements(GDIPCONST GpMatrix *matrix, REAL *matrixOut); - -GpStatus WINGDIPAPI -GdipIsMatrixInvertible(GDIPCONST GpMatrix *matrix, BOOL *result); - -GpStatus WINGDIPAPI -GdipIsMatrixIdentity(GDIPCONST GpMatrix *matrix, BOOL *result); - -GpStatus WINGDIPAPI -GdipIsMatrixEqual(GDIPCONST GpMatrix *matrix, GDIPCONST GpMatrix *matrix2, BOOL *result); - -//---------------------------------------------------------------------------- -// Region methods -//---------------------------------------------------------------------------- - -GpStatus WINGDIPAPI -GdipCreateRegion(GpRegion **region); - -GpStatus WINGDIPAPI -GdipCreateRegionRect(GDIPCONST GpRectF *rect, GpRegion **region); - -GpStatus WINGDIPAPI -GdipCreateRegionRectI(GDIPCONST GpRect *rect, GpRegion **region); - -GpStatus WINGDIPAPI -GdipCreateRegionPath(GpPath *path, GpRegion **region); - -GpStatus WINGDIPAPI -GdipCreateRegionRgnData(GDIPCONST BYTE *regionData, INT size, GpRegion **region); - -GpStatus WINGDIPAPI -GdipCreateRegionHrgn(HRGN hRgn, GpRegion **region); - -GpStatus WINGDIPAPI -GdipCloneRegion(GpRegion *region, GpRegion **cloneRegion); - -GpStatus WINGDIPAPI -GdipDeleteRegion(GpRegion *region); - -GpStatus WINGDIPAPI -GdipSetInfinite(GpRegion *region); - -GpStatus WINGDIPAPI -GdipSetEmpty(GpRegion *region); - -GpStatus WINGDIPAPI -GdipCombineRegionRect(GpRegion *region, GDIPCONST GpRectF *rect, - CombineMode combineMode); - -GpStatus WINGDIPAPI -GdipCombineRegionRectI(GpRegion *region, GDIPCONST GpRect *rect, - CombineMode combineMode); - -GpStatus WINGDIPAPI -GdipCombineRegionPath(GpRegion *region, GpPath *path, CombineMode combineMode); - -GpStatus WINGDIPAPI -GdipCombineRegionRegion(GpRegion *region, GpRegion *region2, - CombineMode combineMode); - -GpStatus WINGDIPAPI -GdipTranslateRegion(GpRegion *region, REAL dx, REAL dy); - -GpStatus WINGDIPAPI -GdipTranslateRegionI(GpRegion *region, INT dx, INT dy); - -GpStatus WINGDIPAPI -GdipTransformRegion(GpRegion *region, GpMatrix *matrix); - -GpStatus WINGDIPAPI -GdipGetRegionBounds(GpRegion *region, GpGraphics *graphics, - GpRectF *rect); - -GpStatus WINGDIPAPI -GdipGetRegionBoundsI(GpRegion *region, GpGraphics *graphics, - GpRect *rect); - -GpStatus WINGDIPAPI -GdipGetRegionHRgn(GpRegion *region, GpGraphics *graphics, HRGN *hRgn); - -GpStatus WINGDIPAPI -GdipIsEmptyRegion(GpRegion *region, GpGraphics *graphics, - BOOL *result); - -GpStatus WINGDIPAPI -GdipIsInfiniteRegion(GpRegion *region, GpGraphics *graphics, - BOOL *result); - -GpStatus WINGDIPAPI -GdipIsEqualRegion(GpRegion *region, GpRegion *region2, - GpGraphics *graphics, BOOL *result); - -GpStatus WINGDIPAPI -GdipGetRegionDataSize(GpRegion *region, UINT * bufferSize); - -GpStatus WINGDIPAPI -GdipGetRegionData(GpRegion *region, BYTE * buffer, UINT bufferSize, UINT * sizeFilled); - -GpStatus WINGDIPAPI -GdipIsVisibleRegionPoint(GpRegion *region, REAL x, REAL y, - GpGraphics *graphics, BOOL *result); - -GpStatus WINGDIPAPI -GdipIsVisibleRegionPointI(GpRegion *region, INT x, INT y, - GpGraphics *graphics, BOOL *result); - -GpStatus WINGDIPAPI -GdipIsVisibleRegionRect(GpRegion *region, REAL x, REAL y, REAL width, - REAL height, GpGraphics *graphics, BOOL *result); - -GpStatus WINGDIPAPI -GdipIsVisibleRegionRectI(GpRegion *region, INT x, INT y, INT width, - INT height, GpGraphics *graphics, BOOL *result); - -GpStatus WINGDIPAPI -GdipGetRegionScansCount(GpRegion *region, UINT* count, GpMatrix* matrix); - -GpStatus WINGDIPAPI -GdipGetRegionScans(GpRegion *region, GpRectF* rects, INT* count, GpMatrix* matrix); - -GpStatus WINGDIPAPI -GdipGetRegionScansI(GpRegion *region, GpRect* rects, INT* count, GpMatrix* matrix); - -//---------------------------------------------------------------------------- -// Brush methods -//---------------------------------------------------------------------------- - -GpStatus WINGDIPAPI -GdipCloneBrush(GpBrush *brush, GpBrush **cloneBrush); - -GpStatus WINGDIPAPI -GdipDeleteBrush(GpBrush *brush); - -GpStatus WINGDIPAPI -GdipGetBrushType(GpBrush *brush, GpBrushType *type); - -//---------------------------------------------------------------------------- -// Hatch Brush methods -//---------------------------------------------------------------------------- - -GpStatus WINGDIPAPI -GdipCreateHatchBrush(GpHatchStyle hatchstyle, ARGB forecol, - ARGB backcol, GpHatch **brush); - -GpStatus WINGDIPAPI -GdipGetHatchStyle(GpHatch *brush, GpHatchStyle *hatchstyle); - -GpStatus WINGDIPAPI -GdipGetHatchForegroundColor(GpHatch *brush, ARGB* forecol); - -GpStatus WINGDIPAPI -GdipGetHatchBackgroundColor(GpHatch *brush, ARGB* backcol); - -//---------------------------------------------------------------------------- -// Texture Brush methods -//---------------------------------------------------------------------------- - -GpStatus WINGDIPAPI -GdipCreateTexture(GpImage *image, GpWrapMode wrapmode, - GpTexture **texture); - -GpStatus WINGDIPAPI -GdipCreateTexture2(GpImage *image, GpWrapMode wrapmode, REAL x, - REAL y, REAL width, REAL height, GpTexture **texture); - -GpStatus WINGDIPAPI -GdipCreateTextureIA(GpImage *image, GDIPCONST GpImageAttributes *imageAttributes, - REAL x, REAL y, REAL width, REAL height, - GpTexture **texture); - -GpStatus WINGDIPAPI -GdipCreateTexture2I(GpImage *image, GpWrapMode wrapmode, INT x, - INT y, INT width, INT height, GpTexture **texture); - -GpStatus WINGDIPAPI -GdipCreateTextureIAI(GpImage *image, GDIPCONST GpImageAttributes *imageAttributes, - INT x, INT y, INT width, INT height, - GpTexture **texture); - - -GpStatus WINGDIPAPI -GdipGetTextureTransform(GpTexture *brush, GpMatrix *matrix); - -GpStatus WINGDIPAPI -GdipSetTextureTransform(GpTexture *brush, GDIPCONST GpMatrix *matrix); - -GpStatus WINGDIPAPI -GdipResetTextureTransform(GpTexture* brush); - -GpStatus WINGDIPAPI -GdipMultiplyTextureTransform(GpTexture* brush, GDIPCONST GpMatrix *matrix, - GpMatrixOrder order); - -GpStatus WINGDIPAPI -GdipTranslateTextureTransform(GpTexture* brush, REAL dx, REAL dy, - GpMatrixOrder order); - -GpStatus WINGDIPAPI -GdipScaleTextureTransform(GpTexture* brush, REAL sx, REAL sy, - GpMatrixOrder order); - -GpStatus WINGDIPAPI -GdipRotateTextureTransform(GpTexture* brush, REAL angle, GpMatrixOrder order); - -GpStatus WINGDIPAPI -GdipSetTextureWrapMode(GpTexture *brush, GpWrapMode wrapmode); - -GpStatus WINGDIPAPI -GdipGetTextureWrapMode(GpTexture *brush, GpWrapMode *wrapmode); - -GpStatus WINGDIPAPI -GdipGetTextureImage(GpTexture *brush, GpImage **image); - -//---------------------------------------------------------------------------- -// Solid Brush methods -//---------------------------------------------------------------------------- - -GpStatus WINGDIPAPI -GdipCreateSolidFill(ARGB color, GpSolidFill **brush); - -GpStatus WINGDIPAPI -GdipSetSolidFillColor(GpSolidFill *brush, ARGB color); - -GpStatus WINGDIPAPI -GdipGetSolidFillColor(GpSolidFill *brush, ARGB *color); - -//---------------------------------------------------------------------------- -// LineBrush methods -//---------------------------------------------------------------------------- - -GpStatus WINGDIPAPI -GdipCreateLineBrush(GDIPCONST GpPointF* point1, - GDIPCONST GpPointF* point2, - ARGB color1, ARGB color2, - GpWrapMode wrapMode, - GpLineGradient **lineGradient); - -GpStatus WINGDIPAPI -GdipCreateLineBrushI(GDIPCONST GpPoint* point1, - GDIPCONST GpPoint* point2, - ARGB color1, ARGB color2, - GpWrapMode wrapMode, - GpLineGradient **lineGradient); - -GpStatus WINGDIPAPI -GdipCreateLineBrushFromRect(GDIPCONST GpRectF* rect, - ARGB color1, ARGB color2, - LinearGradientMode mode, - GpWrapMode wrapMode, - GpLineGradient **lineGradient); - -GpStatus WINGDIPAPI -GdipCreateLineBrushFromRectI(GDIPCONST GpRect* rect, - ARGB color1, ARGB color2, - LinearGradientMode mode, - GpWrapMode wrapMode, - GpLineGradient **lineGradient); - -GpStatus WINGDIPAPI -GdipCreateLineBrushFromRectWithAngle(GDIPCONST GpRectF* rect, - ARGB color1, ARGB color2, - REAL angle, - BOOL isAngleScalable, - GpWrapMode wrapMode, - GpLineGradient **lineGradient); - -GpStatus WINGDIPAPI -GdipCreateLineBrushFromRectWithAngleI(GDIPCONST GpRect* rect, - ARGB color1, ARGB color2, - REAL angle, - BOOL isAngleScalable, - GpWrapMode wrapMode, - GpLineGradient **lineGradient); - -GpStatus WINGDIPAPI -GdipSetLinePoints(GpLineGradient *brush, - GDIPCONST GpPointF* point1, - GDIPCONST GpPointF* point2); - -GpStatus WINGDIPAPI -GdipSetLinePointsI(GpLineGradient *brush, - GDIPCONST GpPoint* point1, - GDIPCONST GpPoint* point2); - -GpStatus WINGDIPAPI -GdipGetLinePoints(GpLineGradient *brush, GpPointF* points); - -GpStatus WINGDIPAPI -GdipGetLinePointsI(GpLineGradient *brush, GpPoint* points); - -GpStatus WINGDIPAPI -GdipSetLineColors(GpLineGradient *brush, ARGB color1, ARGB color2); - -GpStatus WINGDIPAPI -GdipGetLineColors(GpLineGradient *brush, ARGB* colors); - -GpStatus WINGDIPAPI -GdipGetLineRect(GpLineGradient *brush, GpRectF *rect); - -GpStatus WINGDIPAPI -GdipGetLineRectI(GpLineGradient *brush, GpRect *rect); - -GpStatus WINGDIPAPI -GdipSetLineGammaCorrection(GpLineGradient *brush, BOOL useGammaCorrection); - -GpStatus WINGDIPAPI -GdipGetLineGammaCorrection(GpLineGradient *brush, BOOL *useGammaCorrection); - -GpStatus WINGDIPAPI -GdipGetLineBlendCount(GpLineGradient *brush, INT *count); - -GpStatus WINGDIPAPI -GdipGetLineBlend(GpLineGradient *brush, REAL *blend, REAL* positions, - INT count); - -GpStatus WINGDIPAPI -GdipSetLineBlend(GpLineGradient *brush, GDIPCONST REAL *blend, - GDIPCONST REAL* positions, INT count); - -GpStatus WINGDIPAPI -GdipGetLinePresetBlendCount(GpLineGradient *brush, INT *count); - -GpStatus WINGDIPAPI -GdipGetLinePresetBlend(GpLineGradient *brush, ARGB *blend, - REAL* positions, INT count); - -GpStatus WINGDIPAPI -GdipSetLinePresetBlend(GpLineGradient *brush, GDIPCONST ARGB *blend, - GDIPCONST REAL* positions, INT count); - -GpStatus WINGDIPAPI -GdipSetLineSigmaBlend(GpLineGradient *brush, REAL focus, REAL scale); - -GpStatus WINGDIPAPI -GdipSetLineLinearBlend(GpLineGradient *brush, REAL focus, REAL scale); - -GpStatus WINGDIPAPI -GdipSetLineWrapMode(GpLineGradient *brush, GpWrapMode wrapmode); - -GpStatus WINGDIPAPI -GdipGetLineWrapMode(GpLineGradient *brush, GpWrapMode *wrapmode); - -GpStatus WINGDIPAPI -GdipGetLineTransform(GpLineGradient *brush, GpMatrix *matrix); - -GpStatus WINGDIPAPI -GdipSetLineTransform(GpLineGradient *brush, GDIPCONST GpMatrix *matrix); - -GpStatus WINGDIPAPI -GdipResetLineTransform(GpLineGradient* brush); - -GpStatus WINGDIPAPI -GdipMultiplyLineTransform(GpLineGradient* brush, GDIPCONST GpMatrix *matrix, - GpMatrixOrder order); - -GpStatus WINGDIPAPI -GdipTranslateLineTransform(GpLineGradient* brush, REAL dx, REAL dy, - GpMatrixOrder order); - -GpStatus WINGDIPAPI -GdipScaleLineTransform(GpLineGradient* brush, REAL sx, REAL sy, - GpMatrixOrder order); - -GpStatus WINGDIPAPI -GdipRotateLineTransform(GpLineGradient* brush, REAL angle, GpMatrixOrder order); - -//---------------------------------------------------------------------------- -// PathGradient Brush -//---------------------------------------------------------------------------- - -GpStatus WINGDIPAPI -GdipCreatePathGradient(GDIPCONST GpPointF* points, - INT count, - GpWrapMode wrapMode, - GpPathGradient **polyGradient); - -GpStatus WINGDIPAPI -GdipCreatePathGradientI(GDIPCONST GpPoint* points, - INT count, - GpWrapMode wrapMode, - GpPathGradient **polyGradient); - -GpStatus WINGDIPAPI -GdipCreatePathGradientFromPath(GDIPCONST GpPath* path, - GpPathGradient **polyGradient); - -GpStatus WINGDIPAPI -GdipGetPathGradientCenterColor( - GpPathGradient *brush, ARGB* colors); - -GpStatus WINGDIPAPI -GdipSetPathGradientCenterColor( - GpPathGradient *brush, ARGB colors); - -GpStatus WINGDIPAPI -GdipGetPathGradientSurroundColorsWithCount( - GpPathGradient *brush, ARGB* color, INT* count); - -GpStatus WINGDIPAPI -GdipSetPathGradientSurroundColorsWithCount( - GpPathGradient *brush, - GDIPCONST ARGB* color, INT* count); - -GpStatus WINGDIPAPI -GdipGetPathGradientPath(GpPathGradient *brush, GpPath *path); - -GpStatus WINGDIPAPI -GdipSetPathGradientPath(GpPathGradient *brush, GDIPCONST GpPath *path); - -GpStatus WINGDIPAPI -GdipGetPathGradientCenterPoint( - GpPathGradient *brush, GpPointF* points); - -GpStatus WINGDIPAPI -GdipGetPathGradientCenterPointI( - GpPathGradient *brush, GpPoint* points); - -GpStatus WINGDIPAPI -GdipSetPathGradientCenterPoint( - GpPathGradient *brush, GDIPCONST GpPointF* points); - -GpStatus WINGDIPAPI -GdipSetPathGradientCenterPointI( - GpPathGradient *brush, GDIPCONST GpPoint* points); - -GpStatus WINGDIPAPI -GdipGetPathGradientRect(GpPathGradient *brush, GpRectF *rect); - -GpStatus WINGDIPAPI -GdipGetPathGradientRectI(GpPathGradient *brush, GpRect *rect); - -GpStatus WINGDIPAPI -GdipGetPathGradientPointCount(GpPathGradient *brush, INT* count); - -GpStatus WINGDIPAPI -GdipGetPathGradientSurroundColorCount(GpPathGradient *brush, INT* count); - -GpStatus WINGDIPAPI -GdipSetPathGradientGammaCorrection(GpPathGradient *brush, BOOL useGammaCorrection); - -GpStatus WINGDIPAPI -GdipGetPathGradientGammaCorrection(GpPathGradient *brush, BOOL *useGammaCorrection); - -GpStatus WINGDIPAPI -GdipGetPathGradientBlendCount(GpPathGradient *brush, - INT *count); - -GpStatus WINGDIPAPI -GdipGetPathGradientBlend(GpPathGradient *brush, - REAL *blend, REAL *positions, INT count); - -GpStatus WINGDIPAPI -GdipSetPathGradientBlend(GpPathGradient *brush, - GDIPCONST REAL *blend, GDIPCONST REAL *positions, INT count); - -GpStatus WINGDIPAPI -GdipGetPathGradientPresetBlendCount(GpPathGradient *brush, INT *count); - -GpStatus WINGDIPAPI -GdipGetPathGradientPresetBlend(GpPathGradient *brush, ARGB *blend, - REAL* positions, INT count); - -GpStatus WINGDIPAPI -GdipSetPathGradientPresetBlend(GpPathGradient *brush, GDIPCONST ARGB *blend, - GDIPCONST REAL* positions, INT count); - -GpStatus WINGDIPAPI -GdipSetPathGradientSigmaBlend(GpPathGradient *brush, REAL focus, REAL scale); - -GpStatus WINGDIPAPI -GdipSetPathGradientLinearBlend(GpPathGradient *brush, REAL focus, REAL scale); - -GpStatus WINGDIPAPI -GdipGetPathGradientWrapMode(GpPathGradient *brush, - GpWrapMode *wrapmode); - -GpStatus WINGDIPAPI -GdipSetPathGradientWrapMode(GpPathGradient *brush, - GpWrapMode wrapmode); - -GpStatus WINGDIPAPI -GdipGetPathGradientTransform(GpPathGradient *brush, - GpMatrix *matrix); - -GpStatus WINGDIPAPI -GdipSetPathGradientTransform(GpPathGradient *brush, - GpMatrix *matrix); - -GpStatus WINGDIPAPI -GdipResetPathGradientTransform(GpPathGradient* brush); - -GpStatus WINGDIPAPI -GdipMultiplyPathGradientTransform(GpPathGradient* brush, GDIPCONST GpMatrix *matrix, - GpMatrixOrder order); - -GpStatus WINGDIPAPI -GdipTranslatePathGradientTransform(GpPathGradient* brush, REAL dx, REAL dy, - GpMatrixOrder order); - -GpStatus WINGDIPAPI -GdipScalePathGradientTransform(GpPathGradient* brush, REAL sx, REAL sy, - GpMatrixOrder order); - -GpStatus WINGDIPAPI -GdipRotatePathGradientTransform(GpPathGradient* brush, REAL angle, - GpMatrixOrder order); - -GpStatus WINGDIPAPI -GdipGetPathGradientFocusScales(GpPathGradient *brush, REAL* xScale, REAL* yScale); - -GpStatus WINGDIPAPI -GdipSetPathGradientFocusScales(GpPathGradient *brush, REAL xScale, REAL yScale); - -//---------------------------------------------------------------------------- -// Pen methods -//---------------------------------------------------------------------------- - -GpStatus WINGDIPAPI -GdipCreatePen1(ARGB color, REAL width, GpUnit unit, GpPen **pen); - -GpStatus WINGDIPAPI -GdipCreatePen2(GpBrush *brush, REAL width, GpUnit unit, - GpPen **pen); - -GpStatus WINGDIPAPI -GdipClonePen(GpPen *pen, GpPen **clonepen); - -GpStatus WINGDIPAPI -GdipDeletePen(GpPen *pen); - -GpStatus WINGDIPAPI -GdipSetPenWidth(GpPen *pen, REAL width); - -GpStatus WINGDIPAPI -GdipGetPenWidth(GpPen *pen, REAL *width); - -GpStatus WINGDIPAPI -GdipSetPenUnit(GpPen *pen, GpUnit unit); - -GpStatus WINGDIPAPI -GdipGetPenUnit(GpPen *pen, GpUnit *unit); - -#ifdef DCR_USE_NEW_197819 -GpStatus WINGDIPAPI -GdipSetPenLineCap197819(GpPen *pen, GpLineCap startCap, GpLineCap endCap, - GpDashCap dashCap); -#else -GpStatus WINGDIPAPI -GdipSetPenLineCap(GpPen *pen, GpLineCap startCap, GpLineCap endCap, - GpLineCap dashCap); -#endif // DCR_USE_NEW_197819 - - -GpStatus WINGDIPAPI -GdipSetPenStartCap(GpPen *pen, GpLineCap startCap); - -GpStatus WINGDIPAPI -GdipSetPenEndCap(GpPen *pen, GpLineCap endCap); - -#ifdef DCR_USE_NEW_197819 -GpStatus WINGDIPAPI -GdipSetPenDashCap197819(GpPen *pen, GpDashCap dashCap); -#else -GpStatus WINGDIPAPI -GdipSetPenDashCap(GpPen *pen, GpLineCap dashCap); -#endif // DCR_USE_NEW_197819 - -GpStatus WINGDIPAPI -GdipGetPenStartCap(GpPen *pen, GpLineCap *startCap); - -GpStatus WINGDIPAPI -GdipGetPenEndCap(GpPen *pen, GpLineCap *endCap); - -#ifdef DCR_USE_NEW_197819 -GpStatus WINGDIPAPI -GdipGetPenDashCap197819(GpPen *pen, GpDashCap *dashCap); -#else -GpStatus WINGDIPAPI -GdipGetPenDashCap(GpPen *pen, GpLineCap *dashCap); -#endif // DCR_USE_NEW_197819 - -GpStatus WINGDIPAPI -GdipSetPenLineJoin(GpPen *pen, GpLineJoin lineJoin); - -GpStatus WINGDIPAPI -GdipGetPenLineJoin(GpPen *pen, GpLineJoin *lineJoin); - -GpStatus WINGDIPAPI -GdipSetPenCustomStartCap(GpPen *pen, GpCustomLineCap* customCap); - -GpStatus WINGDIPAPI -GdipGetPenCustomStartCap(GpPen *pen, GpCustomLineCap** customCap); - -GpStatus WINGDIPAPI -GdipSetPenCustomEndCap(GpPen *pen, GpCustomLineCap* customCap); - -GpStatus WINGDIPAPI -GdipGetPenCustomEndCap(GpPen *pen, GpCustomLineCap** customCap); - -GpStatus WINGDIPAPI -GdipSetPenMiterLimit(GpPen *pen, REAL miterLimit); - -GpStatus WINGDIPAPI -GdipGetPenMiterLimit(GpPen *pen, REAL *miterLimit); - -GpStatus WINGDIPAPI -GdipSetPenMode(GpPen *pen, GpPenAlignment penMode); - -GpStatus WINGDIPAPI -GdipGetPenMode(GpPen *pen, GpPenAlignment *penMode); - -GpStatus WINGDIPAPI -GdipSetPenTransform(GpPen *pen, GpMatrix *matrix); - -GpStatus WINGDIPAPI -GdipGetPenTransform(GpPen *pen, GpMatrix *matrix); - -GpStatus WINGDIPAPI -GdipResetPenTransform(GpPen *pen); - -GpStatus WINGDIPAPI -GdipMultiplyPenTransform(GpPen *pen, GDIPCONST GpMatrix *matrix, - GpMatrixOrder order); - -GpStatus WINGDIPAPI -GdipTranslatePenTransform(GpPen *pen, REAL dx, REAL dy, - GpMatrixOrder order); - -GpStatus WINGDIPAPI -GdipScalePenTransform(GpPen *pen, REAL sx, REAL sy, - GpMatrixOrder order); - -GpStatus WINGDIPAPI -GdipRotatePenTransform(GpPen *pen, REAL angle, GpMatrixOrder order); - -GpStatus WINGDIPAPI -GdipSetPenColor(GpPen *pen, ARGB argb); - -GpStatus WINGDIPAPI -GdipGetPenColor(GpPen *pen, ARGB *argb); - -GpStatus WINGDIPAPI -GdipSetPenBrushFill(GpPen *pen, GpBrush *brush); - -GpStatus WINGDIPAPI -GdipGetPenBrushFill(GpPen *pen, GpBrush **brush); - -GpStatus WINGDIPAPI -GdipGetPenFillType(GpPen *pen, GpPenType* type); - -GpStatus WINGDIPAPI -GdipGetPenDashStyle(GpPen *pen, GpDashStyle *dashstyle); - -GpStatus WINGDIPAPI -GdipSetPenDashStyle(GpPen *pen, GpDashStyle dashstyle); - -GpStatus WINGDIPAPI -GdipGetPenDashOffset(GpPen *pen, REAL *offset); - -GpStatus WINGDIPAPI -GdipSetPenDashOffset(GpPen *pen, REAL offset); - -GpStatus WINGDIPAPI -GdipGetPenDashCount(GpPen *pen, INT *count); - -GpStatus WINGDIPAPI -GdipSetPenDashArray(GpPen *pen, GDIPCONST REAL *dash, INT count); - -GpStatus WINGDIPAPI -GdipGetPenDashArray(GpPen *pen, REAL *dash, INT count); - -GpStatus WINGDIPAPI -GdipGetPenCompoundCount(GpPen *pen, INT *count); - -GpStatus WINGDIPAPI -GdipSetPenCompoundArray(GpPen *pen, GDIPCONST REAL *dash, INT count); - -GpStatus WINGDIPAPI -GdipGetPenCompoundArray(GpPen *pen, REAL *dash, INT count); - -//---------------------------------------------------------------------------- -// CustomLineCap methods -//---------------------------------------------------------------------------- - -GpStatus WINGDIPAPI -GdipCreateCustomLineCap(GpPath* fillPath, GpPath* strokePath, - GpLineCap baseCap, REAL baseInset, GpCustomLineCap **customCap); - -GpStatus WINGDIPAPI -GdipDeleteCustomLineCap(GpCustomLineCap* customCap); - -GpStatus WINGDIPAPI -GdipCloneCustomLineCap(GpCustomLineCap* customCap, - GpCustomLineCap** clonedCap); - -GpStatus WINGDIPAPI -GdipGetCustomLineCapType(GpCustomLineCap* customCap, - CustomLineCapType* capType); - -GpStatus WINGDIPAPI -GdipSetCustomLineCapStrokeCaps(GpCustomLineCap* customCap, - GpLineCap startCap, GpLineCap endCap); - -GpStatus WINGDIPAPI -GdipGetCustomLineCapStrokeCaps(GpCustomLineCap* customCap, - GpLineCap* startCap, GpLineCap* endCap); - -GpStatus WINGDIPAPI -GdipSetCustomLineCapStrokeJoin(GpCustomLineCap* customCap, GpLineJoin lineJoin); - -GpStatus WINGDIPAPI -GdipGetCustomLineCapStrokeJoin(GpCustomLineCap* customCap, GpLineJoin* lineJoin); - -GpStatus WINGDIPAPI -GdipSetCustomLineCapBaseCap(GpCustomLineCap* customCap, GpLineCap baseCap); - -GpStatus WINGDIPAPI -GdipGetCustomLineCapBaseCap(GpCustomLineCap* customCap, GpLineCap* baseCap); - -GpStatus WINGDIPAPI -GdipSetCustomLineCapBaseInset(GpCustomLineCap* customCap, REAL inset); - -GpStatus WINGDIPAPI -GdipGetCustomLineCapBaseInset(GpCustomLineCap* customCap, REAL* inset); - -GpStatus WINGDIPAPI -GdipSetCustomLineCapWidthScale(GpCustomLineCap* customCap, REAL widthScale); - -GpStatus WINGDIPAPI -GdipGetCustomLineCapWidthScale(GpCustomLineCap* customCap, REAL* widthScale); - -//---------------------------------------------------------------------------- -// AdjustableArrowCap methods -//---------------------------------------------------------------------------- - -GpStatus WINGDIPAPI -GdipCreateAdjustableArrowCap(REAL height, REAL width, BOOL isFilled, - GpAdjustableArrowCap **cap); - -GpStatus WINGDIPAPI -GdipSetAdjustableArrowCapHeight(GpAdjustableArrowCap* cap, REAL height); - -GpStatus WINGDIPAPI -GdipGetAdjustableArrowCapHeight(GpAdjustableArrowCap* cap, REAL* height); - -GpStatus WINGDIPAPI -GdipSetAdjustableArrowCapWidth(GpAdjustableArrowCap* cap, REAL width); - -GpStatus WINGDIPAPI -GdipGetAdjustableArrowCapWidth(GpAdjustableArrowCap* cap, REAL* width); - -GpStatus WINGDIPAPI -GdipSetAdjustableArrowCapMiddleInset(GpAdjustableArrowCap* cap, REAL middleInset); - -GpStatus WINGDIPAPI -GdipGetAdjustableArrowCapMiddleInset(GpAdjustableArrowCap* cap, REAL* middleInset); - -GpStatus WINGDIPAPI -GdipSetAdjustableArrowCapFillState(GpAdjustableArrowCap* cap, BOOL fillState); - -GpStatus WINGDIPAPI -GdipGetAdjustableArrowCapFillState(GpAdjustableArrowCap* cap, BOOL* fillState); - -//---------------------------------------------------------------------------- -// Image methods -//---------------------------------------------------------------------------- - -GpStatus WINGDIPAPI -GdipLoadImageFromStream(IStream* stream, GpImage **image); - -GpStatus WINGDIPAPI -GdipLoadImageFromFile(GDIPCONST WCHAR* filename, GpImage **image); - -GpStatus WINGDIPAPI -GdipLoadImageFromStreamICM(IStream* stream, GpImage **image); - -GpStatus WINGDIPAPI -GdipLoadImageFromFileICM(GDIPCONST WCHAR* filename, GpImage **image); - -GpStatus WINGDIPAPI -GdipCloneImage(GpImage *image, GpImage **cloneImage); - -GpStatus WINGDIPAPI -GdipDisposeImage(GpImage *image); - -GpStatus WINGDIPAPI -GdipSaveImageToFile(GpImage *image, GDIPCONST WCHAR* filename, - GDIPCONST CLSID* clsidEncoder, GDIPCONST EncoderParameters* encoderParams); - -GpStatus WINGDIPAPI -GdipSaveImageToStream(GpImage *image, IStream* stream, - GDIPCONST CLSID* clsidEncoder, GDIPCONST EncoderParameters* encoderParams); - -GpStatus WINGDIPAPI -GdipSaveAdd(GpImage *image, GDIPCONST EncoderParameters* encoderParams); - -GpStatus WINGDIPAPI -GdipSaveAddImage(GpImage *image, GpImage* newImage, - GDIPCONST EncoderParameters* encoderParams); - -GpStatus WINGDIPAPI -GdipGetImageGraphicsContext(GpImage *image, GpGraphics **graphics); - -GpStatus WINGDIPAPI -GdipGetImageBounds(GpImage *image, GpRectF *srcRect, GpUnit *srcUnit); - -GpStatus WINGDIPAPI -GdipGetImageDimension(GpImage *image, REAL *width, REAL *height); - -GpStatus WINGDIPAPI -GdipGetImageType(GpImage *image, ImageType *type); - -GpStatus WINGDIPAPI -GdipGetImageWidth(GpImage *image, UINT *width); - -GpStatus WINGDIPAPI -GdipGetImageHeight(GpImage *image, UINT *height); - -GpStatus WINGDIPAPI -GdipGetImageHorizontalResolution(GpImage *image, REAL *resolution); - -GpStatus WINGDIPAPI -GdipGetImageVerticalResolution(GpImage *image, REAL *resolution); - -GpStatus WINGDIPAPI -GdipGetImageFlags(GpImage *image, UINT *flags); - -GpStatus WINGDIPAPI -GdipGetImageRawFormat(GpImage *image, GUID *format); - -GpStatus WINGDIPAPI -GdipGetImagePixelFormat(GpImage *image, PixelFormat *format); - -GpStatus WINGDIPAPI -GdipGetImageThumbnail(GpImage *image, UINT thumbWidth, UINT thumbHeight, - GpImage **thumbImage, - GetThumbnailImageAbort callback, VOID * callbackData); - -GpStatus WINGDIPAPI -GdipGetEncoderParameterListSize(GpImage *image, GDIPCONST CLSID* clsidEncoder, - UINT* size); - -GpStatus WINGDIPAPI -GdipGetEncoderParameterList(GpImage *image, GDIPCONST CLSID* clsidEncoder, - UINT size, EncoderParameters* buffer); - -GpStatus WINGDIPAPI -GdipImageGetFrameDimensionsCount(GpImage* image, UINT* count); - -GpStatus WINGDIPAPI -GdipImageGetFrameDimensionsList(GpImage* image, GUID* dimensionIDs, UINT count); - -GpStatus WINGDIPAPI -GdipImageGetFrameCount(GpImage *image, GDIPCONST GUID* dimensionID, UINT* count); - -GpStatus WINGDIPAPI -GdipImageSelectActiveFrame(GpImage *image, GDIPCONST GUID* dimensionID, - UINT frameIndex); - -GpStatus WINGDIPAPI -GdipImageRotateFlip(GpImage *image, RotateFlipType rfType); - -GpStatus WINGDIPAPI -GdipGetImagePalette(GpImage *image, ColorPalette *palette, INT size); - -GpStatus WINGDIPAPI -GdipSetImagePalette(GpImage *image, GDIPCONST ColorPalette *palette); - -GpStatus WINGDIPAPI -GdipGetImagePaletteSize(GpImage *image, INT *size); - -GpStatus WINGDIPAPI -GdipGetPropertyCount(GpImage *image, UINT* numOfProperty); - -GpStatus WINGDIPAPI -GdipGetPropertyIdList(GpImage *image, UINT numOfProperty, PROPID* list); - -GpStatus WINGDIPAPI -GdipGetPropertyItemSize(GpImage *image, PROPID propId, UINT* size); - -GpStatus WINGDIPAPI -GdipGetPropertyItem(GpImage *image, PROPID propId,UINT propSize, - PropertyItem* buffer); - -GpStatus WINGDIPAPI -GdipGetPropertySize(GpImage *image, UINT* totalBufferSize, UINT* numProperties); - -GpStatus WINGDIPAPI -GdipGetAllPropertyItems(GpImage *image, UINT totalBufferSize, - UINT numProperties, PropertyItem* allItems); - -GpStatus WINGDIPAPI -GdipRemovePropertyItem(GpImage *image, PROPID propId); - -GpStatus WINGDIPAPI -GdipSetPropertyItem(GpImage *image, GDIPCONST PropertyItem* item); - -GpStatus WINGDIPAPI -GdipImageForceValidation(GpImage *image); - -GpStatus WINGDIPAPI -GdipGetImageLayout(GpImage *image, ImageLayout* layout); - -GpStatus WINGDIPAPI -GdipSetImageLayout(GpImage *image, GDIPCONST ImageLayout layout); - -//---------------------------------------------------------------------------- -// Bitmap methods -//---------------------------------------------------------------------------- - -GpStatus WINGDIPAPI -GdipCreateBitmapFromStream(IStream* stream, GpBitmap **bitmap); - -GpStatus WINGDIPAPI -GdipCreateBitmapFromFile(GDIPCONST WCHAR* filename, GpBitmap **bitmap); - -GpStatus WINGDIPAPI -GdipCreateBitmapFromStreamICM(IStream* stream, GpBitmap **bitmap); - -GpStatus WINGDIPAPI -GdipCreateBitmapFromFileICM(GDIPCONST WCHAR* filename, GpBitmap **bitmap); - -GpStatus WINGDIPAPI -GdipCreateBitmapFromScan0(INT width, - INT height, - INT stride, - PixelFormat format, - BYTE* scan0, - GpBitmap** bitmap); - -GpStatus WINGDIPAPI -GdipCreateBitmapFromGraphics(INT width, - INT height, - GpGraphics* target, - GpBitmap** bitmap); - -GpStatus WINGDIPAPI -GdipCreateBitmapFromDirectDrawSurface(IDirectDrawSurface7* surface, - GpBitmap** bitmap); - -GpStatus WINGDIPAPI -GdipCreateBitmapFromGdiDib(GDIPCONST BITMAPINFO* gdiBitmapInfo, - VOID* gdiBitmapData, - GpBitmap** bitmap); - -GpStatus WINGDIPAPI -GdipCreateBitmapFromHBITMAP(HBITMAP hbm, - HPALETTE hpal, - GpBitmap** bitmap); - -GpStatus WINGDIPAPI -GdipCreateHBITMAPFromBitmap(GpBitmap* bitmap, - HBITMAP* hbmReturn, - ARGB background); - -GpStatus WINGDIPAPI -GdipCreateBitmapFromHICON(HICON hicon, - GpBitmap** bitmap); - -GpStatus WINGDIPAPI -GdipCreateHICONFromBitmap(GpBitmap* bitmap, - HICON* hbmReturn); - -GpStatus WINGDIPAPI -GdipCreateBitmapFromResource(HINSTANCE hInstance, - GDIPCONST WCHAR* lpBitmapName, - GpBitmap** bitmap); - -GpStatus WINGDIPAPI -GdipCloneBitmapArea(REAL x, REAL y, REAL width, REAL height, - PixelFormat format, - GpBitmap *srcBitmap, - GpBitmap **dstBitmap); - -GpStatus WINGDIPAPI -GdipCloneBitmapAreaI(INT x, - INT y, - INT width, - INT height, - PixelFormat format, - GpBitmap *srcBitmap, - GpBitmap **dstBitmap); - -GpStatus WINGDIPAPI -GdipBitmapLockBits(GpBitmap* bitmap, - GDIPCONST GpRect* rect, - UINT flags, - PixelFormat format, - BitmapData* lockedBitmapData); - -GpStatus WINGDIPAPI -GdipBitmapUnlockBits(GpBitmap* bitmap, - BitmapData* lockedBitmapData); - -GpStatus WINGDIPAPI -GdipBitmapGetPixel(GpBitmap* bitmap, INT x, INT y, ARGB *color); - -GpStatus WINGDIPAPI -GdipBitmapSetPixel(GpBitmap* bitmap, INT x, INT y, ARGB color); - -GpStatus WINGDIPAPI -GdipBitmapSetResolution(GpBitmap* bitmap, REAL xdpi, REAL ydpi); - -//---------------------------------------------------------------------------- -// ImageAttributes methods -//---------------------------------------------------------------------------- - -GpStatus WINGDIPAPI -GdipCreateImageAttributes(GpImageAttributes **imageattr); - -GpStatus WINGDIPAPI -GdipCloneImageAttributes(GDIPCONST GpImageAttributes *imageattr, - GpImageAttributes **cloneImageattr); - -GpStatus WINGDIPAPI -GdipDisposeImageAttributes(GpImageAttributes *imageattr); - -GpStatus WINGDIPAPI -GdipSetImageAttributesToIdentity(GpImageAttributes *imageattr, - ColorAdjustType type); -GpStatus WINGDIPAPI -GdipResetImageAttributes(GpImageAttributes *imageattr, - ColorAdjustType type); - -GpStatus WINGDIPAPI -GdipSetImageAttributesColorMatrix(GpImageAttributes *imageattr, - ColorAdjustType type, - BOOL enableFlag, - GDIPCONST ColorMatrix* colorMatrix, - GDIPCONST ColorMatrix* grayMatrix, - ColorMatrixFlags flags); - -GpStatus WINGDIPAPI -GdipSetImageAttributesThreshold(GpImageAttributes *imageattr, - ColorAdjustType type, - BOOL enableFlag, - REAL threshold); - -GpStatus WINGDIPAPI -GdipSetImageAttributesGamma(GpImageAttributes *imageattr, - ColorAdjustType type, - BOOL enableFlag, - REAL gamma); - -GpStatus WINGDIPAPI -GdipSetImageAttributesNoOp(GpImageAttributes *imageattr, - ColorAdjustType type, - BOOL enableFlag); - -GpStatus WINGDIPAPI -GdipSetImageAttributesColorKeys(GpImageAttributes *imageattr, - ColorAdjustType type, - BOOL enableFlag, - ARGB colorLow, - ARGB colorHigh); - -GpStatus WINGDIPAPI -GdipSetImageAttributesOutputChannel(GpImageAttributes *imageattr, - ColorAdjustType type, - BOOL enableFlag, - ColorChannelFlags channelFlags); - -GpStatus WINGDIPAPI -GdipSetImageAttributesOutputChannelColorProfile(GpImageAttributes *imageattr, - ColorAdjustType type, - BOOL enableFlag, - GDIPCONST WCHAR *colorProfileFilename); - -GpStatus WINGDIPAPI -GdipSetImageAttributesRemapTable(GpImageAttributes *imageattr, - ColorAdjustType type, - BOOL enableFlag, - UINT mapSize, - GDIPCONST ColorMap *map); -GpStatus WINGDIPAPI -GdipSetImageAttributesWrapMode( - GpImageAttributes *imageAttr, - WrapMode wrap, - ARGB argb, - BOOL clamp -); - -GpStatus WINGDIPAPI -GdipSetImageAttributesICMMode( - GpImageAttributes *imageAttr, - BOOL on -); - -GpStatus WINGDIPAPI -GdipGetImageAttributesAdjustedPalette( - GpImageAttributes *imageAttr, - ColorPalette * colorPalette, - ColorAdjustType colorAdjustType -); - -//---------------------------------------------------------------------------- -// Graphics methods -//---------------------------------------------------------------------------- - -GpStatus WINGDIPAPI -GdipFlush(GpGraphics *graphics, GpFlushIntention intention); - -GpStatus WINGDIPAPI -GdipCreateFromHDC(HDC hdc, GpGraphics **graphics); - -GpStatus WINGDIPAPI -GdipCreateFromHDC2(HDC hdc, HANDLE hDevice, GpGraphics **graphics); - -GpStatus WINGDIPAPI -GdipCreateFromHWND(HWND hwnd, GpGraphics **graphics); - -GpStatus WINGDIPAPI -GdipCreateFromHWNDICM(HWND hwnd, GpGraphics **graphics); - -GpStatus WINGDIPAPI -GdipDeleteGraphics(GpGraphics *graphics); - -GpStatus WINGDIPAPI -GdipGetDC(GpGraphics* graphics, HDC * hdc); - -GpStatus WINGDIPAPI -GdipReleaseDC(GpGraphics* graphics, HDC hdc); - -GpStatus WINGDIPAPI -GdipSetCompositingMode(GpGraphics *graphics, CompositingMode compositingMode); - -GpStatus WINGDIPAPI -GdipGetCompositingMode(GpGraphics *graphics, CompositingMode *compositingMode); - -GpStatus WINGDIPAPI -GdipSetRenderingOrigin(GpGraphics *graphics, INT x, INT y); - -GpStatus WINGDIPAPI -GdipGetRenderingOrigin(GpGraphics *graphics, INT *x, INT *y); - -GpStatus WINGDIPAPI -GdipSetCompositingQuality(GpGraphics *graphics, CompositingQuality compositingQuality); - -GpStatus WINGDIPAPI -GdipGetCompositingQuality(GpGraphics *graphics, CompositingQuality *compositingQuality); - -GpStatus WINGDIPAPI -GdipSetSmoothingMode(GpGraphics *graphics, SmoothingMode smoothingMode); - -GpStatus WINGDIPAPI -GdipGetSmoothingMode(GpGraphics *graphics, SmoothingMode *smoothingMode); - -GpStatus WINGDIPAPI -GdipSetPixelOffsetMode(GpGraphics* graphics, PixelOffsetMode pixelOffsetMode); - -GpStatus WINGDIPAPI -GdipGetPixelOffsetMode(GpGraphics *graphics, PixelOffsetMode *pixelOffsetMode); - -GpStatus WINGDIPAPI -GdipSetTextRenderingHint(GpGraphics *graphics, TextRenderingHint mode); - -GpStatus WINGDIPAPI -GdipGetTextRenderingHint(GpGraphics *graphics, TextRenderingHint *mode); - -#ifdef DCR_USE_NEW_188922 -GpStatus WINGDIPAPI -GdipSetTextContrast(GpGraphics *graphics, UINT contrast); - -GpStatus WINGDIPAPI -GdipGetTextContrast(GpGraphics *graphics, UINT * contrast); -#else -GpStatus WINGDIPAPI -GdipSetTextGammaValue(GpGraphics *graphics, UINT gammaValue); - -GpStatus WINGDIPAPI -GdipGetTextGammaValue(GpGraphics *graphics, UINT * gammaValue); -#endif // DCR_USE_NEW_188922 - - -GpStatus WINGDIPAPI -GdipSetInterpolationMode(GpGraphics *graphics, InterpolationMode interpolationMode); - -GpStatus WINGDIPAPI -GdipGetInterpolationMode(GpGraphics *graphics, InterpolationMode *interpolationMode); - -GpStatus WINGDIPAPI -GdipSetWorldTransform(GpGraphics *graphics, GpMatrix *matrix); - -GpStatus WINGDIPAPI -GdipResetWorldTransform(GpGraphics *graphics); - -GpStatus WINGDIPAPI -GdipMultiplyWorldTransform(GpGraphics *graphics, GDIPCONST GpMatrix *matrix, - GpMatrixOrder order); - -GpStatus WINGDIPAPI -GdipTranslateWorldTransform(GpGraphics *graphics, REAL dx, REAL dy, - GpMatrixOrder order); - -GpStatus WINGDIPAPI -GdipScaleWorldTransform(GpGraphics *graphics, REAL sx, REAL sy, - GpMatrixOrder order); - -GpStatus WINGDIPAPI -GdipRotateWorldTransform(GpGraphics *graphics, REAL angle, GpMatrixOrder order); - -GpStatus WINGDIPAPI -GdipGetWorldTransform(GpGraphics *graphics, GpMatrix *matrix); - -GpStatus WINGDIPAPI -GdipResetPageTransform(GpGraphics *graphics); - -GpStatus WINGDIPAPI -GdipGetPageUnit(GpGraphics *graphics, GpUnit *unit); - -GpStatus WINGDIPAPI -GdipGetPageScale(GpGraphics *graphics, REAL *scale); - -GpStatus WINGDIPAPI -GdipSetPageUnit(GpGraphics *graphics, GpUnit unit); - -GpStatus WINGDIPAPI -GdipSetPageScale(GpGraphics *graphics, REAL scale); - -GpStatus WINGDIPAPI -GdipGetDpiX(GpGraphics *graphics, REAL* dpi); - -GpStatus WINGDIPAPI -GdipGetDpiY(GpGraphics *graphics, REAL* dpi); - -GpStatus WINGDIPAPI -GdipTransformPoints(GpGraphics *graphics, GpCoordinateSpace destSpace, - GpCoordinateSpace srcSpace, GpPointF *points, - INT count); - -GpStatus WINGDIPAPI -GdipTransformPointsI(GpGraphics *graphics, GpCoordinateSpace destSpace, - GpCoordinateSpace srcSpace, GpPoint *points, - INT count); - -GpStatus WINGDIPAPI -GdipGetNearestColor(GpGraphics *graphics, ARGB* argb); - -// Create the Win9x Halftone Palette (even on NT) with correct Desktop colors -HPALETTE WINGDIPAPI -GdipCreateHalftonePalette(); - -GpStatus WINGDIPAPI -GdipDrawLine(GpGraphics *graphics, GpPen *pen, REAL x1, REAL y1, - REAL x2, REAL y2); - -GpStatus WINGDIPAPI -GdipDrawLineI(GpGraphics *graphics, GpPen *pen, INT x1, INT y1, - INT x2, INT y2); - -GpStatus WINGDIPAPI -GdipDrawLines(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPointF *points, - INT count); - -GpStatus WINGDIPAPI -GdipDrawLinesI(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPoint *points, - INT count); - -GpStatus WINGDIPAPI -GdipDrawArc(GpGraphics *graphics, GpPen *pen, REAL x, REAL y, - REAL width, REAL height, REAL startAngle, REAL sweepAngle); - -GpStatus WINGDIPAPI -GdipDrawArcI(GpGraphics *graphics, GpPen *pen, INT x, INT y, - INT width, INT height, REAL startAngle, REAL sweepAngle); - -GpStatus WINGDIPAPI -GdipDrawBezier(GpGraphics *graphics, GpPen *pen, REAL x1, REAL y1, - REAL x2, REAL y2, REAL x3, REAL y3, REAL x4, REAL y4); - -GpStatus WINGDIPAPI -GdipDrawBezierI(GpGraphics *graphics, GpPen *pen, INT x1, INT y1, - INT x2, INT y2, INT x3, INT y3, INT x4, INT y4); - -GpStatus WINGDIPAPI -GdipDrawBeziers(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPointF *points, - INT count); - -GpStatus WINGDIPAPI -GdipDrawBeziersI(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPoint *points, - INT count); - -GpStatus WINGDIPAPI -GdipDrawRectangle(GpGraphics *graphics, GpPen *pen, REAL x, REAL y, - REAL width, REAL height); - -GpStatus WINGDIPAPI -GdipDrawRectangleI(GpGraphics *graphics, GpPen *pen, INT x, INT y, - INT width, INT height); - -GpStatus WINGDIPAPI -GdipDrawRectangles(GpGraphics *graphics, GpPen *pen, GDIPCONST GpRectF *rects, - INT count); - -GpStatus WINGDIPAPI -GdipDrawRectanglesI(GpGraphics *graphics, GpPen *pen, GDIPCONST GpRect *rects, - INT count); - -GpStatus WINGDIPAPI -GdipDrawEllipse(GpGraphics *graphics, GpPen *pen, REAL x, REAL y, - REAL width, REAL height); - -GpStatus WINGDIPAPI -GdipDrawEllipseI(GpGraphics *graphics, GpPen *pen, INT x, INT y, - INT width, INT height); - -GpStatus WINGDIPAPI -GdipDrawPie(GpGraphics *graphics, GpPen *pen, REAL x, REAL y, - REAL width, REAL height, REAL startAngle, REAL sweepAngle); - -GpStatus WINGDIPAPI -GdipDrawPieI(GpGraphics *graphics, GpPen *pen, INT x, INT y, - INT width, INT height, REAL startAngle, REAL sweepAngle); - -GpStatus WINGDIPAPI -GdipDrawPolygon(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPointF *points, - INT count); - -GpStatus WINGDIPAPI -GdipDrawPolygonI(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPoint *points, - INT count); - -GpStatus WINGDIPAPI -GdipDrawPath(GpGraphics *graphics, GpPen *pen, GpPath *path); - -GpStatus WINGDIPAPI -GdipDrawCurve(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPointF *points, - INT count); - -GpStatus WINGDIPAPI -GdipDrawCurveI(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPoint *points, - INT count); - -GpStatus WINGDIPAPI -GdipDrawCurve2(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPointF *points, - INT count, REAL tension); - -GpStatus WINGDIPAPI -GdipDrawCurve2I(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPoint *points, - INT count, REAL tension); - -GpStatus WINGDIPAPI -GdipDrawCurve3(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPointF *points, - INT count, INT offset, INT numberOfSegments, REAL tension); - -GpStatus WINGDIPAPI -GdipDrawCurve3I(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPoint *points, - INT count, INT offset, INT numberOfSegments, REAL tension); - -GpStatus WINGDIPAPI -GdipDrawClosedCurve(GpGraphics *graphics, GpPen *pen, - GDIPCONST GpPointF *points, INT count); - -GpStatus WINGDIPAPI -GdipDrawClosedCurveI(GpGraphics *graphics, GpPen *pen, - GDIPCONST GpPoint *points, INT count); - -GpStatus WINGDIPAPI -GdipDrawClosedCurve2(GpGraphics *graphics, GpPen *pen, - GDIPCONST GpPointF *points, INT count, REAL tension); - -GpStatus WINGDIPAPI -GdipDrawClosedCurve2I(GpGraphics *graphics, GpPen *pen, - GDIPCONST GpPoint *points, INT count, REAL tension); - -GpStatus WINGDIPAPI -GdipGraphicsClear(GpGraphics *graphics, ARGB color); - -GpStatus WINGDIPAPI -GdipFillRectangle(GpGraphics *graphics, GpBrush *brush, REAL x, REAL y, - REAL width, REAL height); - -GpStatus WINGDIPAPI -GdipFillRectangleI(GpGraphics *graphics, GpBrush *brush, INT x, INT y, - INT width, INT height); - -GpStatus WINGDIPAPI -GdipFillRectangles(GpGraphics *graphics, GpBrush *brush, - GDIPCONST GpRectF *rects, INT count); - -GpStatus WINGDIPAPI -GdipFillRectanglesI(GpGraphics *graphics, GpBrush *brush, - GDIPCONST GpRect *rects, INT count); - -GpStatus WINGDIPAPI -GdipFillPolygon(GpGraphics *graphics, GpBrush *brush, - GDIPCONST GpPointF *points, INT count, GpFillMode fillMode); - -GpStatus WINGDIPAPI -GdipFillPolygonI(GpGraphics *graphics, GpBrush *brush, - GDIPCONST GpPoint *points, INT count, GpFillMode fillMode); - -GpStatus WINGDIPAPI -GdipFillPolygon2(GpGraphics *graphics, GpBrush *brush, - GDIPCONST GpPointF *points, INT count); - -GpStatus WINGDIPAPI -GdipFillPolygon2I(GpGraphics *graphics, GpBrush *brush, - GDIPCONST GpPoint *points, INT count); - -GpStatus WINGDIPAPI -GdipFillEllipse(GpGraphics *graphics, GpBrush *brush, REAL x, REAL y, - REAL width, REAL height); - -GpStatus WINGDIPAPI -GdipFillEllipseI(GpGraphics *graphics, GpBrush *brush, INT x, INT y, - INT width, INT height); - -GpStatus WINGDIPAPI -GdipFillPie(GpGraphics *graphics, GpBrush *brush, REAL x, REAL y, - REAL width, REAL height, REAL startAngle, REAL sweepAngle); - -GpStatus WINGDIPAPI -GdipFillPieI(GpGraphics *graphics, GpBrush *brush, INT x, INT y, - INT width, INT height, REAL startAngle, REAL sweepAngle); - -GpStatus WINGDIPAPI -GdipFillPath(GpGraphics *graphics, GpBrush *brush, GpPath *path); - -GpStatus WINGDIPAPI -GdipFillClosedCurve(GpGraphics *graphics, GpBrush *brush, - GDIPCONST GpPointF *points, INT count); - -GpStatus WINGDIPAPI -GdipFillClosedCurveI(GpGraphics *graphics, GpBrush *brush, - GDIPCONST GpPoint *points, INT count); - -GpStatus WINGDIPAPI -GdipFillClosedCurve2(GpGraphics *graphics, GpBrush *brush, - GDIPCONST GpPointF *points, INT count, - REAL tension, GpFillMode fillMode); - -GpStatus WINGDIPAPI -GdipFillClosedCurve2I(GpGraphics *graphics, GpBrush *brush, - GDIPCONST GpPoint *points, INT count, - REAL tension, GpFillMode fillMode); - -GpStatus WINGDIPAPI -GdipFillRegion(GpGraphics *graphics, GpBrush *brush, - GpRegion *region); - -GpStatus WINGDIPAPI -GdipDrawImage(GpGraphics *graphics, GpImage *image, REAL x, REAL y); - -GpStatus WINGDIPAPI -GdipDrawImageI(GpGraphics *graphics, GpImage *image, INT x, INT y); - -GpStatus WINGDIPAPI -GdipDrawImageRect(GpGraphics *graphics, GpImage *image, REAL x, REAL y, - REAL width, REAL height); - -GpStatus WINGDIPAPI -GdipDrawImageRectI(GpGraphics *graphics, GpImage *image, INT x, INT y, - INT width, INT height); - -GpStatus WINGDIPAPI -GdipDrawImagePoints(GpGraphics *graphics, GpImage *image, - GDIPCONST GpPointF *dstpoints, INT count); - -GpStatus WINGDIPAPI -GdipDrawImagePointsI(GpGraphics *graphics, GpImage *image, - GDIPCONST GpPoint *dstpoints, INT count); - -GpStatus WINGDIPAPI -GdipDrawImagePointRect(GpGraphics *graphics, GpImage *image, REAL x, - REAL y, REAL srcx, REAL srcy, REAL srcwidth, - REAL srcheight, GpUnit srcUnit); - -GpStatus WINGDIPAPI -GdipDrawImagePointRectI(GpGraphics *graphics, GpImage *image, INT x, - INT y, INT srcx, INT srcy, INT srcwidth, - INT srcheight, GpUnit srcUnit); - -GpStatus WINGDIPAPI -GdipDrawImageRectRect(GpGraphics *graphics, GpImage *image, REAL dstx, - REAL dsty, REAL dstwidth, REAL dstheight, - REAL srcx, REAL srcy, REAL srcwidth, REAL srcheight, - GpUnit srcUnit, - GDIPCONST GpImageAttributes* imageAttributes, - DrawImageAbort callback, VOID * callbackData); - -GpStatus WINGDIPAPI -GdipDrawImageRectRectI(GpGraphics *graphics, GpImage *image, INT dstx, - INT dsty, INT dstwidth, INT dstheight, - INT srcx, INT srcy, INT srcwidth, INT srcheight, - GpUnit srcUnit, - GDIPCONST GpImageAttributes* imageAttributes, - DrawImageAbort callback, VOID * callbackData); - -GpStatus WINGDIPAPI -GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image, - GDIPCONST GpPointF *points, INT count, REAL srcx, - REAL srcy, REAL srcwidth, REAL srcheight, - GpUnit srcUnit, - GDIPCONST GpImageAttributes* imageAttributes, - DrawImageAbort callback, VOID * callbackData); - -GpStatus WINGDIPAPI -GdipDrawImagePointsRectI(GpGraphics *graphics, GpImage *image, - GDIPCONST GpPoint *points, INT count, INT srcx, - INT srcy, INT srcwidth, INT srcheight, - GpUnit srcUnit, - GDIPCONST GpImageAttributes* imageAttributes, - DrawImageAbort callback, VOID * callbackData); - -GpStatus WINGDIPAPI -GdipEnumerateMetafileDestPoint( - GpGraphics * graphics, - GDIPCONST GpMetafile * metafile, - GDIPCONST PointF & destPoint, - EnumerateMetafileProc callback, - VOID * callbackData, - GDIPCONST GpImageAttributes * imageAttributes - ); - -GpStatus WINGDIPAPI -GdipEnumerateMetafileDestPointI( - GpGraphics * graphics, - GDIPCONST GpMetafile * metafile, - GDIPCONST Point & destPoint, - EnumerateMetafileProc callback, - VOID * callbackData, - GDIPCONST GpImageAttributes * imageAttributes - ); - -GpStatus WINGDIPAPI -GdipEnumerateMetafileDestRect( - GpGraphics * graphics, - GDIPCONST GpMetafile * metafile, - GDIPCONST RectF & destRect, - EnumerateMetafileProc callback, - VOID * callbackData, - GDIPCONST GpImageAttributes * imageAttributes - ); - -GpStatus WINGDIPAPI -GdipEnumerateMetafileDestRectI( - GpGraphics * graphics, - GDIPCONST GpMetafile * metafile, - GDIPCONST Rect & destRect, - EnumerateMetafileProc callback, - VOID * callbackData, - GDIPCONST GpImageAttributes * imageAttributes - ); - -GpStatus WINGDIPAPI -GdipEnumerateMetafileDestPoints( - GpGraphics * graphics, - GDIPCONST GpMetafile * metafile, - GDIPCONST PointF * destPoints, - INT count, - EnumerateMetafileProc callback, - VOID * callbackData, - GDIPCONST GpImageAttributes * imageAttributes - ); - -GpStatus WINGDIPAPI -GdipEnumerateMetafileDestPointsI( - GpGraphics * graphics, - GDIPCONST GpMetafile * metafile, - GDIPCONST Point * destPoints, - INT count, - EnumerateMetafileProc callback, - VOID * callbackData, - GDIPCONST GpImageAttributes * imageAttributes - ); - -GpStatus WINGDIPAPI -GdipEnumerateMetafileSrcRectDestPoint( - GpGraphics * graphics, - GDIPCONST GpMetafile * metafile, - GDIPCONST PointF & destPoint, - GDIPCONST RectF & srcRect, - Unit srcUnit, - EnumerateMetafileProc callback, - VOID * callbackData, - GDIPCONST GpImageAttributes * imageAttributes - ); - -GpStatus WINGDIPAPI -GdipEnumerateMetafileSrcRectDestPointI( - GpGraphics * graphics, - GDIPCONST GpMetafile * metafile, - GDIPCONST Point & destPoint, - GDIPCONST Rect & srcRect, - Unit srcUnit, - EnumerateMetafileProc callback, - VOID * callbackData, - GDIPCONST GpImageAttributes * imageAttributes - ); - -GpStatus WINGDIPAPI -GdipEnumerateMetafileSrcRectDestRect( - GpGraphics * graphics, - GDIPCONST GpMetafile * metafile, - GDIPCONST RectF & destRect, - GDIPCONST RectF & srcRect, - Unit srcUnit, - EnumerateMetafileProc callback, - VOID * callbackData, - GDIPCONST GpImageAttributes * imageAttributes - ); - -GpStatus WINGDIPAPI -GdipEnumerateMetafileSrcRectDestRectI( - GpGraphics * graphics, - GDIPCONST GpMetafile * metafile, - GDIPCONST Rect & destRect, - GDIPCONST Rect & srcRect, - Unit srcUnit, - EnumerateMetafileProc callback, - VOID * callbackData, - GDIPCONST GpImageAttributes * imageAttributes - ); - -GpStatus WINGDIPAPI -GdipEnumerateMetafileSrcRectDestPoints( - GpGraphics * graphics, - GDIPCONST GpMetafile * metafile, - GDIPCONST PointF * destPoints, - INT count, - GDIPCONST RectF & srcRect, - Unit srcUnit, - EnumerateMetafileProc callback, - VOID * callbackData, - GDIPCONST GpImageAttributes * imageAttributes - ); - -GpStatus WINGDIPAPI -GdipEnumerateMetafileSrcRectDestPointsI( - GpGraphics * graphics, - GDIPCONST GpMetafile * metafile, - GDIPCONST Point * destPoints, - INT count, - GDIPCONST Rect & srcRect, - Unit srcUnit, - EnumerateMetafileProc callback, - VOID * callbackData, - GDIPCONST GpImageAttributes * imageAttributes - ); - -GpStatus WINGDIPAPI -GdipPlayMetafileRecord( - GDIPCONST GpMetafile * metafile, - EmfPlusRecordType recordType, - UINT flags, - UINT dataSize, - GDIPCONST BYTE * data - ); - -GpStatus WINGDIPAPI -GdipSetClipGraphics(GpGraphics *graphics, GpGraphics *srcgraphics, - CombineMode combineMode); - -GpStatus WINGDIPAPI -GdipSetClipRect(GpGraphics *graphics, REAL x, REAL y, - REAL width, REAL height, CombineMode combineMode); - -GpStatus WINGDIPAPI -GdipSetClipRectI(GpGraphics *graphics, INT x, INT y, - INT width, INT height, CombineMode combineMode); - -GpStatus WINGDIPAPI -GdipSetClipPath(GpGraphics *graphics, GpPath *path, CombineMode combineMode); - -GpStatus WINGDIPAPI -GdipSetClipRegion(GpGraphics *graphics, GpRegion *region, - CombineMode combineMode); - -GpStatus WINGDIPAPI -GdipSetClipHrgn(GpGraphics *graphics, HRGN hRgn, CombineMode combineMode); - -GpStatus WINGDIPAPI -GdipResetClip(GpGraphics *graphics); - -GpStatus WINGDIPAPI -GdipTranslateClip(GpGraphics *graphics, REAL dx, REAL dy); - -GpStatus WINGDIPAPI -GdipTranslateClipI(GpGraphics *graphics, INT dx, INT dy); - -GpStatus WINGDIPAPI -GdipGetClip(GpGraphics *graphics, GpRegion *region); - -GpStatus WINGDIPAPI -GdipGetClipBounds(GpGraphics *graphics, GpRectF *rect); - -GpStatus WINGDIPAPI -GdipGetClipBoundsI(GpGraphics *graphics, GpRect *rect); - -GpStatus WINGDIPAPI -GdipIsClipEmpty(GpGraphics *graphics, BOOL *result); - -GpStatus WINGDIPAPI -GdipGetVisibleClipBounds(GpGraphics *graphics, GpRectF *rect); - -GpStatus WINGDIPAPI -GdipGetVisibleClipBoundsI(GpGraphics *graphics, GpRect *rect); - -GpStatus WINGDIPAPI -GdipIsVisibleClipEmpty(GpGraphics *graphics, BOOL *result); - -GpStatus WINGDIPAPI -GdipIsVisiblePoint(GpGraphics *graphics, REAL x, REAL y, - BOOL *result); - -GpStatus WINGDIPAPI -GdipIsVisiblePointI(GpGraphics *graphics, INT x, INT y, - BOOL *result); - -GpStatus WINGDIPAPI -GdipIsVisibleRect(GpGraphics *graphics, REAL x, REAL y, - REAL width, REAL height, BOOL *result); - -GpStatus WINGDIPAPI -GdipIsVisibleRectI(GpGraphics *graphics, INT x, INT y, - INT width, INT height, BOOL *result); - -GpStatus WINGDIPAPI -GdipSaveGraphics(GpGraphics *graphics, GraphicsState *state); - -GpStatus WINGDIPAPI -GdipRestoreGraphics(GpGraphics *graphics, GraphicsState state); - -GpStatus WINGDIPAPI -GdipBeginContainer(GpGraphics *graphics, GDIPCONST GpRectF* dstrect, - GDIPCONST GpRectF *srcrect, GpUnit unit, GraphicsContainer *state); - -GpStatus WINGDIPAPI -GdipBeginContainerI(GpGraphics *graphics, GDIPCONST GpRect* dstrect, - GDIPCONST GpRect *srcrect, GpUnit unit, GraphicsContainer *state); - -GpStatus WINGDIPAPI -GdipBeginContainer2(GpGraphics *graphics, GraphicsContainer* state); - -GpStatus WINGDIPAPI -GdipEndContainer(GpGraphics *graphics, GraphicsContainer state); - -GpStatus -GdipGetMetafileHeaderFromWmf( - HMETAFILE hWmf, - GDIPCONST APMFileHeader * apmFileHeader, - MetafileHeader * header - ); - -GpStatus -WINGDIPAPI -GdipGetMetafileHeaderFromEmf( - HENHMETAFILE hEmf, - MetafileHeader * header - ); - -GpStatus -WINGDIPAPI -GdipGetMetafileHeaderFromFile( - GDIPCONST WCHAR* filename, - MetafileHeader * header - ); - -GpStatus -WINGDIPAPI -GdipGetMetafileHeaderFromStream( - IStream * stream, - MetafileHeader * header - ); - -GpStatus -WINGDIPAPI -GdipGetMetafileHeaderFromMetafile( - GpMetafile * metafile, - MetafileHeader * header - ); - -GpStatus -WINGDIPAPI -GdipGetHemfFromMetafile( - GpMetafile * metafile, - HENHMETAFILE * hEmf - ); - -GpStatus WINGDIPAPI -GdipCreateStreamOnFile(GDIPCONST WCHAR * filename, UINT access, IStream **stream); - -GpStatus WINGDIPAPI -GdipCreateMetafileFromWmf(HMETAFILE hWmf, BOOL deleteWmf, - GDIPCONST APMFileHeader * apmFileHeader, GpMetafile **metafile); - -GpStatus WINGDIPAPI -GdipCreateMetafileFromEmf(HENHMETAFILE hEmf, BOOL deleteEmf, - GpMetafile **metafile); - -GpStatus WINGDIPAPI -GdipCreateMetafileFromFile(GDIPCONST WCHAR* file, GpMetafile **metafile); - -GpStatus WINGDIPAPI -GdipCreateMetafileFromWmfFile(GDIPCONST WCHAR* file, GDIPCONST APMFileHeader * apmFileHeader, GpMetafile **metafile); - -GpStatus WINGDIPAPI -GdipCreateMetafileFromStream(IStream * stream, GpMetafile **metafile); - -GpStatus WINGDIPAPI -GdipRecordMetafile( - HDC referenceHdc, - EmfType type, - GDIPCONST GpRectF * frameRect, - MetafileFrameUnit frameUnit, - GDIPCONST WCHAR * description, - GpMetafile ** metafile - ); - -GpStatus WINGDIPAPI -GdipRecordMetafileI( - HDC referenceHdc, - EmfType type, - GDIPCONST GpRect * frameRect, - MetafileFrameUnit frameUnit, - GDIPCONST WCHAR * description, - GpMetafile ** metafile - ); - -GpStatus WINGDIPAPI -GdipRecordMetafileFileName( - GDIPCONST WCHAR* fileName, - HDC referenceHdc, - EmfType type, - GDIPCONST GpRectF * frameRect, - MetafileFrameUnit frameUnit, - GDIPCONST WCHAR * description, - GpMetafile ** metafile - ); - -GpStatus WINGDIPAPI -GdipRecordMetafileFileNameI( - GDIPCONST WCHAR* fileName, - HDC referenceHdc, - EmfType type, - GDIPCONST GpRect * frameRect, - MetafileFrameUnit frameUnit, - GDIPCONST WCHAR * description, - GpMetafile ** metafile - ); - -GpStatus WINGDIPAPI -GdipRecordMetafileStream( - IStream * stream, - HDC referenceHdc, - EmfType type, - GDIPCONST GpRectF * frameRect, - MetafileFrameUnit frameUnit, - GDIPCONST WCHAR * description, - GpMetafile ** metafile - ); - -GpStatus WINGDIPAPI -GdipRecordMetafileStreamI( - IStream * stream, - HDC referenceHdc, - EmfType type, - GDIPCONST GpRect * frameRect, - MetafileFrameUnit frameUnit, - GDIPCONST WCHAR * description, - GpMetafile ** metafile - ); - -GpStatus WINGDIPAPI -GdipSetMetafileDownLevelRasterizationLimit( - GpMetafile * metafile, - UINT metafileRasterizationLimitDpi - ); - -GpStatus WINGDIPAPI -GdipGetMetafileDownLevelRasterizationLimit( - GDIPCONST GpMetafile * metafile, - UINT * metafileRasterizationLimitDpi - ); - -GpStatus WINGDIPAPI -GdipGetImageDecodersSize(UINT *numDecoders, UINT *size); - -GpStatus WINGDIPAPI -GdipGetImageDecoders(UINT numDecoders, - UINT size, - ImageCodecInfo *decoders); - -GpStatus WINGDIPAPI -GdipGetImageEncodersSize(UINT *numEncoders, UINT *size); - -GpStatus WINGDIPAPI -GdipGetImageEncoders(UINT numEncoders, - UINT size, - ImageCodecInfo *encoders); - -GpStatus WINGDIPAPI -GdipAddImageCodec(GDIPCONST ImageCodecInfo *codec); - -GpStatus WINGDIPAPI -GdipRemoveImageCodec(GDIPCONST ImageCodecInfo *codec); - -#ifndef DCR_USE_NEW_186091 -GpStatus WINGDIPAPI -GdipGetGraphicsPixel(GpGraphics* graphics, REAL x, REAL y, ARGB* argb); -#endif - -GpStatus WINGDIPAPI -GdipComment(GpGraphics* graphics, UINT sizeData, GDIPCONST BYTE * data); - -GpStatus WINGDIPAPI -GdipGetGraphicsLayout(GpGraphics* graphics, GraphicsLayout* layout); - -GpStatus WINGDIPAPI -GdipSetGraphicsLayout(GpGraphics* graphics, GDIPCONST GraphicsLayout layout); - -//---------------------------------------------------------------------------- -// FontFamily -//---------------------------------------------------------------------------- - -GpStatus WINGDIPAPI -GdipCreateFontFamilyFromName(GDIPCONST WCHAR *name, - GpFontCollection *fontCollection, - GpFontFamily **FontFamily); - -GpStatus WINGDIPAPI -GdipDeleteFontFamily(GpFontFamily *FontFamily); - -GpStatus WINGDIPAPI -GdipCloneFontFamily(GpFontFamily *FontFamily, GpFontFamily **clonedFontFamily); - -GpStatus WINGDIPAPI -GdipGetGenericFontFamilySansSerif(GpFontFamily **nativeFamily); - -GpStatus WINGDIPAPI -GdipGetGenericFontFamilySerif(GpFontFamily **nativeFamily); - -GpStatus WINGDIPAPI -GdipGetGenericFontFamilyMonospace(GpFontFamily **nativeFamily); - - -GpStatus WINGDIPAPI -GdipGetFamilyName( - GDIPCONST GpFontFamily *family, - WCHAR name[LF_FACESIZE], - LANGID language -); - -GpStatus WINGDIPAPI -GdipIsStyleAvailable(GDIPCONST GpFontFamily *family, INT style, BOOL * IsStyleAvailable); - -GpStatus WINGDIPAPI -GdipFontCollectionEnumerable( - GpFontCollection* fontCollection, - GpGraphics* graphics, - INT * numFound -); - -GpStatus WINGDIPAPI GdipFontCollectionEnumerate( - GpFontCollection* fontCollection, - INT numSought, - GpFontFamily* gpfamilies[], - INT* numFound, - GpGraphics* graphics -); - -//----------------------------------- -// New API -//----------------------------------- - -GpStatus WINGDIPAPI -GdipGetEmHeight(GDIPCONST GpFontFamily *family, INT style, UINT16 * EmHeight); - -GpStatus WINGDIPAPI -GdipGetCellAscent(GDIPCONST GpFontFamily *family, INT style, UINT16 * CellAscent); - -GpStatus WINGDIPAPI -GdipGetCellDescent(GDIPCONST GpFontFamily *family, INT style, UINT16 * CellDescent); - -GpStatus WINGDIPAPI -GdipGetLineSpacing(GDIPCONST GpFontFamily *family, INT style, UINT16 * LineSpacing); - - -//---------------------------------------------------------------------------- -// Font -//---------------------------------------------------------------------------- - -GpStatus WINGDIPAPI -GdipCreateFontFromDC( - HDC hdc, - GpFont **font -); - -GpStatus WINGDIPAPI -GdipCreateFontFromLogfontA( - HDC hdc, - GDIPCONST LOGFONTA *logfont, - GpFont **font -); - -GpStatus WINGDIPAPI -GdipCreateFontFromLogfontW( - HDC hdc, - GDIPCONST LOGFONTW *logfont, - GpFont **font -); - -GpStatus WINGDIPAPI -GdipCreateFont( - GDIPCONST GpFontFamily *fontFamily, - REAL emSize, - INT style, - Unit unit, - GpFont **font -); - -GpStatus WINGDIPAPI -GdipCloneFont(GpFont* font, GpFont** cloneFont); - -GpStatus WINGDIPAPI -GdipDeleteFont(GpFont* font); - -GpStatus WINGDIPAPI -GdipGetFamily(GpFont *font, GpFontFamily **family); - -GpStatus WINGDIPAPI -GdipGetFontStyle(GpFont *font, INT *style); - -GpStatus WINGDIPAPI -GdipGetFontSize(GpFont *font, REAL *size); - -GpStatus WINGDIPAPI -GdipGetFontUnit(GpFont *font, Unit *unit); - -GpStatus WINGDIPAPI -GdipGetFontHeight(GDIPCONST GpFont *font, GDIPCONST GpGraphics *graphics, REAL *height); - -#ifdef DCR_USE_NEW_125467 -GpStatus WINGDIPAPI -GdipGetFontHeightGivenDPI(GDIPCONST GpFont *font, REAL dpi, REAL *height); -#endif - -GpStatus WINGDIPAPI -GdipGetLogFontA(GpFont * font, GpGraphics *graphics, LOGFONTA * logfontA); - -GpStatus WINGDIPAPI -GdipGetLogFontW(GpFont * font, GpGraphics *graphics, LOGFONTW * logfontW); - -// FontCollection - -GpStatus WINGDIPAPI -GdipNewInstalledFontCollection(GpFontCollection** fontCollection); - -GpStatus WINGDIPAPI -GdipNewPrivateFontCollection(GpFontCollection** fontCollection); - -GpStatus WINGDIPAPI -GdipDeletePrivateFontCollection(GpFontCollection** fontCollection); - -GpStatus WINGDIPAPI -GdipGetFontCollectionFamilyCount( - GpFontCollection* fontCollection, - INT * numFound -); - -GpStatus WINGDIPAPI -GdipGetFontCollectionFamilyList( - GpFontCollection* fontCollection, - INT numSought, - GpFontFamily* gpfamilies[], - INT* numFound -); - -#ifndef DCR_USE_NEW_235072 -GpStatus WINGDIPAPI -GdipInstallFontFile( - GpFontCollection* fontCollection, - GDIPCONST WCHAR* filename -); - -GpStatus WINGDIPAPI -GdipUninstallFontFile( - GpFontCollection* fontCollection, - GDIPCONST WCHAR* filename -); -#endif - -GpStatus WINGDIPAPI -GdipPrivateAddFontFile( - GpFontCollection* fontCollection, - GDIPCONST WCHAR* filename -); - -GpStatus WINGDIPAPI -GdipPrivateAddMemoryFont( - GpFontCollection* fontCollection, - GDIPCONST void* memory, - INT length -); - -//---------------------------------------------------------------------------- -// Text -//---------------------------------------------------------------------------- - -GpStatus WINGDIPAPI -GdipDrawString( - GpGraphics *graphics, - GDIPCONST WCHAR *string, - INT length, - GDIPCONST GpFont *font, - GDIPCONST RectF *layoutRect, - GDIPCONST GpStringFormat *stringFormat, - GDIPCONST GpBrush *brush -); - -GpStatus WINGDIPAPI -GdipMeasureString( - GpGraphics *graphics, - GDIPCONST WCHAR *string, - INT length, - GDIPCONST GpFont *font, - GDIPCONST RectF *layoutRect, - GDIPCONST GpStringFormat *stringFormat, - RectF *boundingBox, - INT *codepointsFitted, - INT *linesFilled -); - -#ifndef DCR_USE_NEW_174340 -GpStatus WINGDIPAPI -GdipMeasureStringRegion( - GpGraphics *graphics, - GDIPCONST WCHAR *string, - INT length, - GDIPCONST GpFont *font, - GDIPCONST RectF &layoutRect, - GDIPCONST GpStringFormat *stringFormat, - INT firstCharacterIndex, - INT characterCount, - GpRegion *region -); -#endif - -#ifdef DCR_USE_NEW_174340 -GpStatus -WINGDIPAPI -GdipMeasureCharacterRanges( - GpGraphics *graphics, - GDIPCONST WCHAR *string, - INT length, - GDIPCONST GpFont *font, - GDIPCONST RectF &layoutRect, - GDIPCONST GpStringFormat *stringFormat, - INT regionCount, - GpRegion **regions -); -#endif - -GpStatus WINGDIPAPI -GdipDrawDriverString( - GpGraphics *graphics, - GDIPCONST UINT16 *text, - INT length, - GDIPCONST GpFont *font, - GDIPCONST GpBrush *brush, - GDIPCONST PointF *positions, - INT flags, - GDIPCONST GpMatrix *matrix -); - -GpStatus WINGDIPAPI -GdipMeasureDriverString( - GpGraphics *graphics, - GDIPCONST UINT16 *text, - INT length, - GDIPCONST GpFont *font, - GDIPCONST PointF *positions, - INT flags, - GDIPCONST GpMatrix *matrix, - RectF *boundingBox -); - -#ifndef DCR_USE_NEW_168772 -GpStatus WINGDIPAPI -GdipDriverStringPointToCodepoint( - GpGraphics *graphics, - GDIPCONST UINT16 *text, - INT length, - GDIPCONST GpFont *font, - GDIPCONST PointF *positions, - INT flags, - GpMatrix *matrix, - GDIPCONST PointF *hit, - INT *index, - BOOL *rightEdge, - REAL *distance -); -#endif - -//---------------------------------------------------------------------------- -// String format APIs -//---------------------------------------------------------------------------- - -GpStatus WINGDIPAPI -GdipCreateStringFormat( - INT formatAttributes, - LANGID language, - GpStringFormat **format -); - -GpStatus WINGDIPAPI -GdipStringFormatGetGenericDefault(GpStringFormat **format); - -GpStatus WINGDIPAPI -GdipStringFormatGetGenericTypographic(GpStringFormat **format); - -GpStatus WINGDIPAPI -GdipDeleteStringFormat(GpStringFormat *format); - -GpStatus WINGDIPAPI -GdipCloneStringFormat(GDIPCONST GpStringFormat *format, GpStringFormat **newFormat); - -GpStatus WINGDIPAPI -GdipSetStringFormatFlags(GpStringFormat *format, INT flags); - -GpStatus WINGDIPAPI GdipGetStringFormatFlags(GDIPCONST GpStringFormat *format, INT *flags); - -#ifndef DCR_USE_NEW_152154 -GpStatus WINGDIPAPI -GdipSetStringFormatLineSpacing(GpStringFormat *format, REAL amount, - LineSpacing method); - -GpStatus WINGDIPAPI -GdipGetStringFormatLineSpacingAmount(GDIPCONST GpStringFormat *format, REAL *amount); -GpStatus WINGDIPAPI -GdipGetStringFormatLineSpacingMethod(GDIPCONST GpStringFormat *format, LineSpacing *method); -#endif - -GpStatus WINGDIPAPI -GdipSetStringFormatAlign(GpStringFormat *format, StringAlignment align); - -GpStatus WINGDIPAPI -GdipGetStringFormatAlign(GDIPCONST GpStringFormat *format, StringAlignment *align); - -GpStatus WINGDIPAPI -GdipSetStringFormatLineAlign(GpStringFormat *format, - StringAlignment align); - -GpStatus WINGDIPAPI -GdipGetStringFormatLineAlign(GDIPCONST GpStringFormat *format, - StringAlignment *align); - -GpStatus WINGDIPAPI -GdipSetStringFormatTrimming( - GpStringFormat *format, - StringTrimming trimming -); - -GpStatus WINGDIPAPI -GdipGetStringFormatTrimming( - GDIPCONST GpStringFormat *format, - StringTrimming *trimming -); - -GpStatus WINGDIPAPI -GdipSetStringFormatHotkeyPrefix(GpStringFormat *format, INT hotkeyPrefix); - -GpStatus WINGDIPAPI -GdipGetStringFormatHotkeyPrefix(GDIPCONST GpStringFormat *format, INT *hotkeyPrefix); - -GpStatus WINGDIPAPI -GdipSetStringFormatTabStops(GpStringFormat *format, REAL firstTabOffset, INT count, GDIPCONST REAL *tabStops); - -GpStatus WINGDIPAPI -GdipGetStringFormatTabStops(GDIPCONST GpStringFormat *format, INT count, REAL *firstTabOffset, REAL *tabStops); - -GpStatus WINGDIPAPI -GdipGetStringFormatTabStopCount(GDIPCONST GpStringFormat *format, INT * count); - -#ifdef DCR_USE_NEW_146933 -GpStatus WINGDIPAPI -GdipSetStringFormatDigitSubstitution(GpStringFormat *format, LANGID language, - StringDigitSubstitute substitute); - -GpStatus WINGDIPAPI -GdipGetStringFormatDigitSubstitution(GDIPCONST GpStringFormat *format, LANGID *language, - StringDigitSubstitute *substitute); -#endif // DCR_USE_NEW_146933 - -#ifdef DCR_USE_NEW_174340 -GpStatus WINGDIPAPI -GdipGetStringFormatMeasurableCharacterRangeCount( - GDIPCONST GpStringFormat *format, - INT *count -); - -GpStatus WINGDIPAPI -GdipSetStringFormatMeasurableCharacterRanges( - GpStringFormat *format, - INT rangeCount, - GDIPCONST CharacterRange *ranges -); -#endif - -//---------------------------------------------------------------------------- -// Cached Bitmap APIs -//---------------------------------------------------------------------------- - -GpStatus WINGDIPAPI -GdipCreateCachedBitmap( - GpBitmap *bitmap, - GpGraphics *graphics, - GpCachedBitmap **cachedBitmap -); - -GpStatus WINGDIPAPI -GdipDeleteCachedBitmap(GpCachedBitmap *cachedBitmap); - -GpStatus WINGDIPAPI -GdipDrawCachedBitmap( - GpGraphics *graphics, - GpCachedBitmap *cachedBitmap, - INT x, - INT y -); - -UINT WINGDIPAPI -GdipEmfToWmfBits( - HENHMETAFILE hemf, - UINT cbData16, - LPBYTE pData16, - INT iMapMode, - INT eFlags -); - -#ifdef __cplusplus -} -#endif - -#endif // !_FLATAPI_H diff --git a/src/includes/GdiPlusFont.h b/src/includes/GdiPlusFont.h deleted file mode 100644 index 4c9e01f5..00000000 --- a/src/includes/GdiPlusFont.h +++ /dev/null @@ -1,299 +0,0 @@ -/**************************************************************************\ -* -* Copyright (c) 1998-2000, Microsoft Corp. All Rights Reserved. -* -* Module Name: -* -* GdiplusFont.h -* -* Abstract: -* -* Font related declarations -* -\**************************************************************************/ - -#ifndef _GDIPLUSFONT_H -#define _GDIPLUSFONT_H - -inline -Font::Font(IN HDC hdc) -{ - GpFont *font = NULL; - lastResult = DllExports::GdipCreateFontFromDC(hdc, &font); - -#ifndef DCR_USE_NEW_135429 - if ((INT) lastResult >= 10) - lastResult = NotFound; -#endif - - SetNativeFont(font); -} - -#ifdef DCR_USE_NEW_127084 -inline -Font::Font(IN HDC hdc, - IN const HFONT hfont) -{ - GpFont *font = NULL; - - if (hfont) - { - LOGFONTA lf; - - if(GetObjectA(hfont, sizeof(LOGFONTA), &lf)) - lastResult = DllExports::GdipCreateFontFromLogfontA(hdc, &lf, &font); - else - lastResult = DllExports::GdipCreateFontFromDC(hdc, &font); - } - else - { - lastResult = DllExports::GdipCreateFontFromDC(hdc, &font); - } - -#ifndef DCR_USE_NEW_135429 - if ((INT) lastResult >= 10) - lastResult = NotFound; -#endif - - SetNativeFont(font); -} -#endif - -inline -Font::Font(IN HDC hdc, - IN const LOGFONTW* logfont) -{ - GpFont *font = NULL; - if (logfont) - { - lastResult = DllExports::GdipCreateFontFromLogfontW(hdc, logfont, &font); - } - else - { - lastResult = DllExports::GdipCreateFontFromDC(hdc, &font); - } - -#ifndef DCR_USE_NEW_135429 - if ((INT) lastResult >= 10) - lastResult = NotFound; -#endif - - SetNativeFont(font); -} - -inline -Font::Font(IN HDC hdc, - IN const LOGFONTA* logfont) -{ - GpFont *font = NULL; - - if (logfont) - { - lastResult = DllExports::GdipCreateFontFromLogfontA(hdc, logfont, &font); - } - else - { - lastResult = DllExports::GdipCreateFontFromDC(hdc, &font); - } - -#ifndef DCR_USE_NEW_135429 - if ((INT) lastResult >= 10) - lastResult = NotFound; -#endif - - SetNativeFont(font); -} - -inline -Font::Font( - IN const FontFamily * family, - IN REAL emSize, - IN INT style, - IN Unit unit -) -{ - GpFont *font = NULL; - - lastResult = DllExports::GdipCreateFont(family ? family->nativeFamily : NULL, - emSize, - style, - unit, - &font); - -#ifndef DCR_USE_NEW_135429 - if ((INT) lastResult >= 10) - lastResult = NotFound; -#endif - - SetNativeFont(font); -} - -inline -Font::Font( - IN const WCHAR * familyName, - IN REAL emSize, - IN INT style, - IN Unit unit, - IN const FontCollection * fontCollection -) -{ - FontFamily family(familyName, fontCollection); - - GpFont * font = NULL; - - lastResult = family.GetLastStatus(); - - if (lastResult == Ok) - { - lastResult = DllExports::GdipCreateFont(family.nativeFamily, - emSize, - style, - unit, - &font); - } - -#ifndef DCR_USE_NEW_135429 - if ((INT) lastResult >= 10) - lastResult = NotFound; -#endif - - SetNativeFont(font); -} - -inline Status -Font::GetLogFontA(IN const Graphics *g, - OUT LOGFONTA *logfontA) const -{ - return SetStatus(DllExports::GdipGetLogFontA(nativeFont, g ? g->nativeGraphics : NULL, logfontA)); - -} - -inline Status -Font::GetLogFontW(IN const Graphics *g, - OUT LOGFONTW *logfontW) const -{ - return SetStatus(DllExports::GdipGetLogFontW(nativeFont, g ? g->nativeGraphics : NULL, logfontW)); -} - - -inline Font* -Font::Clone() const -{ - GpFont *cloneFont = NULL; - - SetStatus(DllExports::GdipCloneFont(nativeFont, &cloneFont)); - - return new Font(cloneFont, lastResult); -} - -inline -Font::~Font() -{ - DllExports::GdipDeleteFont(nativeFont); -} - -// Operations - -inline BOOL -Font::IsAvailable() const -{ - return (nativeFont ? TRUE : FALSE); -} - -inline Status -Font::GetFamily(OUT FontFamily *family) const -{ - if (family == NULL) - { - return SetStatus(InvalidParameter); - } - - Status status = DllExports::GdipGetFamily(nativeFont, &(family->nativeFamily)); - family->SetStatus(status); - - return SetStatus(status); -} - -inline INT -Font::GetStyle() const -{ - INT style; - - SetStatus(DllExports::GdipGetFontStyle(nativeFont, &style)); - - return style; -} - -inline REAL -Font::GetSize() const -{ - REAL size; - SetStatus(DllExports::GdipGetFontSize(nativeFont, &size)); - return size; -} - -inline Unit -Font::GetUnit() const -{ - Unit unit; - SetStatus(DllExports::GdipGetFontUnit(nativeFont, &unit)); - return unit; -} - -inline REAL -Font::GetHeight(IN const Graphics *graphics) const -{ - REAL height; - SetStatus(DllExports::GdipGetFontHeight( - nativeFont, - graphics ? graphics->nativeGraphics : NULL, - &height - )); - return height; -} - - -#ifdef DCR_USE_NEW_125467 -inline REAL -Font::GetHeight(IN REAL dpi = 0) const -{ - REAL height; - SetStatus(DllExports::GdipGetFontHeightGivenDPI(nativeFont, dpi, &height)); - return height; -} -#endif - - -// protected method -inline -Font::Font(IN GpFont* font, - IN Status status) -{ - lastResult = status; - SetNativeFont(font); -} - -// protected method -inline VOID -Font::SetNativeFont(GpFont *Font) -{ - nativeFont = Font; -} - -inline Status -Font::GetLastStatus(void) const -{ - return lastResult; -} - -// protected method -inline Status -Font::SetStatus(IN Status status) const -{ - if (status != Ok) - return (lastResult = status); - else - return status; -} - -#endif diff --git a/src/includes/GdiPlusFontCollection.h b/src/includes/GdiPlusFontCollection.h deleted file mode 100644 index 2f3351c9..00000000 --- a/src/includes/GdiPlusFontCollection.h +++ /dev/null @@ -1,149 +0,0 @@ -/**************************************************************************\ -* -* Copyright (c) 2000, Microsoft Corp. All Rights Reserved. -* -* Module Name: -* -* GdiplusFontCollection.h -* -* Abstract: -* -* Font collections (Installed and Private) -* -\**************************************************************************/ - -#ifndef _GDIPLUSFONTCOLL_H -#define _GDIPLUSFONTCOLL_H - -inline -FontCollection::FontCollection() -{ - nativeFontCollection = NULL; -} - -inline -FontCollection::~FontCollection() -{ -} - -inline INT -FontCollection::GetFamilyCount() const -{ - INT numFound = 0; - - lastResult = DllExports::GdipGetFontCollectionFamilyCount( - nativeFontCollection, &numFound); - - - - return numFound; -} - -inline Status -FontCollection::GetFamilies( - IN INT numSought, - OUT FontFamily * gpfamilies, - OUT INT * numFound -) const -{ - if (numSought <= 0 || gpfamilies == NULL || numFound == NULL) - { - return SetStatus(InvalidParameter); - } - *numFound = 0; - GpFontFamily **nativeFamilyList = new GpFontFamily*[numSought]; - - if (nativeFamilyList == NULL) - { - return SetStatus(OutOfMemory); - } - - Status status = SetStatus(DllExports::GdipGetFontCollectionFamilyList( - nativeFontCollection, - numSought, - nativeFamilyList, - numFound - )); - if (status == Ok) - { - for (INT i = 0; i < *numFound; i++) - { - DllExports::GdipCloneFontFamily(nativeFamilyList[i], - &gpfamilies[i].nativeFamily); - } - } - - delete [] nativeFamilyList; - - return status; -} - -inline Status FontCollection::GetLastStatus () const -{ - return lastResult; -} - -// protected method -inline Status -FontCollection::SetStatus(IN Status status) const -{ - lastResult = status; - return lastResult; -} - -inline -InstalledFontCollection::InstalledFontCollection() -{ - nativeFontCollection = NULL; - lastResult = DllExports::GdipNewInstalledFontCollection(&nativeFontCollection); -} - -inline -InstalledFontCollection::~InstalledFontCollection() -{ -} - -#ifndef DCR_USE_NEW_235072 -inline Status -InstalledFontCollection::InstallFontFile(IN const WCHAR* filename) -{ - return SetStatus(DllExports::GdipInstallFontFile(nativeFontCollection, filename)); -} - -inline Status -InstalledFontCollection::UninstallFontFile(IN const WCHAR* filename) -{ - return SetStatus(DllExports::GdipUninstallFontFile(nativeFontCollection, filename)); -} -#endif - -inline -PrivateFontCollection::PrivateFontCollection() -{ - nativeFontCollection = NULL; - lastResult = DllExports::GdipNewPrivateFontCollection(&nativeFontCollection); -} - -inline -PrivateFontCollection::~PrivateFontCollection() -{ - DllExports::GdipDeletePrivateFontCollection(&nativeFontCollection); -} - -inline Status -PrivateFontCollection::AddFontFile(IN const WCHAR* filename) -{ - return SetStatus(DllExports::GdipPrivateAddFontFile(nativeFontCollection, filename)); -} - -inline Status -PrivateFontCollection::AddMemoryFont(IN const void* memory, - IN INT length) -{ - return SetStatus(DllExports::GdipPrivateAddMemoryFont( - nativeFontCollection, - memory, - length)); -} - -#endif // _GDIPLUSFONTCOLL_H diff --git a/src/includes/GdiPlusFontFamily.h b/src/includes/GdiPlusFontFamily.h deleted file mode 100644 index 076e1572..00000000 --- a/src/includes/GdiPlusFontFamily.h +++ /dev/null @@ -1,271 +0,0 @@ -/**************************************************************************\ -* -* Copyright (c) 1998-2000, Microsoft Corp. All Rights Reserved. -* -* Module Name: -* -* GdiplusFontFamily.h -* -* Abstract: -* -* Font family API related declarations -* -\**************************************************************************/ - -#ifndef _GDIPLUS_FONT_FAMILY_H -#define _GDIPLUS_FONT_FAMILY_H - -inline -FontFamily::FontFamily() : - nativeFamily (NULL), - lastResult (Ok) -{ -} - -inline -FontFamily::FontFamily( - IN const WCHAR* name, - IN const FontCollection* fontCollection -) -{ - nativeFamily = NULL; - lastResult = DllExports::GdipCreateFontFamilyFromName( - name, - fontCollection ? fontCollection->nativeFontCollection : NULL, - &nativeFamily - ); - -#ifndef DCR_USE_NEW_135429 - if ((INT) lastResult >= 10) - lastResult = NotFound; -#endif -} - -// private method -inline -FontFamily::FontFamily( - IN GpFontFamily *nativeOrig, - IN Status status -) -{ - lastResult = status; - nativeFamily = nativeOrig; -} - -// Generic font family access - -inline const FontFamily * -FontFamily::GenericSansSerif() -{ - if (GenericSansSerifFontFamily != NULL) - { - return GenericSansSerifFontFamily; - } - - GenericSansSerifFontFamily = - (FontFamily*) GenericSansSerifFontFamilyBuffer; - - GenericSansSerifFontFamily->lastResult = - DllExports::GdipGetGenericFontFamilySansSerif( - &(GenericSansSerifFontFamily->nativeFamily) - ); - -#ifndef DCR_USE_NEW_135429 - if ((INT) GenericSansSerifFontFamily->lastResult >= 10) - GenericSansSerifFontFamily->lastResult = NotFound; -#endif - - return GenericSansSerifFontFamily; -} - -inline const FontFamily * -FontFamily::GenericSerif() -{ - if (GenericSerifFontFamily != NULL) - { - return GenericSerifFontFamily; - } - - GenericSerifFontFamily = - (FontFamily*) GenericSerifFontFamilyBuffer; - - GenericSerifFontFamily->lastResult = - DllExports::GdipGetGenericFontFamilySerif( - &(GenericSerifFontFamily->nativeFamily) - ); - -#ifndef DCR_USE_NEW_135429 - if ((INT) GenericSerifFontFamily->lastResult >= 10) - GenericSerifFontFamily->lastResult = NotFound; -#endif - - return GenericSerifFontFamily; -} - -inline const FontFamily * -FontFamily::GenericMonospace() -{ - if (GenericMonospaceFontFamily != NULL) - { - return GenericMonospaceFontFamily; - } - - GenericMonospaceFontFamily = - (FontFamily*) GenericMonospaceFontFamilyBuffer; - - GenericMonospaceFontFamily->lastResult = - DllExports::GdipGetGenericFontFamilyMonospace( - &(GenericMonospaceFontFamily->nativeFamily) - ); - -#ifndef DCR_USE_NEW_135429 - if ((INT) GenericMonospaceFontFamily->lastResult >= 10) - GenericMonospaceFontFamily->lastResult = NotFound; -#endif - - return GenericMonospaceFontFamily; -} - -inline FontFamily::~FontFamily() -{ - DllExports::GdipDeleteFontFamily (nativeFamily); -} - -inline FontFamily * -FontFamily::Clone() const -{ - GpFontFamily * clonedFamily = NULL; - - SetStatus(DllExports::GdipCloneFontFamily (nativeFamily, &clonedFamily)); - - return new FontFamily(clonedFamily, lastResult); -} - -inline Status -FontFamily::GetFamilyName( - IN WCHAR name[LF_FACESIZE], - IN LANGID language -) const -{ - return SetStatus(DllExports::GdipGetFamilyName(nativeFamily, - name, - language)); -} - -inline BOOL -FontFamily::IsStyleAvailable(IN INT style) const -{ - BOOL StyleAvailable; - Status status; - - status = SetStatus(DllExports::GdipIsStyleAvailable(nativeFamily, style, &StyleAvailable)); - - if (status != Ok) - StyleAvailable = FALSE; - - return StyleAvailable; -} - - -inline UINT16 -FontFamily::GetEmHeight(IN INT style) const -{ - UINT16 EmHeight; - - SetStatus(DllExports::GdipGetEmHeight(nativeFamily, style, &EmHeight)); - - return EmHeight; -} - -inline UINT16 -FontFamily::GetCellAscent(IN INT style) const -{ - UINT16 CellAscent; - - SetStatus(DllExports::GdipGetCellAscent(nativeFamily, style, &CellAscent)); - - return CellAscent; -} - -inline UINT16 -FontFamily::GetCellDescent(IN INT style) const -{ - UINT16 CellDescent; - - SetStatus(DllExports::GdipGetCellDescent(nativeFamily, style, &CellDescent)); - - return CellDescent; -} - - -inline UINT16 -FontFamily::GetLineSpacing(IN INT style) const -{ - UINT16 LineSpacing; - - SetStatus(DllExports::GdipGetLineSpacing(nativeFamily, style, &LineSpacing)); - - return LineSpacing; - -} - -#ifdef TEXTV2 - -// The following APIs return data from the font OS/2 table - -inline INT16 -FontFamily::GetTypographicAscent(IN INT style) const -{ - INT16 TypographicAscent; - - SetStatus(DllExports::GdipGetTypographicAscent(nativeFamily, style, &TypographicAscent)); - - return TypographicAscent; -} - -inline INT16 -FontFamily::GetTypographicDescent(IN INT style) const -{ - INT16 TypographicDescent; - - SetStatus(DllExports::GdipGetTypographicDescent(nativeFamily, style, &TypographicDescent)); - - return TypographicDescent; -} - -inline INT16 -FontFamily::GetTypographicLineGap(IN INT style) const -{ - INT16 TypographicLineGap; - - SetStatus(DllExports::GdipGetTypographicLineGap(nativeFamily, style, &TypographicLineGap)); - - return TypographicLineGap; -} - -#endif - -/////////////////////////////////////////////////////////// - -// GetLastStatus - return last error code and clear error code - -inline Status -FontFamily::GetLastStatus() const -{ - Status lastStatus = lastResult; - lastResult = Ok; - - return lastStatus; -} - -// protected method -inline Status -FontFamily::SetStatus(Status status) const -{ - if (status != Ok) - return (lastResult = status); - else - return status; -} - -#endif diff --git a/src/includes/GdiPlusGpStubs.h b/src/includes/GdiPlusGpStubs.h deleted file mode 100644 index 4f6066cc..00000000 --- a/src/includes/GdiPlusGpStubs.h +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************\ -* -* Copyright (c) 1998-2000, Microsoft Corp. All Rights Reserved. -* -* Module Name: -* -* GdiplusGpStubs.h -* -* Abstract: -* -* GDI+ Native C++ public header file -* -\**************************************************************************/ - -#ifndef _GDIPLUSGPSTUBS_H -#define _GDIPLUSGPSTUBS_H - -//--------------------------------------------------------------------------- -// GDI+ classes for forward reference -//--------------------------------------------------------------------------- - -class Graphics; -class Pen; -class Brush; -class Matrix; -class Bitmap; -class Metafile; -class GraphicsPath; -class PathIterator; -class Region; -class Image; -class TextureBrush; -class HatchBrush; -class SolidBrush; -class LinearGradientBrush; -class PathGradientBrush; -class Font; -class FontFamily; -class FontCollection; -class InstalledFontCollection; -class PrivateFontCollection; -class ImageAttributes; -class CachedBitmap; - -//--------------------------------------------------------------------------- -// Internal GDI+ classes for internal type checking -//--------------------------------------------------------------------------- -class GpGraphics {}; - -class GpBrush {}; -class GpTexture : public GpBrush {}; -class GpSolidFill : public GpBrush {}; -class GpLineGradient : public GpBrush {}; -class GpPathGradient : public GpBrush {}; -class GpHatch : public GpBrush {}; - -class GpPen {}; -class GpCustomLineCap {}; -class GpAdjustableArrowCap : public GpCustomLineCap {}; - -class GpImage {}; -class GpBitmap : public GpImage {}; -class GpMetafile : public GpImage {}; -class GpImageAttributes {}; - -class GpPath {}; -class GpRegion {}; -class GpPathIterator {}; - -class GpFontFamily {}; -class GpFont {}; -class GpStringFormat {}; -class GpFontCollection {}; -class GpInstalledFontCollection : public GpFontCollection {}; -class GpPrivateFontCollection : public GpFontCollection {}; - -class GpCachedBitmap; - -typedef Status GpStatus; -typedef FillMode GpFillMode; -typedef WrapMode GpWrapMode; -typedef Unit GpUnit; -typedef CoordinateSpace GpCoordinateSpace; -typedef PointF GpPointF; -typedef Point GpPoint; -typedef RectF GpRectF; -typedef Rect GpRect; -typedef SizeF GpSizeF; -typedef HatchStyle GpHatchStyle; -typedef DashStyle GpDashStyle; -typedef LineCap GpLineCap; -typedef DashCap GpDashCap; - - -typedef PenAlignment GpPenAlignment; - -typedef LineJoin GpLineJoin; -typedef PenType GpPenType; - -typedef Matrix GpMatrix; -typedef BrushType GpBrushType; -typedef MatrixOrder GpMatrixOrder; -typedef FlushIntention GpFlushIntention; -typedef PathData GpPathData; - -#endif // !_GDIPLUSGPSTUBS.HPP - diff --git a/src/includes/GdiPlusGraphics.h b/src/includes/GdiPlusGraphics.h deleted file mode 100644 index 4e4e3dae..00000000 --- a/src/includes/GdiPlusGraphics.h +++ /dev/null @@ -1,2726 +0,0 @@ -/**************************************************************************\ -* -* Copyright (c) 1998-2000, Microsoft Corp. All Rights Reserved. -* -* Module Name: -* -* GdiplusGraphics.h -* -* Abstract: -* -* Declarations for Graphics class -* -\**************************************************************************/ - -#ifndef _GDIPLUSGRAPHICS_H -#define _GDIPLUSGRAPHICS_H - -/** - * Represent a graphics context - */ -class Graphics : public GdiplusBase -{ -public: - friend class Region; - friend class GraphicsPath; - friend class Image; - friend class Bitmap; - friend class Metafile; - friend class Font; - friend class FontFamily; - friend class FontCollection; - friend class CachedBitmap; - - // Get a graphics context from an existing Win32 HDC or HWND - static Graphics* FromHDC(IN HDC hdc) - { - return new Graphics(hdc); - } - - static Graphics* FromHDC(IN HDC hdc, - IN HANDLE hdevice) - { - return new Graphics(hdc, hdevice); - } - - static Graphics* FromHWND(IN HWND hwnd, - IN BOOL icm = FALSE) - { - return new Graphics(hwnd, icm); - } - - static Graphics* FromImage(IN Image *image) - { - return new Graphics(image); - } - - Graphics(IN HDC hdc) - { - GpGraphics *graphics = NULL; - - lastResult = DllExports::GdipCreateFromHDC(hdc, &graphics); - - SetNativeGraphics(graphics); - } - - Graphics(IN HDC hdc, - IN HANDLE hdevice) - { - GpGraphics *graphics = NULL; - - lastResult = DllExports::GdipCreateFromHDC2(hdc, hdevice, &graphics); - - SetNativeGraphics(graphics); - } - - Graphics(IN HWND hwnd, - IN BOOL icm = FALSE) - { - GpGraphics *graphics = NULL; - - if (icm) - { - lastResult = DllExports::GdipCreateFromHWNDICM(hwnd, &graphics); - } - else - { - lastResult = DllExports::GdipCreateFromHWND(hwnd, &graphics); - } - - SetNativeGraphics(graphics); - } - - Graphics(IN Image* image) - { - GpGraphics *graphics = NULL; - - if (image != NULL) - { - lastResult = DllExports::GdipGetImageGraphicsContext( - image->nativeImage, &graphics); - } - SetNativeGraphics(graphics); - } - - ~Graphics() - { - DllExports::GdipDeleteGraphics(nativeGraphics); - } - - VOID Flush(IN FlushIntention intention = FlushIntentionFlush) - { - DllExports::GdipFlush(nativeGraphics, intention); - } - - //------------------------------------------------------------------------ - // Interop methods - //------------------------------------------------------------------------ - - // Locks the graphics until ReleaseDC is called - HDC GetHDC() - { - HDC hdc = NULL; - - SetStatus(DllExports::GdipGetDC(nativeGraphics, &hdc)); - - return hdc; - } - - VOID ReleaseHDC(IN HDC hdc) - { - SetStatus(DllExports::GdipReleaseDC(nativeGraphics, hdc)); - } - - //------------------------------------------------------------------------ - // Rendering modes - //------------------------------------------------------------------------ - - Status SetRenderingOrigin(IN INT x, IN INT y) - { - return SetStatus( - DllExports::GdipSetRenderingOrigin( - nativeGraphics, x, y - ) - ); - } - - Status GetRenderingOrigin(OUT INT *x, OUT INT *y) const - { - return SetStatus( - DllExports::GdipGetRenderingOrigin( - nativeGraphics, x, y - ) - ); - } - - Status SetCompositingMode(IN CompositingMode compositingMode) - { - return SetStatus(DllExports::GdipSetCompositingMode(nativeGraphics, - compositingMode)); - } - - CompositingMode GetCompositingMode() const - { - CompositingMode mode; - - SetStatus(DllExports::GdipGetCompositingMode(nativeGraphics, - &mode)); - - return mode; - } - - Status SetCompositingQuality(IN CompositingQuality compositingQuality) - { - return SetStatus(DllExports::GdipSetCompositingQuality( - nativeGraphics, - compositingQuality)); - } - - CompositingQuality GetCompositingQuality() const - { - CompositingQuality quality; - - SetStatus(DllExports::GdipGetCompositingQuality( - nativeGraphics, - &quality)); - - return quality; - } - - Status SetTextRenderingHint(IN TextRenderingHint newMode) - { -#ifndef DCR_USE_NEW_186764 - /* temporarly set the high bit to warn that we are using the new definition for the flag */ - newMode = (TextRenderingHint) (newMode | 0x0f000); -#endif // DCR_USE_NEW_186764 - return SetStatus(DllExports::GdipSetTextRenderingHint(nativeGraphics, - newMode)); - } - - TextRenderingHint GetTextRenderingHint() const - { - TextRenderingHint hint; - - SetStatus(DllExports::GdipGetTextRenderingHint(nativeGraphics, - &hint)); - - return hint; - } - -#ifdef DCR_USE_NEW_188922 - Status SetTextContrast(IN UINT contrast) - { - return SetStatus(DllExports::GdipSetTextContrast(nativeGraphics, - contrast)); - } - - UINT GetTextContrast() const - { - UINT contrast; - - SetStatus(DllExports::GdipGetTextContrast(nativeGraphics, - &contrast)); - - return contrast; - } -#else - Status SetTextGammaValue(IN UINT gammaValue) - { - return SetStatus(DllExports::GdipSetTextGammaValue(nativeGraphics, - gammaValue)); - } - - UINT GetTextGammaValue() const - { - UINT gammaValue; - - SetStatus(DllExports::GdipGetTextGammaValue(nativeGraphics, - &gammaValue)); - - return gammaValue; - } - -#endif // DCR_USE_NEW_188922 - - - InterpolationMode GetInterpolationMode() const - { - InterpolationMode mode = InterpolationModeInvalid; - - SetStatus(DllExports::GdipGetInterpolationMode(nativeGraphics, - &mode)); - - return mode; - } - - Status SetInterpolationMode(IN InterpolationMode interpolationMode) - { - return SetStatus(DllExports::GdipSetInterpolationMode(nativeGraphics, - interpolationMode)); - } - - SmoothingMode GetSmoothingMode() const - { - SmoothingMode smoothingMode = SmoothingModeInvalid; - - SetStatus(DllExports::GdipGetSmoothingMode(nativeGraphics, - &smoothingMode)); - - return smoothingMode; - } - - Status SetSmoothingMode(IN SmoothingMode smoothingMode) - { - return SetStatus(DllExports::GdipSetSmoothingMode(nativeGraphics, - smoothingMode)); - } - - PixelOffsetMode GetPixelOffsetMode() const - { - PixelOffsetMode pixelOffsetMode = PixelOffsetModeInvalid; - - SetStatus(DllExports::GdipGetPixelOffsetMode(nativeGraphics, - &pixelOffsetMode)); - - return pixelOffsetMode; - } - - Status SetPixelOffsetMode(IN PixelOffsetMode pixelOffsetMode) - { - return SetStatus(DllExports::GdipSetPixelOffsetMode(nativeGraphics, - pixelOffsetMode)); - } - - //------------------------------------------------------------------------ - // Manipulate the current world transform - //------------------------------------------------------------------------ - - Status SetTransform(IN const Matrix* matrix) - { - return SetStatus(DllExports::GdipSetWorldTransform(nativeGraphics, - matrix->nativeMatrix)); - } - Status ResetTransform() - { - return SetStatus(DllExports::GdipResetWorldTransform(nativeGraphics)); - } - - Status MultiplyTransform(IN const Matrix* matrix, - IN MatrixOrder order = MatrixOrderPrepend) - { - return SetStatus(DllExports::GdipMultiplyWorldTransform(nativeGraphics, - matrix->nativeMatrix, - order)); - } - - Status TranslateTransform(IN REAL dx, - IN REAL dy, - IN MatrixOrder order = MatrixOrderPrepend) - { - return SetStatus(DllExports::GdipTranslateWorldTransform(nativeGraphics, - dx, dy, order)); - } - - Status ScaleTransform(IN REAL sx, - IN REAL sy, - IN MatrixOrder order = MatrixOrderPrepend) - { - return SetStatus(DllExports::GdipScaleWorldTransform(nativeGraphics, - sx, sy, order)); - } - - Status RotateTransform(IN REAL angle, - IN MatrixOrder order = MatrixOrderPrepend) - { - return SetStatus(DllExports::GdipRotateWorldTransform(nativeGraphics, - angle, order)); - } - - /** - * Return the current world transform - */ - - Status GetTransform(OUT Matrix* matrix) const - { - return SetStatus(DllExports::GdipGetWorldTransform(nativeGraphics, - matrix->nativeMatrix)); - } - - /** - * Manipulate the current page transform - */ - - Status SetPageUnit(IN Unit unit) - { - return SetStatus(DllExports::GdipSetPageUnit(nativeGraphics, - unit)); - } - - Status SetPageScale(IN REAL scale) - { - return SetStatus(DllExports::GdipSetPageScale(nativeGraphics, - scale)); - } - - /** - * Retrieve the current page transform information - * notes @ these are atomic - */ - Unit GetPageUnit() const - { - Unit unit; - - SetStatus(DllExports::GdipGetPageUnit(nativeGraphics, &unit)); - - return unit; - } - - REAL GetPageScale() const - { - REAL scale; - - SetStatus(DllExports::GdipGetPageScale(nativeGraphics, &scale)); - - return scale; - } - - REAL GetDpiX() const - { - REAL dpi; - - SetStatus(DllExports::GdipGetDpiX(nativeGraphics, &dpi)); - - return dpi; - } - - REAL GetDpiY() const - { - REAL dpi; - - SetStatus(DllExports::GdipGetDpiY(nativeGraphics, &dpi)); - - return dpi; - } - - /** - * Transform points in the current graphics context - */ - // float version - Status TransformPoints(IN CoordinateSpace destSpace, - IN CoordinateSpace srcSpace, - IN OUT PointF* pts, - IN INT count) const - { - return SetStatus(DllExports::GdipTransformPoints(nativeGraphics, - destSpace, - srcSpace, - pts, - count)); - } - - // integer version - Status TransformPoints(IN CoordinateSpace destSpace, - IN CoordinateSpace srcSpace, - IN OUT Point* pts, - IN INT count) const - { - - return SetStatus(DllExports::GdipTransformPointsI(nativeGraphics, - destSpace, - srcSpace, - pts, - count)); - } - - //------------------------------------------------------------------------ - // GetNearestColor (for <= 8bpp surfaces) - // Note: alpha is ignored - //------------------------------------------------------------------------ - Status GetNearestColor(IN OUT Color* color) const - { - if (color == NULL) - { - return SetStatus(InvalidParameter); - } - - ARGB argb = color->GetValue(); - - Status status = SetStatus(DllExports::GdipGetNearestColor(nativeGraphics, &argb)); - - color->SetValue(argb); - - return status; - } - - /** - * Vector drawing methods - * - * @notes Do we need a set of methods that take - * integer coordinate parameters? - */ - - // float version - Status DrawLine(IN const Pen* pen, - IN REAL x1, - IN REAL y1, - IN REAL x2, - IN REAL y2) - { - return SetStatus(DllExports::GdipDrawLine(nativeGraphics, - pen->nativePen, x1, y1, x2, - y2)); - } - - Status DrawLine(IN const Pen* pen, - IN const PointF& pt1, - IN const PointF& pt2) - { - return DrawLine(pen, pt1.X, pt1.Y, pt2.X, pt2.Y); - } - - Status DrawLines(IN const Pen* pen, - IN const PointF* points, - IN INT count) - { - return SetStatus(DllExports::GdipDrawLines(nativeGraphics, - pen->nativePen, - points, count)); - } - - // int version - Status DrawLine(IN const Pen* pen, - IN INT x1, - IN INT y1, - IN INT x2, - IN INT y2) - { - return SetStatus(DllExports::GdipDrawLineI(nativeGraphics, - pen->nativePen, - x1, - y1, - x2, - y2)); - } - - Status DrawLine(IN const Pen* pen, - IN const Point& pt1, - IN const Point& pt2) - { - return DrawLine(pen, - pt1.X, - pt1.Y, - pt2.X, - pt2.Y); - } - - Status DrawLines(IN const Pen* pen, - IN const Point* points, - IN INT count) - { - return SetStatus(DllExports::GdipDrawLinesI(nativeGraphics, - pen->nativePen, - points, - count)); - } - - // float version - Status DrawArc(IN const Pen* pen, - IN REAL x, - IN REAL y, - IN REAL width, - IN REAL height, - IN REAL startAngle, - IN REAL sweepAngle) - { - return SetStatus(DllExports::GdipDrawArc(nativeGraphics, - pen->nativePen, - x, - y, - width, - height, - startAngle, - sweepAngle)); - } - - Status DrawArc(IN const Pen* pen, - IN const RectF& rect, - IN REAL startAngle, - IN REAL sweepAngle) - { - return DrawArc(pen, rect.X, rect.Y, rect.Width, rect.Height, - startAngle, sweepAngle); - } - - // int version - Status DrawArc(IN const Pen* pen, - IN INT x, - IN INT y, - IN INT width, - IN INT height, - IN REAL startAngle, - IN REAL sweepAngle) - { - return SetStatus(DllExports::GdipDrawArcI(nativeGraphics, - pen->nativePen, - x, - y, - width, - height, - startAngle, - sweepAngle)); - } - - - Status DrawArc(IN const Pen* pen, - IN const Rect& rect, - IN REAL startAngle, - IN REAL sweepAngle) - { - return DrawArc(pen, - rect.X, - rect.Y, - rect.Width, - rect.Height, - startAngle, - sweepAngle); - } - - // float version - Status DrawBezier(IN const Pen* pen, - IN REAL x1, - IN REAL y1, - IN REAL x2, - IN REAL y2, - IN REAL x3, - IN REAL y3, - IN REAL x4, - IN REAL y4) - { - return SetStatus(DllExports::GdipDrawBezier(nativeGraphics, - pen->nativePen, x1, y1, - x2, y2, x3, y3, x4, y4)); - } - - Status DrawBezier(IN const Pen* pen, - IN const PointF& pt1, - IN const PointF& pt2, - IN const PointF& pt3, - IN const PointF& pt4) - { - return DrawBezier(pen, - pt1.X, - pt1.Y, - pt2.X, - pt2.Y, - pt3.X, - pt3.Y, - pt4.X, - pt4.Y); - } - - Status DrawBeziers(IN const Pen* pen, - IN const PointF* points, - IN INT count) - { - return SetStatus(DllExports::GdipDrawBeziers(nativeGraphics, - pen->nativePen, - points, - count)); - } - - // int version - Status DrawBezier(IN const Pen* pen, - IN INT x1, - IN INT y1, - IN INT x2, - IN INT y2, - IN INT x3, - IN INT y3, - IN INT x4, - IN INT y4) - { - return SetStatus(DllExports::GdipDrawBezierI(nativeGraphics, - pen->nativePen, - x1, - y1, - x2, - y2, - x3, - y3, - x4, - y4)); - } - - Status DrawBezier(IN const Pen* pen, - IN const Point& pt1, - IN const Point& pt2, - IN const Point& pt3, - IN const Point& pt4) - { - return DrawBezier(pen, - pt1.X, - pt1.Y, - pt2.X, - pt2.Y, - pt3.X, - pt3.Y, - pt4.X, - pt4.Y); - } - - Status DrawBeziers(IN const Pen* pen, - IN const Point* points, - IN INT count) - { - return SetStatus(DllExports::GdipDrawBeziersI(nativeGraphics, - pen->nativePen, - points, - count)); - } - - // float version - Status DrawRectangle(IN const Pen* pen, - IN const RectF& rect) - { - return DrawRectangle(pen, rect.X, rect.Y, rect.Width, rect.Height); - } - - Status DrawRectangle(IN const Pen* pen, - IN REAL x, - IN REAL y, - IN REAL width, - IN REAL height) - { - return SetStatus(DllExports::GdipDrawRectangle(nativeGraphics, - pen->nativePen, x, y, - width, height)); - } - - Status DrawRectangles(IN const Pen* pen, - IN const RectF* rects, - IN INT count) - { - return SetStatus(DllExports::GdipDrawRectangles(nativeGraphics, - pen->nativePen, - rects, count)); - } - - // integer version - Status DrawRectangle(IN const Pen* pen, - IN const Rect& rect) - { - return DrawRectangle(pen, - rect.X, - rect.Y, - rect.Width, - rect.Height); - } - - Status DrawRectangle(IN const Pen* pen, - IN INT x, - IN INT y, - IN INT width, - IN INT height) - { - return SetStatus(DllExports::GdipDrawRectangleI(nativeGraphics, - pen->nativePen, - x, - y, - width, - height)); - } - - Status DrawRectangles(IN const Pen* pen, - IN const Rect* rects, - IN INT count) - { - return SetStatus(DllExports::GdipDrawRectanglesI(nativeGraphics, - pen->nativePen, - rects, - count)); - } - - // float version - Status DrawEllipse(IN const Pen* pen, - IN const RectF& rect) - { - return DrawEllipse(pen, rect.X, rect.Y, rect.Width, rect.Height); - } - - Status DrawEllipse(IN const Pen* pen, - IN REAL x, - IN REAL y, - IN REAL width, - IN REAL height) - { - return SetStatus(DllExports::GdipDrawEllipse(nativeGraphics, - pen->nativePen, - x, - y, - width, - height)); - } - - // integer version - Status DrawEllipse(IN const Pen* pen, - IN const Rect& rect) - { - return DrawEllipse(pen, - rect.X, - rect.Y, - rect.Width, - rect.Height); - } - - Status DrawEllipse(IN const Pen* pen, - IN INT x, - IN INT y, - IN INT width, - IN INT height) - { - return SetStatus(DllExports::GdipDrawEllipseI(nativeGraphics, - pen->nativePen, - x, - y, - width, - height)); - } - - // floating point version - Status DrawPie(IN const Pen* pen, - IN const RectF& rect, - IN REAL startAngle, - IN REAL sweepAngle) - { - return DrawPie(pen, - rect.X, - rect.Y, - rect.Width, - rect.Height, - startAngle, - sweepAngle); - } - - Status DrawPie(IN const Pen* pen, - IN REAL x, - IN REAL y, - IN REAL width, - IN REAL height, - IN REAL startAngle, - IN REAL sweepAngle) - { - return SetStatus(DllExports::GdipDrawPie(nativeGraphics, - pen->nativePen, - x, - y, - width, - height, - startAngle, - sweepAngle)); - } - - // integer point version - Status DrawPie(IN const Pen* pen, - IN const Rect& rect, - IN REAL startAngle, - IN REAL sweepAngle) - { - return DrawPie(pen, - rect.X, - rect.Y, - rect.Width, - rect.Height, - startAngle, - sweepAngle); - } - - Status DrawPie(IN const Pen* pen, - IN INT x, - IN INT y, - IN INT width, - IN INT height, - IN REAL startAngle, - IN REAL sweepAngle) - { - return SetStatus(DllExports::GdipDrawPieI(nativeGraphics, - pen->nativePen, - x, - y, - width, - height, - startAngle, - sweepAngle)); - } - - // float version - Status DrawPolygon(IN const Pen* pen, - IN const PointF* points, - IN INT count) - { - return SetStatus(DllExports::GdipDrawPolygon(nativeGraphics, - pen->nativePen, - points, - count)); - } - - // integer version - Status DrawPolygon(IN const Pen* pen, - IN const Point* points, - IN INT count) - { - return SetStatus(DllExports::GdipDrawPolygonI(nativeGraphics, - pen->nativePen, - points, - count)); - } - - // float version - Status DrawPath(IN const Pen* pen, - IN const GraphicsPath* path) - { - return SetStatus(DllExports::GdipDrawPath(nativeGraphics, - pen ? pen->nativePen : NULL, - path ? path->nativePath : NULL)); - } - - // float version - Status DrawCurve(IN const Pen* pen, - IN const PointF* points, - IN INT count) - { - return SetStatus(DllExports::GdipDrawCurve(nativeGraphics, - pen->nativePen, points, - count)); - } - - Status DrawCurve(IN const Pen* pen, - IN const PointF* points, - IN INT count, - IN REAL tension) - { - return SetStatus(DllExports::GdipDrawCurve2(nativeGraphics, - pen->nativePen, points, - count, tension)); - } - - Status DrawCurve(IN const Pen* pen, - IN const PointF* points, - IN INT count, - IN INT offset, - IN INT numberOfSegments, - IN REAL tension = 0.5f) - { - return SetStatus(DllExports::GdipDrawCurve3(nativeGraphics, - pen->nativePen, points, - count, offset, - numberOfSegments, tension)); - } - - // integer version - Status DrawCurve(IN const Pen* pen, - IN const Point* points, - IN INT count) - { - return SetStatus(DllExports::GdipDrawCurveI(nativeGraphics, - pen->nativePen, - points, - count)); - } - - Status DrawCurve(IN const Pen* pen, - IN const Point* points, - IN INT count, - IN REAL tension) - { - return SetStatus(DllExports::GdipDrawCurve2I(nativeGraphics, - pen->nativePen, - points, - count, - tension)); - } - - Status DrawCurve(IN const Pen* pen, - IN const Point* points, - IN INT count, - IN INT offset, - IN INT numberOfSegments, - IN REAL tension = 0.5f) - { - return SetStatus(DllExports::GdipDrawCurve3I(nativeGraphics, - pen->nativePen, - points, - count, - offset, - numberOfSegments, - tension)); - } - - // float version - Status DrawClosedCurve(IN const Pen* pen, - IN const PointF* points, - IN INT count) - { - return SetStatus(DllExports::GdipDrawClosedCurve(nativeGraphics, - pen->nativePen, - points, count)); - } - - Status DrawClosedCurve(IN const Pen *pen, - IN const PointF* points, - IN INT count, - IN REAL tension) - { - return SetStatus(DllExports::GdipDrawClosedCurve2(nativeGraphics, - pen->nativePen, - points, count, - tension)); - } - - // integer version - Status DrawClosedCurve(IN const Pen* pen, - IN const Point* points, - IN INT count) - { - return SetStatus(DllExports::GdipDrawClosedCurveI(nativeGraphics, - pen->nativePen, - points, - count)); - } - - Status DrawClosedCurve(IN const Pen *pen, - IN const Point* points, - IN INT count, - IN REAL tension) - { - return SetStatus(DllExports::GdipDrawClosedCurve2I(nativeGraphics, - pen->nativePen, - points, - count, - tension)); - } - - Status Clear(IN const Color &color) - { - return SetStatus(DllExports::GdipGraphicsClear( - nativeGraphics, - color.GetValue())); - } - - // float version - Status FillRectangle(IN const Brush* brush, - IN const RectF& rect) - { - return FillRectangle(brush, rect.X, rect.Y, rect.Width, rect.Height); - } - - Status FillRectangle(IN const Brush* brush, - IN REAL x, - IN REAL y, - IN REAL width, - IN REAL height) - { - return SetStatus(DllExports::GdipFillRectangle(nativeGraphics, - brush->nativeBrush, x, y, - width, height)); - } - - Status FillRectangles(IN const Brush* brush, - IN const RectF* rects, - IN INT count) - { - return SetStatus(DllExports::GdipFillRectangles(nativeGraphics, - brush->nativeBrush, - rects, count)); - } - - // integer version - Status FillRectangle(IN const Brush* brush, - IN const Rect& rect) - { - return FillRectangle(brush, - rect.X, - rect.Y, - rect.Width, - rect.Height); - } - - Status FillRectangle(IN const Brush* brush, - IN INT x, - IN INT y, - IN INT width, - IN INT height) - { - return SetStatus(DllExports::GdipFillRectangleI(nativeGraphics, - brush->nativeBrush, - x, - y, - width, - height)); - } - - Status FillRectangles(IN const Brush* brush, - IN const Rect* rects, - IN INT count) - { - return SetStatus(DllExports::GdipFillRectanglesI(nativeGraphics, - brush->nativeBrush, - rects, - count)); - } - - // float version - Status FillPolygon(IN const Brush* brush, - IN const PointF* points, - IN INT count) - { - return FillPolygon(brush, points, count, FillModeAlternate); - } - - Status FillPolygon(IN const Brush* brush, - IN const PointF* points, - IN INT count, - IN FillMode fillMode) - { - return SetStatus(DllExports::GdipFillPolygon(nativeGraphics, - brush->nativeBrush, - points, count, fillMode)); - } - - // integer version - Status FillPolygon(IN const Brush* brush, - IN const Point* points, - IN INT count) - { - return FillPolygon(brush, points, count, FillModeAlternate); - } - - Status FillPolygon(IN const Brush* brush, - IN const Point* points, - IN INT count, - IN FillMode fillMode) - { - return SetStatus(DllExports::GdipFillPolygonI(nativeGraphics, - brush->nativeBrush, - points, count, - fillMode)); - } - - // float version - Status FillEllipse(IN const Brush* brush, - IN const RectF& rect) - { - return FillEllipse(brush, rect.X, rect.Y, rect.Width, rect.Height); - } - - Status FillEllipse(IN const Brush* brush, - IN REAL x, - IN REAL y, - IN REAL width, - IN REAL height) - { - return SetStatus(DllExports::GdipFillEllipse(nativeGraphics, - brush->nativeBrush, x, y, - width, height)); - } - - // integer version - Status FillEllipse(IN const Brush* brush, - IN const Rect& rect) - { - return FillEllipse(brush, rect.X, rect.Y, rect.Width, rect.Height); - } - - Status FillEllipse(IN const Brush* brush, - IN INT x, - IN INT y, - IN INT width, - IN INT height) - { - return SetStatus(DllExports::GdipFillEllipseI(nativeGraphics, - brush->nativeBrush, - x, - y, - width, - height)); - } - - // float version - Status FillPie(IN const Brush* brush, - IN const RectF& rect, - IN REAL startAngle, - IN REAL sweepAngle) - { - return FillPie(brush, rect.X, rect.Y, rect.Width, rect.Height, - startAngle, sweepAngle); - } - - Status FillPie(IN const Brush* brush, - IN REAL x, - IN REAL y, - IN REAL width, - IN REAL height, - IN REAL startAngle, - IN REAL sweepAngle) - { - return SetStatus(DllExports::GdipFillPie(nativeGraphics, - brush->nativeBrush, x, y, - width, height, startAngle, - sweepAngle)); - } - - // integer version - Status FillPie(IN const Brush* brush, - IN const Rect& rect, - IN REAL startAngle, - IN REAL sweepAngle) - { - return FillPie(brush, rect.X, rect.Y, rect.Width, rect.Height, - startAngle, sweepAngle); - } - - Status FillPie(IN const Brush* brush, - IN INT x, - IN INT y, - IN INT width, - IN INT height, - IN REAL startAngle, - IN REAL sweepAngle) - { - return SetStatus(DllExports::GdipFillPieI(nativeGraphics, - brush->nativeBrush, - x, - y, - width, - height, - startAngle, - sweepAngle)); - } - - Status FillPath(IN const Brush* brush, - IN const GraphicsPath* path) - { - return SetStatus(DllExports::GdipFillPath(nativeGraphics, - brush->nativeBrush, - path->nativePath)); - } - - // float version - Status FillClosedCurve(IN const Brush* brush, - IN const PointF* points, - IN INT count) - { - return SetStatus(DllExports::GdipFillClosedCurve(nativeGraphics, - brush->nativeBrush, - points, count)); - - } - - Status FillClosedCurve(IN const Brush* brush, - IN const PointF* points, - IN INT count, - IN FillMode fillMode, - IN REAL tension = 0.5f) - { - return SetStatus(DllExports::GdipFillClosedCurve2(nativeGraphics, - brush->nativeBrush, - points, count, - tension, fillMode)); - } - - // integer version - Status FillClosedCurve(IN const Brush* brush, - IN const Point* points, - IN INT count) - { - return SetStatus(DllExports::GdipFillClosedCurveI(nativeGraphics, - brush->nativeBrush, - points, - count)); - } - - Status FillClosedCurve(IN const Brush* brush, - IN const Point* points, - IN INT count, - IN FillMode fillMode, - IN REAL tension = 0.5f) - { - return SetStatus(DllExports::GdipFillClosedCurve2I(nativeGraphics, - brush->nativeBrush, - points, count, - tension, fillMode)); - } - - // float version - Status FillRegion(IN const Brush* brush, - IN const Region* region) - { - return SetStatus(DllExports::GdipFillRegion(nativeGraphics, - brush->nativeBrush, - region->nativeRegion)); - } - - // DrawString and MeasureString - Status - DrawString( - IN const WCHAR *string, - IN INT length, - IN const Font *font, - IN const RectF &layoutRect, - IN const StringFormat *stringFormat, - IN const Brush *brush - ) - { - return SetStatus(DllExports::GdipDrawString( - nativeGraphics, - string, - length, - font ? font->nativeFont : NULL, - &layoutRect, - stringFormat ? stringFormat->nativeFormat : NULL, - brush ? brush->nativeBrush : NULL - )); - } - - Status - DrawString( - const WCHAR *string, - INT length, - const Font *font, - const PointF &origin, - const Brush *brush - ) - { - RectF rect(origin.X, origin.Y, 0.0f, 0.0f); - - return SetStatus(DllExports::GdipDrawString( - nativeGraphics, - string, - length, - font ? font->nativeFont : NULL, - &rect, - NULL, - brush ? brush->nativeBrush : NULL - )); - } - - Status - DrawString( - const WCHAR *string, - INT length, - const Font *font, - const PointF &origin, - const StringFormat *stringFormat, - const Brush *brush - ) - { - RectF rect(origin.X, origin.Y, 0.0f, 0.0f); - - return SetStatus(DllExports::GdipDrawString( - nativeGraphics, - string, - length, - font ? font->nativeFont : NULL, - &rect, - stringFormat ? stringFormat->nativeFormat : NULL, - brush ? brush->nativeBrush : NULL - )); - } - - Status - MeasureString( - IN const WCHAR *string, - IN INT length, - IN const Font *font, - IN const RectF &layoutRect, - IN const StringFormat *stringFormat, - OUT RectF *boundingBox, - OUT INT *codepointsFitted = 0, - OUT INT *linesFilled = 0 - ) const - { - return SetStatus(DllExports::GdipMeasureString( - nativeGraphics, - string, - length, - font ? font->nativeFont : NULL, - &layoutRect, - stringFormat ? stringFormat->nativeFormat : NULL, - boundingBox, - codepointsFitted, - linesFilled - )); - } - - Status - MeasureString( - IN const WCHAR *string, - IN INT length, - IN const Font *font, - IN const SizeF &layoutRectSize, - IN const StringFormat *stringFormat, - OUT SizeF *size, - OUT INT *codepointsFitted = 0, - OUT INT *linesFilled = 0 - ) const - { - RectF layoutRect(0, 0, layoutRectSize.Width, layoutRectSize.Height); - RectF boundingBox; - Status status; - - if (size == NULL) - { - return SetStatus(InvalidParameter); - } - - status = SetStatus(DllExports::GdipMeasureString( - nativeGraphics, - string, - length, - font ? font->nativeFont : NULL, - &layoutRect, - stringFormat ? stringFormat->nativeFormat : NULL, - size ? &boundingBox : NULL, - codepointsFitted, - linesFilled - )); - - if (size && status == Ok) - { - size->Width = boundingBox.Width; - size->Height = boundingBox.Height; - } - - return status; - } - - Status - MeasureString( - IN const WCHAR *string, - IN INT length, - IN const Font *font, - IN const PointF &origin, - IN const StringFormat *stringFormat, - OUT RectF *boundingBox - ) const - { - RectF rect(origin.X, origin.Y, 0.0f, 0.0f); - - return SetStatus(DllExports::GdipMeasureString( - nativeGraphics, - string, - length, - font ? font->nativeFont : NULL, - &rect, - stringFormat ? stringFormat->nativeFormat : NULL, - boundingBox, - NULL, - NULL - )); - } - - - Status - MeasureString( - IN const WCHAR *string, - IN INT length, - IN const Font *font, - IN const RectF &layoutRect, - OUT RectF *boundingBox - ) const - { - return SetStatus(DllExports::GdipMeasureString( - nativeGraphics, - string, - length, - font ? font->nativeFont : NULL, - &layoutRect, - NULL, - boundingBox, - NULL, - NULL - )); - } - - Status - MeasureString( - IN const WCHAR *string, - IN INT length, - IN const Font *font, - IN const PointF &origin, - OUT RectF *boundingBox - ) const - { - RectF rect(origin.X, origin.Y, 0.0f, 0.0f); - - return SetStatus(DllExports::GdipMeasureString( - nativeGraphics, - string, - length, - font ? font->nativeFont : NULL, - &rect, - NULL, - boundingBox, - NULL, - NULL - )); - } - - -#ifdef DCR_USE_NEW_174340 - Status - MeasureCharacterRanges( - IN const WCHAR *string, - IN INT length, - IN const Font *font, - IN const RectF &layoutRect, - IN const StringFormat *stringFormat, - IN INT regionCount, - OUT Region *regions - ) const - { - if (!regions || regionCount <= 0) - { - return InvalidParameter; - } - - GpRegion **nativeRegions = new GpRegion* [regionCount]; - - if (!nativeRegions) - { - return OutOfMemory; - } - - for (INT i = 0; i < regionCount; i++) - { - nativeRegions[i] = regions[i].nativeRegion; - } - - Status status = SetStatus(DllExports::GdipMeasureCharacterRanges( - nativeGraphics, - string, - length, - font ? font->nativeFont : NULL, - layoutRect, - stringFormat ? stringFormat->nativeFormat : NULL, - regionCount, - nativeRegions - )); - - delete [] nativeRegions; - - return status; - } -#endif - - -#ifndef DCR_USE_NEW_174340 - Status - MeasureStringRegion( - IN const WCHAR *string, - IN INT length, - IN const Font *font, - IN const RectF &layoutRect, - IN const StringFormat *stringFormat, - IN INT firstCharacterIndex, - IN INT characterCount, - OUT Region *region - ) const - { - if (region == NULL) - { - return SetStatus(InvalidParameter); - } - - return (SetStatus(DllExports::GdipMeasureStringRegion( - nativeGraphics, - string, - length, - font ? font->nativeFont : NULL, - layoutRect, - stringFormat ? stringFormat->nativeFormat : NULL, - firstCharacterIndex, - characterCount, - region->nativeRegion))); - } -#endif - - Status DrawDriverString( - IN const UINT16 *text, - IN INT length, - IN const Font *font, - IN const Brush *brush, - IN const PointF *positions, - IN INT flags, - IN const Matrix *matrix - ) - { - return SetStatus(DllExports::GdipDrawDriverString( - nativeGraphics, - text, - length, - font ? font->nativeFont : NULL, - brush ? brush->nativeBrush : NULL, - positions, - flags, - matrix ? matrix->nativeMatrix : NULL - )); - } - - Status MeasureDriverString( - IN const UINT16 *text, - IN INT length, - IN const Font *font, - IN const PointF *positions, - IN INT flags, - IN const Matrix *matrix, - OUT RectF *boundingBox - ) const - { - return SetStatus(DllExports::GdipMeasureDriverString( - nativeGraphics, - text, - length, - font ? font->nativeFont : NULL, - positions, - flags, - matrix ? matrix->nativeMatrix : NULL, - boundingBox - )); - } - -#ifndef DCR_USE_NEW_168772 - Status DriverStringPointToCodepoint( - IN const UINT16 *text, - IN INT length, - IN const Font *font, - IN const PointF *positions, - IN INT flags, - IN const Matrix *matrix, - IN const PointF &hit, - OUT INT *index, - OUT BOOL *rightEdge, - OUT REAL *distance - ) - { - return SetStatus(DllExports::GdipDriverStringPointToCodepoint( - nativeGraphics, - text, - length, - font ? font->nativeFont : NULL, - positions, - flags, - matrix ? matrix->nativeMatrix : NULL, - &hit, - index, - rightEdge, - distance - )); - } -#endif - - // Draw a cached bitmap on this graphics destination offset by - // x, y. Note this will fail with WrongState if the CachedBitmap - // native format differs from this Graphics. - - Status DrawCachedBitmap(IN CachedBitmap *cb, - IN INT x, - IN INT y) - { - return SetStatus(DllExports::GdipDrawCachedBitmap( - nativeGraphics, - cb->nativeCachedBitmap, - x, y - )); - } - - /** - * Draw images (both bitmap and vector) - */ - // float version - Status DrawImage(IN Image* image, - IN const PointF& point) - { - return DrawImage(image, point.X, point.Y); - } - - Status DrawImage(IN Image* image, - IN REAL x, - IN REAL y) - { - return SetStatus(DllExports::GdipDrawImage(nativeGraphics, - image ? image->nativeImage - : NULL, - x, - y)); - } - - Status DrawImage(IN Image* image, - IN const RectF& rect) - { - return DrawImage(image, rect.X, rect.Y, rect.Width, rect.Height); - } - - Status DrawImage(IN Image* image, - IN REAL x, - IN REAL y, - IN REAL width, - IN REAL height) - { - return SetStatus(DllExports::GdipDrawImageRect(nativeGraphics, - image ? image->nativeImage - : NULL, - x, - y, - width, - height)); - } - - // integer version - Status DrawImage(IN Image* image, - IN const Point& point) - { - return DrawImage(image, point.X, point.Y); - } - - Status DrawImage(IN Image* image, - IN INT x, - IN INT y) - { - return SetStatus(DllExports::GdipDrawImageI(nativeGraphics, - image ? image->nativeImage - : NULL, - x, - y)); - } - - Status DrawImage(IN Image* image, - IN const Rect& rect) - { - return DrawImage(image, - rect.X, - rect.Y, - rect.Width, - rect.Height); - } - - Status DrawImage(IN Image* image, - IN INT x, - IN INT y, - IN INT width, - IN INT height) { - return SetStatus(DllExports::GdipDrawImageRectI(nativeGraphics, - image ? image->nativeImage - : NULL, - x, - y, - width, - height)); - } - - /** - * Affine or perspective blt - * destPoints.length = 3: rect => parallelogram - * destPoints[0] <=> top-left corner of the source rectangle - * destPoints[1] <=> top-right corner - * destPoints[2] <=> bottom-left corner - * destPoints.length = 4: rect => quad - * destPoints[3] <=> bottom-right corner - * - * @notes Perspective blt only works for bitmap images. - */ - Status DrawImage(IN Image* image, - IN const PointF* destPoints, - IN INT count) - { - if (count != 3 && count != 4) - return SetStatus(InvalidParameter); - - return SetStatus(DllExports::GdipDrawImagePoints(nativeGraphics, - image ? image->nativeImage - : NULL, - destPoints, count)); - } - - Status DrawImage(IN Image* image, - IN const Point* destPoints, - IN INT count) - { - if (count != 3 && count != 4) - return SetStatus(InvalidParameter); - - return SetStatus(DllExports::GdipDrawImagePointsI(nativeGraphics, - image ? image->nativeImage - : NULL, - destPoints, - count)); - } - - /** - * We need another set of methods similar to the ones above - * that take an additional Rect parameter to specify the - * portion of the source image to be drawn. - */ - // float version - Status DrawImage(IN Image* image, - IN REAL x, - IN REAL y, - IN REAL srcx, - IN REAL srcy, - IN REAL srcwidth, - IN REAL srcheight, - IN Unit srcUnit) - { - return SetStatus(DllExports::GdipDrawImagePointRect(nativeGraphics, - image ? image->nativeImage - : NULL, - x, y, - srcx, srcy, - srcwidth, srcheight, srcUnit)); - } - - Status DrawImage(IN Image* image, - IN const RectF& destRect, - IN REAL srcx, - IN REAL srcy, - IN REAL srcwidth, - IN REAL srcheight, - IN Unit srcUnit, - IN const ImageAttributes* imageAttributes = NULL, - IN DrawImageAbort callback = NULL, - IN VOID* callbackData = NULL) - { - return SetStatus(DllExports::GdipDrawImageRectRect(nativeGraphics, - image ? image->nativeImage - : NULL, - destRect.X, - destRect.Y, - destRect.Width, - destRect.Height, - srcx, srcy, - srcwidth, srcheight, - srcUnit, - imageAttributes - ? imageAttributes->nativeImageAttr - : NULL, - callback, - callbackData)); - } - - Status DrawImage(IN Image* image, - IN const PointF* destPoints, - IN INT count, - IN REAL srcx, - IN REAL srcy, - IN REAL srcwidth, - IN REAL srcheight, - IN Unit srcUnit, - IN const ImageAttributes* imageAttributes = NULL, - IN DrawImageAbort callback = NULL, - IN VOID* callbackData = NULL) - { - return SetStatus(DllExports::GdipDrawImagePointsRect(nativeGraphics, - image ? image->nativeImage - : NULL, - destPoints, count, - srcx, srcy, - srcwidth, - srcheight, - srcUnit, - imageAttributes - ? imageAttributes->nativeImageAttr - : NULL, - callback, - callbackData)); - } - - // integer version - Status DrawImage(IN Image* image, - IN INT x, - IN INT y, - IN INT srcx, - IN INT srcy, - IN INT srcwidth, - IN INT srcheight, - IN Unit srcUnit) - { - return SetStatus(DllExports::GdipDrawImagePointRectI(nativeGraphics, - image ? image->nativeImage - : NULL, - x, - y, - srcx, - srcy, - srcwidth, - srcheight, - srcUnit)); - } - - Status DrawImage(IN Image* image, - IN const Rect& destRect, - IN INT srcx, - IN INT srcy, - IN INT srcwidth, - IN INT srcheight, - IN Unit srcUnit, - IN const ImageAttributes* imageAttributes = NULL, - IN DrawImageAbort callback = NULL, - IN VOID* callbackData = NULL) - { - return SetStatus(DllExports::GdipDrawImageRectRectI(nativeGraphics, - image ? image->nativeImage - : NULL, - destRect.X, - destRect.Y, - destRect.Width, - destRect.Height, - srcx, - srcy, - srcwidth, - srcheight, - srcUnit, - imageAttributes - ? imageAttributes->nativeImageAttr - : NULL, - callback, - callbackData)); - } - - Status DrawImage(IN Image* image, - IN const Point* destPoints, - IN INT count, - IN INT srcx, - IN INT srcy, - IN INT srcwidth, - IN INT srcheight, - IN Unit srcUnit, - IN const ImageAttributes* imageAttributes = NULL, - IN DrawImageAbort callback = NULL, - IN VOID* callbackData = NULL) - { - return SetStatus(DllExports::GdipDrawImagePointsRectI(nativeGraphics, - image ? image->nativeImage - : NULL, - destPoints, - count, - srcx, - srcy, - srcwidth, - srcheight, - srcUnit, - imageAttributes - ? imageAttributes->nativeImageAttr - : NULL, - callback, - callbackData)); - } - - // The following methods are for playing an EMF+ to a graphics - // via the enumeration interface. Each record of the EMF+ is - // sent to the callback (along with the callbackData). Then - // the callback can invoke the Metafile::PlayRecord method - // to play the particular record. - - Status - EnumerateMetafile( - IN const Metafile * metafile, - IN const PointF & destPoint, - IN EnumerateMetafileProc callback, - IN VOID * callbackData = NULL, - IN const ImageAttributes * imageAttributes = NULL - ) - { - return SetStatus(DllExports::GdipEnumerateMetafileDestPoint( - nativeGraphics, - (const GpMetafile *)(metafile ? metafile->nativeImage:NULL), - destPoint, - callback, - callbackData, - imageAttributes ? imageAttributes->nativeImageAttr : NULL)); - } - - Status - EnumerateMetafile( - IN const Metafile * metafile, - IN const Point & destPoint, - IN EnumerateMetafileProc callback, - IN VOID * callbackData = NULL, - IN const ImageAttributes * imageAttributes = NULL - ) - { - return SetStatus(DllExports::GdipEnumerateMetafileDestPointI( - nativeGraphics, - (const GpMetafile *)(metafile ? metafile->nativeImage:NULL), - destPoint, - callback, - callbackData, - imageAttributes ? imageAttributes->nativeImageAttr : NULL)); - } - - Status - EnumerateMetafile( - IN const Metafile * metafile, - IN const RectF & destRect, - IN EnumerateMetafileProc callback, - IN VOID * callbackData = NULL, - IN const ImageAttributes * imageAttributes = NULL - ) - { - return SetStatus(DllExports::GdipEnumerateMetafileDestRect( - nativeGraphics, - (const GpMetafile *)(metafile ? metafile->nativeImage:NULL), - destRect, - callback, - callbackData, - imageAttributes ? imageAttributes->nativeImageAttr : NULL)); - } - - Status - EnumerateMetafile( - IN const Metafile * metafile, - IN const Rect & destRect, - IN EnumerateMetafileProc callback, - IN VOID * callbackData = NULL, - IN const ImageAttributes * imageAttributes = NULL - ) - { - return SetStatus(DllExports::GdipEnumerateMetafileDestRectI( - nativeGraphics, - (const GpMetafile *)(metafile ? metafile->nativeImage:NULL), - destRect, - callback, - callbackData, - imageAttributes ? imageAttributes->nativeImageAttr : NULL)); - } - - Status - EnumerateMetafile( - IN const Metafile * metafile, - IN const PointF * destPoints, - IN INT count, - IN EnumerateMetafileProc callback, - IN VOID * callbackData = NULL, - IN const ImageAttributes * imageAttributes = NULL - ) - { - return SetStatus(DllExports::GdipEnumerateMetafileDestPoints( - nativeGraphics, - (const GpMetafile *)(metafile ? metafile->nativeImage:NULL), - destPoints, - count, - callback, - callbackData, - imageAttributes ? imageAttributes->nativeImageAttr : NULL)); - } - - Status - EnumerateMetafile( - IN const Metafile * metafile, - IN const Point * destPoints, - IN INT count, - IN EnumerateMetafileProc callback, - IN VOID * callbackData = NULL, - IN const ImageAttributes * imageAttributes = NULL - ) - { - return SetStatus(DllExports::GdipEnumerateMetafileDestPointsI( - nativeGraphics, - (const GpMetafile *)(metafile ? metafile->nativeImage:NULL), - destPoints, - count, - callback, - callbackData, - imageAttributes ? imageAttributes->nativeImageAttr : NULL)); - } - - Status - EnumerateMetafile( - IN const Metafile * metafile, - IN const PointF & destPoint, - IN const RectF & srcRect, - IN Unit srcUnit, - IN EnumerateMetafileProc callback, - IN VOID * callbackData = NULL, - IN const ImageAttributes * imageAttributes = NULL - ) - { - return SetStatus(DllExports::GdipEnumerateMetafileSrcRectDestPoint( - nativeGraphics, - (const GpMetafile *)(metafile ? metafile->nativeImage:NULL), - destPoint, - srcRect, - srcUnit, - callback, - callbackData, - imageAttributes ? imageAttributes->nativeImageAttr : NULL)); - } - - Status - EnumerateMetafile( - IN const Metafile * metafile, - IN const Point & destPoint, - IN const Rect & srcRect, - IN Unit srcUnit, - IN EnumerateMetafileProc callback, - IN VOID * callbackData = NULL, - IN const ImageAttributes * imageAttributes = NULL - ) - { - return SetStatus(DllExports::GdipEnumerateMetafileSrcRectDestPointI( - nativeGraphics, - (const GpMetafile *)(metafile ? metafile->nativeImage:NULL), - destPoint, - srcRect, - srcUnit, - callback, - callbackData, - imageAttributes ? imageAttributes->nativeImageAttr : NULL)); - } - - Status - EnumerateMetafile( - IN const Metafile * metafile, - IN const RectF & destRect, - IN const RectF & srcRect, - IN Unit srcUnit, - IN EnumerateMetafileProc callback, - IN VOID * callbackData = NULL, - IN const ImageAttributes * imageAttributes = NULL - ) - { - return SetStatus(DllExports::GdipEnumerateMetafileSrcRectDestRect( - nativeGraphics, - (const GpMetafile *)(metafile ? metafile->nativeImage:NULL), - destRect, - srcRect, - srcUnit, - callback, - callbackData, - imageAttributes ? imageAttributes->nativeImageAttr : NULL)); - } - - Status - EnumerateMetafile( - IN const Metafile * metafile, - IN const Rect & destRect, - IN const Rect & srcRect, - IN Unit srcUnit, - IN EnumerateMetafileProc callback, - IN VOID * callbackData = NULL, - IN const ImageAttributes * imageAttributes = NULL - ) - { - return SetStatus(DllExports::GdipEnumerateMetafileSrcRectDestRectI( - nativeGraphics, - (const GpMetafile *)(metafile ? metafile->nativeImage:NULL), - destRect, - srcRect, - srcUnit, - callback, - callbackData, - imageAttributes ? imageAttributes->nativeImageAttr : NULL)); - } - - Status - EnumerateMetafile( - IN const Metafile * metafile, - IN const PointF * destPoints, - IN INT count, - IN const RectF & srcRect, - IN Unit srcUnit, - IN EnumerateMetafileProc callback, - IN VOID * callbackData = NULL, - IN const ImageAttributes * imageAttributes = NULL - ) - { - return SetStatus(DllExports::GdipEnumerateMetafileSrcRectDestPoints( - nativeGraphics, - (const GpMetafile *)(metafile ? metafile->nativeImage:NULL), - destPoints, - count, - srcRect, - srcUnit, - callback, - callbackData, - imageAttributes ? imageAttributes->nativeImageAttr : NULL)); - } - - Status - EnumerateMetafile( - IN const Metafile * metafile, - IN const Point * destPoints, - IN INT count, - IN const Rect & srcRect, - IN Unit srcUnit, - IN EnumerateMetafileProc callback, - IN VOID * callbackData = NULL, - IN const ImageAttributes * imageAttributes = NULL - ) - { - return SetStatus(DllExports::GdipEnumerateMetafileSrcRectDestPointsI( - nativeGraphics, - (const GpMetafile *)(metafile ? metafile->nativeImage:NULL), - destPoints, - count, - srcRect, - srcUnit, - callback, - callbackData, - imageAttributes ? imageAttributes->nativeImageAttr : NULL)); - } - - /** - * Clipping region operations - * - * @notes Simply incredible redundancy here. - */ - Status SetClip(IN const Graphics* g, - IN CombineMode combineMode = CombineModeReplace) - { - return SetStatus(DllExports::GdipSetClipGraphics(nativeGraphics, - g->nativeGraphics, - combineMode)); - } - - Status SetClip(IN const RectF& rect, - IN CombineMode combineMode = CombineModeReplace) - { - return SetStatus(DllExports::GdipSetClipRect(nativeGraphics, - rect.X, rect.Y, - rect.Width, rect.Height, - combineMode)); - } - - Status SetClip(IN const Rect& rect, - IN CombineMode combineMode = CombineModeReplace) - { - return SetStatus(DllExports::GdipSetClipRectI(nativeGraphics, - rect.X, rect.Y, - rect.Width, rect.Height, - combineMode)); - } - - Status SetClip(IN const GraphicsPath* path, - IN CombineMode combineMode = CombineModeReplace) - { - return SetStatus(DllExports::GdipSetClipPath(nativeGraphics, - path->nativePath, - combineMode)); - } - - Status SetClip(IN const Region* region, - IN CombineMode combineMode = CombineModeReplace) - { - return SetStatus(DllExports::GdipSetClipRegion(nativeGraphics, - region->nativeRegion, - combineMode)); - } - - // This is different than the other SetClip methods because it assumes - // that the HRGN is already in device units, so it doesn't transform - // the coordinates in the HRGN. - Status SetClip(IN HRGN hRgn, - IN CombineMode combineMode = CombineModeReplace) - { - return SetStatus(DllExports::GdipSetClipHrgn(nativeGraphics, hRgn, - combineMode)); - } - - Status IntersectClip(IN const RectF& rect) - { - return SetStatus(DllExports::GdipSetClipRect(nativeGraphics, - rect.X, rect.Y, - rect.Width, rect.Height, - CombineModeIntersect)); - } - - Status IntersectClip(IN const Rect& rect) - { - return SetStatus(DllExports::GdipSetClipRectI(nativeGraphics, - rect.X, rect.Y, - rect.Width, rect.Height, - CombineModeIntersect)); - } - - Status IntersectClip(IN const Region* region) - { - return SetStatus(DllExports::GdipSetClipRegion(nativeGraphics, - region->nativeRegion, - CombineModeIntersect)); - } - - Status ExcludeClip(IN const RectF& rect) - { - return SetStatus(DllExports::GdipSetClipRect(nativeGraphics, - rect.X, rect.Y, - rect.Width, rect.Height, - CombineModeExclude)); - } - - Status ExcludeClip(IN const Rect& rect) - { - return SetStatus(DllExports::GdipSetClipRectI(nativeGraphics, - rect.X, rect.Y, - rect.Width, rect.Height, - CombineModeExclude)); - } - - Status ExcludeClip(IN const Region* region) - { - return SetStatus(DllExports::GdipSetClipRegion(nativeGraphics, - region->nativeRegion, - CombineModeExclude)); - } - - Status ResetClip() - { - return SetStatus(DllExports::GdipResetClip(nativeGraphics)); - } - - Status TranslateClip(IN REAL dx, - IN REAL dy) - { - return SetStatus(DllExports::GdipTranslateClip(nativeGraphics, dx, dy)); - } - - Status TranslateClip(IN INT dx, - IN INT dy) - { - return SetStatus(DllExports::GdipTranslateClipI(nativeGraphics, - dx, dy)); - } - - /** - * GetClip region from graphics context - */ - Status GetClip(OUT Region* region) const - { - return SetStatus(DllExports::GdipGetClip(nativeGraphics, - region->nativeRegion)); - } - - /** - * Hit testing operations - */ - Status GetClipBounds(OUT RectF* rect) const - { - return SetStatus(DllExports::GdipGetClipBounds(nativeGraphics, rect)); - } - - Status GetClipBounds(OUT Rect* rect) const - { - return SetStatus(DllExports::GdipGetClipBoundsI(nativeGraphics, rect)); - } - - BOOL IsClipEmpty() const - { - BOOL booln = FALSE; - - SetStatus(DllExports::GdipIsClipEmpty(nativeGraphics, &booln)); - - return booln; - } - - Status GetVisibleClipBounds(OUT RectF *rect) const - { - - return SetStatus(DllExports::GdipGetVisibleClipBounds(nativeGraphics, - rect)); - } - - Status GetVisibleClipBounds(OUT Rect *rect) const - { - return SetStatus(DllExports::GdipGetVisibleClipBoundsI(nativeGraphics, - rect)); - } - - BOOL IsVisibleClipEmpty() const - { - BOOL booln = FALSE; - - SetStatus(DllExports::GdipIsVisibleClipEmpty(nativeGraphics, &booln)); - - return booln; - } - - BOOL IsVisible(IN INT x, - IN INT y) const - { - return IsVisible(Point(x,y)); - } - - BOOL IsVisible(IN const Point& point) const - { - BOOL booln = FALSE; - - SetStatus(DllExports::GdipIsVisiblePointI(nativeGraphics, - point.X, - point.Y, - &booln)); - - return booln; - } - - BOOL IsVisible(IN INT x, - IN INT y, - IN INT width, - IN INT height) const - { - return IsVisible(Rect(x, y, width, height)); - } - - BOOL IsVisible(IN const Rect& rect) const - { - - BOOL booln = TRUE; - - SetStatus(DllExports::GdipIsVisibleRectI(nativeGraphics, - rect.X, - rect.Y, - rect.Width, - rect.Height, - &booln)); - return booln; - } - - BOOL IsVisible(IN REAL x, - IN REAL y) const - { - return IsVisible(PointF(x, y)); - } - - BOOL IsVisible(IN const PointF& point) const - { - BOOL booln = FALSE; - - SetStatus(DllExports::GdipIsVisiblePoint(nativeGraphics, - point.X, - point.Y, - &booln)); - - return booln; - } - - BOOL IsVisible(IN REAL x, - IN REAL y, - IN REAL width, - IN REAL height) const - { - return IsVisible(RectF(x, y, width, height)); - } - - BOOL IsVisible(IN const RectF& rect) const - { - BOOL booln = TRUE; - - SetStatus(DllExports::GdipIsVisibleRect(nativeGraphics, - rect.X, - rect.Y, - rect.Width, - rect.Height, - &booln)); - return booln; - } - - /** - * Save/restore graphics state - */ - GraphicsState Save() const - { - GraphicsState gstate; - - SetStatus(DllExports::GdipSaveGraphics(nativeGraphics, &gstate)); - - return gstate; - } - - Status Restore(IN GraphicsState gstate) - { - return SetStatus(DllExports::GdipRestoreGraphics(nativeGraphics, - gstate)); - } - - /** - * Begin and end container drawing - */ - GraphicsContainer BeginContainer(IN const RectF &dstrect, - IN const RectF &srcrect, - IN Unit unit) - { - GraphicsContainer state; - - SetStatus(DllExports::GdipBeginContainer(nativeGraphics, &dstrect, - &srcrect, unit, &state)); - - return state; - } - - /** - * Begin and end container drawing - */ - GraphicsContainer BeginContainer(IN const Rect &dstrect, - IN const Rect &srcrect, - IN Unit unit) - { - GraphicsContainer state; - - SetStatus(DllExports::GdipBeginContainerI(nativeGraphics, &dstrect, - &srcrect, unit, &state)); - - return state; - } - - GraphicsContainer BeginContainer() - { - GraphicsContainer state; - - SetStatus(DllExports::GdipBeginContainer2(nativeGraphics, &state)); - - return state; - } - - Status EndContainer(IN GraphicsContainer state) - { - return SetStatus(DllExports::GdipEndContainer(nativeGraphics, state)); - } - - // only valid when recording metafiles - Status AddMetafileComment(IN const BYTE * data, - IN UINT sizeData) - { - return SetStatus(DllExports::GdipComment(nativeGraphics, sizeData, data)); - } - - /** - * Get/SetLayout - * Support for Middle East localization (right-to-left mirroring) - */ - GraphicsLayout GetLayout() const - { - GraphicsLayout layout; - - SetStatus(DllExports::GdipGetGraphicsLayout(nativeGraphics, &layout)); - - return layout; - } - - Status SetLayout(IN const GraphicsLayout layout) - { - return SetStatus( - DllExports::GdipSetGraphicsLayout(nativeGraphics, layout) - ); - } - - static HPALETTE GetHalftonePalette() - { - return DllExports::GdipCreateHalftonePalette(); - } - - Status GetLastStatus() const - { - Status lastStatus = lastResult; - lastResult = Ok; - - return lastStatus; - } - -protected: - -#ifdef DCR_USE_NEW_250932 - -private: - Graphics(const Graphics &); - Graphics& operator=(const Graphics &); -protected: - -#else - - Graphics(const Graphics& graphics) - { - graphics; - SetStatus(NotImplemented); - } - - Graphics& operator=(const Graphics& graphics) - { - graphics; - SetStatus(NotImplemented); - return *this; - } - -#endif - - Graphics(GpGraphics* graphics) - { - lastResult = Ok; - SetNativeGraphics(graphics); - } - - VOID SetNativeGraphics(GpGraphics *graphics) - { - this->nativeGraphics = graphics; - } - - Status SetStatus(Status status) const - { - if (status != Ok) - return (lastResult = status); - else - return status; - } - - // Methods necessary to subclass Graphics for extension test. - - GpGraphics* GetNativeGraphics() const - { - return this->nativeGraphics; - } - - GpPen* GetNativePen(const Pen* pen) - { - return pen->nativePen; - } - -protected: - GpGraphics* nativeGraphics; - mutable Status lastResult; - -}; - -//---------------------------------------------------------------------------- -// Extra implementation of GraphicsPath methods that use Graphics -//---------------------------------------------------------------------------- - -/** - * Get the bounds of the path object with the given transform. - * This is not always the tightest bounds. - */ - -inline Status -GraphicsPath::GetBounds( - OUT RectF* bounds, - IN const Matrix* matrix, - IN const Pen* pen) const -{ - GpMatrix* nativeMatrix = NULL; - GpPen* nativePen = NULL; - - if (matrix) - nativeMatrix = matrix->nativeMatrix; - - if (pen) - nativePen = pen->nativePen; - - return SetStatus(DllExports::GdipGetPathWorldBounds(nativePath, bounds, - nativeMatrix, nativePen)); -} - -// integer version -inline Status -GraphicsPath::GetBounds( - OUT Rect* bounds, - IN const Matrix* matrix, - IN const Pen* pen -) const -{ - GpMatrix* nativeMatrix = NULL; - GpPen* nativePen = NULL; - - if (matrix) - nativeMatrix = matrix->nativeMatrix; - - if (pen) - nativePen = pen->nativePen; - - return SetStatus(DllExports::GdipGetPathWorldBoundsI(nativePath, bounds, - nativeMatrix, nativePen)); -} - -//---------------------------------------------------------------------------- -// Hit testing operations -//---------------------------------------------------------------------------- - -inline BOOL -GraphicsPath::IsVisible( - IN REAL x, - IN REAL y, - IN const Graphics* g) const -{ - BOOL booln = FALSE; - - GpGraphics* nativeGraphics = NULL; - - if (g) - nativeGraphics = g->nativeGraphics; - - SetStatus(DllExports::GdipIsVisiblePathPoint(nativePath, - x, y, nativeGraphics, - &booln)); - return booln; -} - -inline BOOL -GraphicsPath::IsVisible( - IN INT x, - IN INT y, - IN const Graphics* g) const -{ - BOOL booln = FALSE; - - GpGraphics* nativeGraphics = NULL; - - if (g) - nativeGraphics = g->nativeGraphics; - - SetStatus(DllExports::GdipIsVisiblePathPointI(nativePath, - x, y, nativeGraphics, - &booln)); - return booln; -} - -inline BOOL -GraphicsPath::IsOutlineVisible( - IN REAL x, - IN REAL y, - IN const Pen* pen, - IN const Graphics* g) const -{ - BOOL booln = FALSE; - - GpGraphics* nativeGraphics = NULL; - GpPen* nativePen = NULL; - - if(g) - nativeGraphics = g->nativeGraphics; - if(pen) - nativePen = pen->nativePen; - - SetStatus(DllExports::GdipIsOutlineVisiblePathPoint(nativePath, - x, y, nativePen, nativeGraphics, - &booln)); - return booln; -} - -inline BOOL -GraphicsPath::IsOutlineVisible( - IN INT x, - IN INT y, - IN const Pen* pen, - IN const Graphics* g) const -{ - BOOL booln = FALSE; - - GpGraphics* nativeGraphics = NULL; - GpPen* nativePen = NULL; - - if(g) - nativeGraphics = g->nativeGraphics; - if(pen) - nativePen = pen->nativePen; - - SetStatus(DllExports::GdipIsOutlineVisiblePathPointI(nativePath, - x, y, nativePen, nativeGraphics, - &booln)); - return booln; -} - -#endif diff --git a/src/includes/GdiPlusHeaders.h b/src/includes/GdiPlusHeaders.h deleted file mode 100644 index 9efcd89d..00000000 --- a/src/includes/GdiPlusHeaders.h +++ /dev/null @@ -1,793 +0,0 @@ -/**************************************************************************\ -* -* Copyright (c) 1998-2000, Microsoft Corp. All Rights Reserved. -* -* Module Name: -* -* GdiplusHeaders.h -* -* Abstract: -* -* GDI+ Native C++ public header file -* -\**************************************************************************/ - -#ifndef _GDIPLUSHEADERS_H -#define _GDIPLUSHEADERS_H - -//-------------------------------------------------------------------------- -// Abstract base class for regions -//-------------------------------------------------------------------------- - -// Include the class declarations here and have inline class implementation -// in separate file to avoid circular references. - -class Region : public GdiplusBase -{ -public: - friend class Graphics; - - Region(); - Region(IN const RectF& rect); - Region(IN const Rect& rect); - Region(IN const GraphicsPath* path); - Region(IN const BYTE* regionData, IN INT size); - Region(IN HRGN hRgn); - static Region* FromHRGN(IN HRGN hRgn); - - ~Region(); - Region* Clone() const; - - Status MakeInfinite(); - Status MakeEmpty(); - - // Get the size of the buffer needed for the GetData method - UINT GetDataSize() const; - - // buffer - where to put the data - // bufferSize - how big the buffer is (should be at least as big as GetDataSize()) - // sizeFilled - if not NULL, this is an OUT param that says how many bytes - // of data were written to the buffer. - Status GetData(OUT BYTE* buffer, - IN UINT bufferSize, - OUT UINT* sizeFilled = NULL) const; - - Status Intersect(IN const Rect& rect); - Status Intersect(IN const RectF& rect); - Status Intersect(IN const GraphicsPath* path); - Status Intersect(IN const Region* region); - Status Union(IN const Rect& rect); - Status Union(IN const RectF& rect); - Status Union(IN const GraphicsPath* path); - Status Union(IN const Region* region); - Status Xor(IN const Rect& rect); - Status Xor(IN const RectF& rect); - Status Xor(IN const GraphicsPath* path); - Status Xor(IN const Region* region); - Status Exclude(IN const Rect& rect); - Status Exclude(IN const RectF& rect); - Status Exclude(IN const GraphicsPath* path); - Status Exclude(IN const Region* region); - Status Complement(IN const Rect& rect); - Status Complement(IN const RectF& rect); - Status Complement(IN const GraphicsPath* path); - Status Complement(IN const Region* region); - Status Translate(IN REAL dx, - IN REAL dy); - Status Translate(IN INT dx, - IN INT dy); - Status Transform(IN const Matrix* matrix); - - Status GetBounds(OUT Rect* rect, - IN const Graphics* g) const; - - Status GetBounds(OUT RectF* rect, - IN const Graphics* g) const; - - HRGN GetHRGN (IN const Graphics * g) const; - - BOOL IsEmpty(IN const Graphics *g) const; - BOOL IsInfinite(IN const Graphics *g) const; - - BOOL IsVisible(IN INT x, - IN INT y, - IN const Graphics* g = NULL) const - { - return IsVisible(Point(x, y), g); - } - - BOOL IsVisible(IN const Point& point, - IN const Graphics* g = NULL) const; - - BOOL IsVisible(IN REAL x, - IN REAL y, - IN const Graphics* g = NULL) const - { - return IsVisible(PointF(x, y), g); - } - - BOOL IsVisible(IN const PointF& point, - IN const Graphics* g = NULL) const; - - BOOL IsVisible(IN INT x, - IN INT y, - IN INT width, - IN INT height, - IN const Graphics* g) const - { - return IsVisible(Rect(x, y, width, height), g); - } - - BOOL IsVisible(IN const Rect& rect, - IN const Graphics* g = NULL) const; - - BOOL IsVisible(IN REAL x, - IN REAL y, - IN REAL width, - IN REAL height, - IN const Graphics* g = NULL) const - { - return IsVisible(RectF(x, y, width, height), g); - } - - BOOL IsVisible(IN const RectF& rect, - IN const Graphics* g = NULL) const; - - BOOL Equals(IN const Region* region, - IN const Graphics* g) const; - - UINT GetRegionScansCount(IN const Matrix* matrix) const; - Status GetRegionScans(IN const Matrix* matrix, - OUT RectF* rects, - OUT INT* count) const; - Status GetRegionScans(IN const Matrix* matrix, - OUT Rect* rects, - OUT INT* count) const; - Status GetLastStatus() const; - -protected: - -#ifdef DCR_USE_NEW_250932 - -private: - Region(const Region ®ion); - Region& operator=(const Region ®ion); -protected: - -#else - Region(const Region ®ion) - { - region; // reference parameter - SetStatus(NotImplemented); - } - - Region& operator=(const Region ®ion) - { - region; // reference parameter - SetStatus(NotImplemented); - return *this; - } -#endif - - Status SetStatus(Status status) const - { - if (status != Ok) - return (lastResult = status); - else - return status; - } - - Region(GpRegion* nativeRegion); - - VOID SetNativeRegion(GpRegion* nativeRegion); - -protected: - GpRegion* nativeRegion; - mutable Status lastResult; -}; - - -//-------------------------------------------------------------------------- -// Abstract base class for FontFamily -//-------------------------------------------------------------------------- - -class FontFamily : public GdiplusBase -{ -public: - friend class Font; - friend class Graphics; - friend class GraphicsPath; - friend class FontCollection; - - FontFamily(); - - FontFamily( - IN const WCHAR *name, - IN const FontCollection *fontCollection = NULL - ); - - ~FontFamily(); - - static const FontFamily *GenericSansSerif(); - static const FontFamily *GenericSerif(); - static const FontFamily *GenericMonospace(); - - Status GetFamilyName( - OUT WCHAR name[LF_FACESIZE], - IN LANGID language = 0 - ) const; - -// Copy operator - FontFamily * Clone() const; - - BOOL IsAvailable() const - { - return (nativeFamily != NULL); - }; - - BOOL IsStyleAvailable(IN INT style) const; - - UINT16 GetEmHeight (IN INT style) const; - UINT16 GetCellAscent (IN INT style) const; - UINT16 GetCellDescent (IN INT style) const; - UINT16 GetLineSpacing (IN INT style) const; - - /////////////////////////////////////////////////////////// - - Status GetLastStatus() const; - -#ifdef DCR_USE_NEW_250932 - -private: - FontFamily(const FontFamily &); - FontFamily& operator=(const FontFamily &); - -#endif - -protected: - Status SetStatus(Status status) const; - - // private constructor for copy - FontFamily(GpFontFamily * nativeFamily, Status status); - -/////////////////////////////////////// -// Data members -protected: - - GpFontFamily *nativeFamily; - mutable Status lastResult; -}; - -static FontFamily *GenericSansSerifFontFamily = NULL; -static FontFamily *GenericSerifFontFamily = NULL; -static FontFamily *GenericMonospaceFontFamily = NULL; - -static BYTE GenericSansSerifFontFamilyBuffer[sizeof(FontFamily)] = {0}; -static BYTE GenericSerifFontFamilyBuffer [sizeof(FontFamily)] = {0}; -static BYTE GenericMonospaceFontFamilyBuffer[sizeof(FontFamily)] = {0}; - - -//-------------------------------------------------------------------------- -// Abstract base class for fonts -//-------------------------------------------------------------------------- - -class Font : public GdiplusBase -{ -public: - friend class Graphics; - - Font(IN HDC hdc); - Font(IN HDC hdc, - IN const LOGFONTA* logfont); - Font(IN HDC hdc, - IN const LOGFONTW* logfont); -#ifdef DCR_USE_NEW_127084 - Font(IN HDC hdc, - IN const HFONT hfont); -#endif - Font( - IN const FontFamily * family, - IN REAL emSize, - IN INT style = FontStyleRegular, - IN Unit unit = UnitPoint - ); - - Font( - IN const WCHAR * familyName, - IN REAL emSize, - IN INT style = FontStyleRegular, - IN Unit unit = UnitPoint, - IN const FontCollection * fontCollection = NULL - ); - - Status GetLogFontA(IN const Graphics* g, - OUT LOGFONTA * logfontA) const; - Status GetLogFontW(IN const Graphics* g, - OUT LOGFONTW * logfontW) const; - - Font* Clone() const; - ~Font(); - BOOL IsAvailable() const; - INT GetStyle() const; - REAL GetSize() const; - Unit GetUnit() const; - Status GetLastStatus() const; - REAL GetHeight(IN const Graphics *graphics = NULL) const; -#ifdef DCR_USE_NEW_125467 - REAL GetHeight(IN REAL dpi) const; -#endif - - Status GetFamily(OUT FontFamily *family) const; - -#ifdef DCR_USE_NEW_250932 - -private: - Font(const Font &); - Font& operator=(const Font &); - -#endif - -protected: - Font(GpFont* font, Status status); - VOID SetNativeFont(GpFont *Font); - Status SetStatus(Status status) const; - -protected: - /* - * handle to native line texture object - */ - - GpFont* nativeFont; - mutable Status lastResult; -}; - -//-------------------------------------------------------------------------- -// Abstract base classes for font collections -//-------------------------------------------------------------------------- - -class FontCollection : public GdiplusBase -{ -public: - friend class FontFamily; - - FontCollection(); - virtual ~FontCollection(); - - INT GetFamilyCount() const; // number of enumerable families in the collection - - Status GetFamilies( // enumerate the fonts in a collection - IN INT numSought, - OUT FontFamily * gpfamilies, - OUT INT * numFound - ) const; - - Status GetLastStatus() const; - -#ifdef DCR_USE_NEW_250932 - -private: - FontCollection(const FontCollection &); - FontCollection& operator=(const FontCollection &); - -#endif - -protected: - Status SetStatus(Status status) const ; - - GpFontCollection *nativeFontCollection; - mutable Status lastResult; -}; - - -class InstalledFontCollection : public FontCollection -{ -public: - InstalledFontCollection(); - ~InstalledFontCollection(); - -#ifdef DCR_USE_NEW_250932 - -private: - InstalledFontCollection(const InstalledFontCollection &); - InstalledFontCollection& operator=(const InstalledFontCollection &); - -#endif - -protected: -#ifndef DCR_USE_NEW_235072 - Status InstallFontFile(IN const WCHAR* filename); - Status UninstallFontFile(IN const WCHAR* filename); -#endif - Status SetStatus(Status status) const ; -}; - - -class PrivateFontCollection : public FontCollection -{ -public: - PrivateFontCollection(); - ~PrivateFontCollection(); - - Status AddFontFile(IN const WCHAR* filename); - Status AddMemoryFont(IN const VOID* memory, - IN INT length); - -#ifdef DCR_USE_NEW_250932 - -private: - PrivateFontCollection(const PrivateFontCollection &); - PrivateFontCollection& operator=(const PrivateFontCollection &); - -#endif -}; - - -//-------------------------------------------------------------------------- -// Abstract base class for bitmap image and metafile -//-------------------------------------------------------------------------- - -// !!! Note: -// Include the class declarations here and have the inline class -// implementation in a separate file. This is done to resolve a -// circular dependency since one of the Bitmap methods needs to -// access the private member nativeGraphics of the Graphics object. - -class Image : public GdiplusBase -{ -public: - friend class Brush; - friend class TextureBrush; - friend class Graphics; - -#ifndef DCR_USE_NEW_140782 - Image( - IN const WCHAR* filename - ); - - Image( - IN IStream* stream - ); - - static Image* FromFile( - IN const WCHAR* filename - ); - - static Image* FromStream( - IN IStream* stream - ); -#else - Image( - IN const WCHAR* filename, - IN BOOL useEmbeddedColorManagement = FALSE - ); - - Image( - IN IStream* stream, - IN BOOL useEmbeddedColorManagement = FALSE - ); - - static Image* FromFile( - IN const WCHAR* filename, - IN BOOL useEmbeddedColorManagement = FALSE - ); - - static Image* FromStream( - IN IStream* stream, - IN BOOL useEmbeddedColorManagement = FALSE - ); -#endif - - virtual ~Image(); - virtual Image* Clone(); - - Status Save(IN const WCHAR* filename, - IN const CLSID* clsidEncoder, - IN const EncoderParameters *encoderParams = NULL); - Status Save(IN IStream* stream, - IN const CLSID* clsidEncoder, - IN const EncoderParameters *encoderParams = NULL); - Status SaveAdd(IN const EncoderParameters* encoderParams); - Status SaveAdd(IN Image* newImage, - IN const EncoderParameters* encoderParams); - - ImageType GetType() const; - Status GetPhysicalDimension(OUT SizeF* size); - Status GetBounds(OUT RectF* srcRect, - OUT Unit* srcUnit); - - UINT GetWidth(); - UINT GetHeight(); - REAL GetHorizontalResolution(); - REAL GetVerticalResolution(); - UINT GetFlags(); - Status GetRawFormat(OUT GUID *format); - PixelFormat GetPixelFormat(); - - INT GetPaletteSize(); - Status GetPalette(OUT ColorPalette* palette, - IN INT size); - Status SetPalette(IN const ColorPalette* palette); - - Image* GetThumbnailImage(IN UINT thumbWidth, - IN UINT thumbHeight, - IN GetThumbnailImageAbort callback = NULL, - IN VOID* callbackData = NULL); - UINT GetFrameDimensionsCount(); - Status GetFrameDimensionsList(OUT GUID* dimensionIDs, - IN UINT count); - UINT GetFrameCount(IN const GUID* dimensionID); - Status SelectActiveFrame(IN const GUID* dimensionID, - IN UINT frameIndex); - Status RotateFlip(IN RotateFlipType rotateFlipType); - UINT GetPropertyCount(); - Status GetPropertyIdList(IN UINT numOfProperty, - OUT PROPID* list); - UINT GetPropertyItemSize(IN PROPID propId); - Status GetPropertyItem(IN PROPID propId, - IN UINT propSize, - OUT PropertyItem* buffer); - Status GetPropertySize(OUT UINT* totalBufferSize, - OUT UINT* numProperties); - Status GetAllPropertyItems(IN UINT totalBufferSize, - IN UINT numProperties, - OUT PropertyItem* allItems); - Status RemovePropertyItem(IN PROPID propId); - Status SetPropertyItem(IN const PropertyItem* item); - - UINT GetEncoderParameterListSize(IN const CLSID* clsidEncoder); - Status GetEncoderParameterList(IN const CLSID* clsidEncoder, - IN UINT size, - OUT EncoderParameters* buffer); - - // Support for Middle East localization (right-to-left mirroring) - ImageLayout GetLayout() const; - Status SetLayout(IN const ImageLayout layout); - - Status GetLastStatus() const; - -protected: - - Image() {} - - Image(GpImage *nativeImage, Status status); - - VOID SetNativeImage(GpImage* nativeImage); - - Status SetStatus(Status status) const - { - if (status != Ok) - return (lastResult = status); - else - return status; - } - - GpImage* nativeImage; - mutable Status lastResult; - mutable Status loadStatus; - -#ifdef DCR_USE_NEW_250932 - -private: - -#else - -protected: - -#endif - - // Disable copy constructor and assignment operator - - Image(IN const Image& C); - Image& operator=(IN const Image& C); -}; - -class Bitmap : public Image -{ -public: - friend class Image; - friend class CachedBitmap; - - Bitmap( - IN const WCHAR *filename, - IN BOOL useEmbeddedColorManagement = FALSE - ); - - Bitmap( - IN IStream *stream, - IN BOOL useEmbeddedColorManagement = FALSE - ); - - static Bitmap* FromFile( - IN const WCHAR *filename, - IN BOOL useEmbeddedColorManagement = FALSE - ); - - static Bitmap* FromStream( - IN IStream *stream, - IN BOOL useEmbeddedColorManagement = FALSE - ); - - Bitmap(IN INT width, - IN INT height, - IN INT stride, PixelFormat format, - IN BYTE* scan0); - Bitmap(IN INT width, - IN INT height, - IN PixelFormat format = PixelFormat32bppARGB); - Bitmap(IN INT width, - IN INT height, - IN Graphics* target); - - Bitmap* Clone(IN const Rect& rect, - IN PixelFormat format); - Bitmap* Clone(IN INT x, - IN INT y, - IN INT width, - IN INT height, - IN PixelFormat format); - Bitmap* Clone(IN const RectF& rect, - IN PixelFormat format); - Bitmap* Clone(IN REAL x, - IN REAL y, - IN REAL width, - IN REAL height, - IN PixelFormat format); - - Status LockBits(IN const Rect& rect, - IN UINT flags, - IN PixelFormat format, - OUT BitmapData* lockedBitmapData); - Status UnlockBits(IN BitmapData* lockedBitmapData); - Status GetPixel(IN INT x, - IN INT y, - OUT Color *color); - Status SetPixel(IN INT x, - IN INT y, - IN const Color &color); - Status SetResolution(IN REAL xdpi, - IN REAL ydpi); - - // GDI interop: - - Bitmap(IN IDirectDrawSurface7* surface); - Bitmap(IN const BITMAPINFO* gdiBitmapInfo, - IN VOID* gdiBitmapData); - Bitmap(IN HBITMAP hbm, - IN HPALETTE hpal); - Bitmap(IN HICON hicon); - Bitmap(IN HINSTANCE hInstance, - IN const WCHAR * bitmapName); - static Bitmap* FromDirectDrawSurface7(IN IDirectDrawSurface7* surface); - static Bitmap* FromBITMAPINFO(IN const BITMAPINFO* gdiBitmapInfo, - IN VOID* gdiBitmapData); - static Bitmap* FromHBITMAP(IN HBITMAP hbm, - IN HPALETTE hpal); - static Bitmap* FromHICON(IN HICON hicon); - static Bitmap* FromResource(IN HINSTANCE hInstance, - IN const WCHAR * bitmapName); - - Status GetHBITMAP(IN const Color& colorBackground, - OUT HBITMAP *hbmReturn); - Status GetHICON(HICON *hicon); - -#ifdef DCR_USE_NEW_250932 -private: - Bitmap(const Bitmap &); - Bitmap& operator=(const Bitmap &); -#endif - -protected: - Bitmap(GpBitmap *nativeBitmap); -}; - -class CustomLineCap : public GdiplusBase -{ -public: - friend class Pen; - - CustomLineCap( - IN const GraphicsPath* fillPath, - IN const GraphicsPath* strokePath, - IN LineCap baseCap = LineCapFlat, - IN REAL baseInset = 0 - ); - virtual ~CustomLineCap(); - - CustomLineCap* Clone() const; - - Status SetStrokeCap(IN LineCap strokeCap) - { - // This changes both start and and caps. - - return SetStrokeCaps(strokeCap, strokeCap); - } - - Status SetStrokeCaps(IN LineCap startCap, - IN LineCap endCap); - Status GetStrokeCaps(OUT LineCap* startCap, - OUT LineCap* endCap) const; - Status SetStrokeJoin(IN LineJoin lineJoin); - LineJoin GetStrokeJoin() const; - Status SetBaseCap(IN LineCap baseCap); - LineCap GetBaseCap() const; - Status SetBaseInset(IN REAL inset); - REAL GetBaseInset() const; - Status SetWidthScale(IN REAL widthScale); - REAL GetWidthScale() const; - -protected: - CustomLineCap(); - -#ifdef DCR_USE_NEW_250932 - -private: - CustomLineCap(const CustomLineCap &); - CustomLineCap& operator=(const CustomLineCap &); -protected: - -#else - - CustomLineCap(const CustomLineCap& customLineCap) - { - customLineCap; - SetStatus(NotImplemented); - } - - CustomLineCap& operator=(const CustomLineCap& customLineCap) - { - customLineCap; - SetStatus(NotImplemented); - return *this; - } - -#endif - - CustomLineCap(GpCustomLineCap* nativeCap, Status status) - { - lastResult = status; - SetNativeCap(nativeCap); - } - - VOID SetNativeCap(GpCustomLineCap* nativeCap) - { - this->nativeCap = nativeCap; - } - - Status SetStatus(Status status) const - { - if (status != Ok) - return (lastResult = status); - else - return status; - } - -protected: - GpCustomLineCap* nativeCap; - mutable Status lastResult; -}; - -class CachedBitmap : public GdiplusBase -{ - friend Graphics; - -public: - CachedBitmap(IN Bitmap *bitmap, - IN Graphics *graphics); - virtual ~CachedBitmap(); - - Status GetLastStatus() const; - -#ifdef DCR_USE_NEW_250932 - -private: - CachedBitmap(const CachedBitmap &); - CachedBitmap& operator=(const CachedBitmap &); - -#endif - -protected: - GpCachedBitmap *nativeCachedBitmap; - mutable Status lastResult; -}; - -#endif // !_GDIPLUSHEADERS.HPP diff --git a/src/includes/GdiPlusImageCodec.h b/src/includes/GdiPlusImageCodec.h deleted file mode 100644 index d9ea0386..00000000 --- a/src/includes/GdiPlusImageCodec.h +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************\ -* -* Copyright (c) 2000, Microsoft Corp. All Rights Reserved. -* -* Module Name: -* -* GdiplusImageCodec.h -* -* Abstract: -* -* APIs for imaging codecs. -* -\**************************************************************************/ - -#ifndef _GDIPLUSIMAGECODEC_H -#define _GDIPLUSIMAGECODEC_H - -//-------------------------------------------------------------------------- -// Codec Management APIs -//-------------------------------------------------------------------------- - -inline Status -GetImageDecodersSize( - OUT UINT *numDecoders, - OUT UINT *size) -{ - return DllExports::GdipGetImageDecodersSize(numDecoders, size); -} - - -inline Status -GetImageDecoders( - IN UINT numDecoders, - IN UINT size, - OUT ImageCodecInfo *decoders) -{ - return DllExports::GdipGetImageDecoders(numDecoders, size, decoders); -} - - -inline Status -GetImageEncodersSize( - OUT UINT *numEncoders, - OUT UINT *size) -{ - return DllExports::GdipGetImageEncodersSize(numEncoders, size); -} - - -inline Status -GetImageEncoders( - IN UINT numEncoders, - IN UINT size, - OUT ImageCodecInfo *encoders) -{ - return DllExports::GdipGetImageEncoders(numEncoders, size, encoders); -} - -inline Status -AddImageCodec( - IN const ImageCodecInfo* codec) -{ - return DllExports::GdipAddImageCodec(codec); -} - -inline Status -RemoveImageCodec( - IN const ImageCodecInfo* codec) -{ - return DllExports::GdipRemoveImageCodec(codec); -} - -#endif // _GDIPLUSIMAGECODEC_H diff --git a/src/includes/GdiPlusImaging.h b/src/includes/GdiPlusImaging.h deleted file mode 100644 index d6bd4f0d..00000000 --- a/src/includes/GdiPlusImaging.h +++ /dev/null @@ -1,540 +0,0 @@ -/**************************************************************************\ -* -* Copyright (c) 1999-2000 Microsoft Corporation -* -* Module Name: -* -* GdiplusImaging.h -* -* Abstract: -* -* GUIDs defined and used by the imaging library -* -\**************************************************************************/ -#ifndef _GDIPLUSIMAGING_H -#define _GDIPLUSIMAGING_H - -//--------------------------------------------------------------------------- -// Image file format identifiers -//--------------------------------------------------------------------------- - -DEFINE_GUID(ImageFormatUndefined, 0xb96b3ca9,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e); -DEFINE_GUID(ImageFormatMemoryBMP, 0xb96b3caa,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e); -DEFINE_GUID(ImageFormatBMP, 0xb96b3cab,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e); -DEFINE_GUID(ImageFormatEMF, 0xb96b3cac,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e); -DEFINE_GUID(ImageFormatWMF, 0xb96b3cad,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e); -DEFINE_GUID(ImageFormatJPEG, 0xb96b3cae,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e); -DEFINE_GUID(ImageFormatPNG, 0xb96b3caf,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e); -DEFINE_GUID(ImageFormatGIF, 0xb96b3cb0,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e); -DEFINE_GUID(ImageFormatTIFF, 0xb96b3cb1,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e); -DEFINE_GUID(ImageFormatEXIF, 0xb96b3cb2,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e); -#ifndef DCR_USE_NEW_140855 -DEFINE_GUID(ImageFormatPhotoCD, 0xb96b3cb3,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e); -DEFINE_GUID(ImageFormatFlashPIX, 0xb96b3cb4,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e); -#endif -DEFINE_GUID(ImageFormatIcon, 0xb96b3cb5,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e); - -//--------------------------------------------------------------------------- -// Predefined multi-frame dimension IDs -//--------------------------------------------------------------------------- - -DEFINE_GUID(FrameDimensionTime, 0x6aedbd6d,0x3fb5,0x418a,0x83,0xa6,0x7f,0x45,0x22,0x9d,0xc8,0x72); -DEFINE_GUID(FrameDimensionResolution, 0x84236f7b,0x3bd3,0x428f,0x8d,0xab,0x4e,0xa1,0x43,0x9c,0xa3,0x15); -DEFINE_GUID(FrameDimensionPage, 0x7462dc86,0x6180,0x4c7e,0x8e,0x3f,0xee,0x73,0x33,0xa7,0xa4,0x83); - -//--------------------------------------------------------------------------- -// Property sets -//--------------------------------------------------------------------------- - -DEFINE_GUID(FormatIDImageInformation, 0xe5836cbe,0x5eef,0x4f1d,0xac,0xde,0xae,0x4c,0x43,0xb6,0x08,0xce); -DEFINE_GUID(FormatIDJpegAppHeaders, 0x1c4afdcd,0x6177,0x43cf,0xab,0xc7,0x5f,0x51,0xaf,0x39,0xee,0x85); - -#ifndef DCR_USE_NEW_140855 -//--------------------------------------------------------------------------- -// Decoder parameter sets -//--------------------------------------------------------------------------- -DEFINE_GUID(DecoderTransColor, 0xb7a98c8f,0xdce7,0x457d,0xbf,0xa5,0xce,0xa7,0x1b,0xd1,0x4d,0xd6); -DEFINE_GUID(DecoderTransRange, 0xabeed189,0xd988,0x4d03,0xb4,0x25,0x57,0x10,0x55,0xc7,0x6a,0xd1); -DEFINE_GUID(DecoderOutputChannel, 0x2ff8f51e,0x724d,0x45fe,0x86,0xce,0x17,0x77,0xa0,0x56,0xda,0x60); -DEFINE_GUID(DecoderIconRes, 0x5c656eec,0xe94f,0x45ba,0xa6,0xf6,0x10,0x62,0xe8,0x5f,0x4a,0x7f); -#endif - -//--------------------------------------------------------------------------- -// Encoder parameter sets -//--------------------------------------------------------------------------- - -DEFINE_GUID(EncoderCompression, 0xe09d739d,0xccd4,0x44ee,0x8e,0xba,0x3f,0xbf,0x8b,0xe4,0xfc,0x58); -DEFINE_GUID(EncoderColorDepth, 0x66087055,0xad66,0x4c7c,0x9a,0x18,0x38,0xa2,0x31,0x0b,0x83,0x37); -DEFINE_GUID(EncoderScanMethod, 0x3a4e2661,0x3109,0x4e56,0x85,0x36,0x42,0xc1,0x56,0xe7,0xdc,0xfa); -DEFINE_GUID(EncoderVersion, 0x24d18c76,0x814a,0x41a4,0xbf,0x53,0x1c,0x21,0x9c,0xcc,0xf7,0x97); -DEFINE_GUID(EncoderRenderMethod, 0x6d42c53a,0x229a,0x4825,0x8b,0xb7,0x5c,0x99,0xe2,0xb9,0xa8,0xb8); -DEFINE_GUID(EncoderQuality, 0x1d5be4b5,0xfa4a,0x452d,0x9c,0xdd,0x5d,0xb3,0x51,0x05,0xe7,0xeb); -DEFINE_GUID(EncoderTransformation,0x8d0eb2d1,0xa58e,0x4ea8,0xaa,0x14,0x10,0x80,0x74,0xb7,0xb6,0xf9); -DEFINE_GUID(EncoderLuminanceTable,0xedb33bce,0x0266,0x4a77,0xb9,0x04,0x27,0x21,0x60,0x99,0xe7,0x17); -DEFINE_GUID(EncoderChrominanceTable,0xf2e455dc,0x09b3,0x4316,0x82,0x60,0x67,0x6a,0xda,0x32,0x48,0x1c); -DEFINE_GUID(EncoderSaveFlag,0x292266fc,0xac40,0x47bf,0x8c, 0xfc, 0xa8, 0x5b, 0x89, 0xa6, 0x55, 0xde); - -DEFINE_GUID(CodecIImageBytes,0x025d1823,0x6c7d,0x447b,0xbb, 0xdb, 0xa3, 0xcb, 0xc3, 0xdf, 0xa2, 0xfc); - -MIDL_INTERFACE("025D1823-6C7D-447B-BBDB-A3CBC3DFA2FC") -IImageBytes : public IUnknown -{ -public: - // Return total number of bytes in the IStream - - STDMETHOD(CountBytes)( - OUT UINT *pcb - ) = 0; - - // Locks "cb" bytes, starting from "ulOffset" in the stream, and returns the - // pointer to the beginning of the locked memory chunk in "ppvBytes" - - STDMETHOD(LockBytes)( - IN UINT cb, - IN ULONG ulOffset, - OUT const VOID ** ppvBytes - ) = 0; - - // Unlocks "cb" bytes, pointed by "pvBytes", starting from "ulOffset" in the - // stream - - STDMETHOD(UnlockBytes)( - IN const VOID *pvBytes, - IN UINT cb, - IN ULONG ulOffset - ) = 0; -}; - -//-------------------------------------------------------------------------- -// ImageCodecInfo structure -//-------------------------------------------------------------------------- - -class ImageCodecInfo -{ -public: - CLSID Clsid; - GUID FormatID; - const WCHAR* CodecName; - const WCHAR* DllName; - const WCHAR* FormatDescription; - const WCHAR* FilenameExtension; - const WCHAR* MimeType; - DWORD Flags; - DWORD Version; - DWORD SigCount; - DWORD SigSize; - const BYTE* SigPattern; - const BYTE* SigMask; -}; - -//-------------------------------------------------------------------------- -// Information flags about image codecs -//-------------------------------------------------------------------------- - -enum ImageCodecFlags -{ - ImageCodecFlagsEncoder = 0x00000001, - ImageCodecFlagsDecoder = 0x00000002, - ImageCodecFlagsSupportBitmap = 0x00000004, - ImageCodecFlagsSupportVector = 0x00000008, - ImageCodecFlagsSeekableEncode = 0x00000010, - ImageCodecFlagsBlockingDecode = 0x00000020, - - ImageCodecFlagsBuiltin = 0x00010000, - ImageCodecFlagsSystem = 0x00020000, - ImageCodecFlagsUser = 0x00040000 -}; - -//--------------------------------------------------------------------------- -// Access modes used when calling Image::LockBits -//--------------------------------------------------------------------------- - -enum ImageLockMode -{ - ImageLockModeRead = 0x0001, - ImageLockModeWrite = 0x0002, - ImageLockModeUserInputBuf= 0x0004 -}; - -//--------------------------------------------------------------------------- -// Information about image pixel data -//--------------------------------------------------------------------------- - -class BitmapData -{ -public: - UINT Width; - UINT Height; - INT Stride; - PixelFormat PixelFormat; - VOID* Scan0; - UINT_PTR Reserved; -}; - -//--------------------------------------------------------------------------- -// Image flags -//--------------------------------------------------------------------------- - -enum ImageFlags -{ - ImageFlagsNone = 0, - - // Low-word: shared with SINKFLAG_x - - ImageFlagsScalable = 0x0001, - ImageFlagsHasAlpha = 0x0002, - ImageFlagsHasTranslucent = 0x0004, - ImageFlagsPartiallyScalable = 0x0008, - - // Low-word: color space definition - - ImageFlagsColorSpaceRGB = 0x0010, - ImageFlagsColorSpaceCMYK = 0x0020, - ImageFlagsColorSpaceGRAY = 0x0040, - ImageFlagsColorSpaceYCBCR = 0x0080, - ImageFlagsColorSpaceYCCK = 0x0100, - - // Low-word: image size info - - ImageFlagsHasRealDPI = 0x1000, - ImageFlagsHasRealPixelSize = 0x2000, - - // High-word - - ImageFlagsReadOnly = 0x00010000, - ImageFlagsCaching = 0x00020000 -}; - -enum RotateFlipType -{ - RotateNoneFlipNone = 0, - Rotate90FlipNone = 1, - Rotate180FlipNone = 2, - Rotate270FlipNone = 3, - - RotateNoneFlipX = 4, - Rotate90FlipX = 5, - Rotate180FlipX = 6, - Rotate270FlipX = 7, - - RotateNoneFlipY = Rotate180FlipX, - Rotate90FlipY = Rotate270FlipX, - Rotate180FlipY = RotateNoneFlipX, - Rotate270FlipY = Rotate90FlipX, - - RotateNoneFlipXY = Rotate180FlipNone, - Rotate90FlipXY = Rotate270FlipNone, - Rotate180FlipXY = RotateNoneFlipNone, - Rotate270FlipXY = Rotate90FlipNone -}; - -//--------------------------------------------------------------------------- -// Encoder Parameter structure -//--------------------------------------------------------------------------- -class EncoderParameter -{ -public: - GUID Guid; // GUID of the parameter - ULONG NumberOfValues; // Number of the parameter values - ULONG Type; // Value type, like ValueTypeLONG etc. - VOID* Value; // A pointer to the parameter values -}; - -//--------------------------------------------------------------------------- -// Encoder Parameters structure -//--------------------------------------------------------------------------- -class EncoderParameters -{ -public: - UINT Count; // Number of parameters in this structure - EncoderParameter Parameter[1]; // Parameter values -}; - -//--------------------------------------------------------------------------- -// Property Item -//--------------------------------------------------------------------------- -class PropertyItem -{ -public: - PROPID id; // ID of this property - ULONG length; // Length of the property value, in bytes - WORD type; // Type of the value, as one of TAG_TYPE_XXX - // defined above - VOID* value; // property value -}; - -#ifdef DCR_USE_NEW_140857 -//--------------------------------------------------------------------------- -// Image property types -//--------------------------------------------------------------------------- -#define PropertyTagTypeByte 1 -#define PropertyTagTypeASCII 2 -#define PropertyTagTypeShort 3 -#define PropertyTagTypeLong 4 -#define PropertyTagTypeRational 5 -#define PropertyTagTypeUndefined 7 -#define PropertyTagTypeSLONG 9 -#define PropertyTagTypeSRational 10 -#endif - -//--------------------------------------------------------------------------- -// Image property ID tags -//--------------------------------------------------------------------------- - -#define PropertyTagExifIFD 0x8769 -#define PropertyTagGpsIFD 0x8825 - -#define PropertyTagNewSubfileType 0x00FE -#define PropertyTagSubfileType 0x00FF -#define PropertyTagImageWidth 0x0100 -#define PropertyTagImageHeight 0x0101 -#define PropertyTagBitsPerSample 0x0102 -#define PropertyTagCompression 0x0103 -#define PropertyTagPhotometricInterp 0x0106 -#define PropertyTagThreshHolding 0x0107 -#define PropertyTagCellWidth 0x0108 -#define PropertyTagCellHeight 0x0109 -#define PropertyTagFillOrder 0x010A -#define PropertyTagDocumentName 0x010D -#define PropertyTagImageDescription 0x010E -#define PropertyTagEquipMake 0x010F -#define PropertyTagEquipModel 0x0110 -#define PropertyTagStripOffsets 0x0111 -#define PropertyTagOrientation 0x0112 -#define PropertyTagSamplesPerPixel 0x0115 -#define PropertyTagRowsPerStrip 0x0116 -#define PropertyTagStripBytesCount 0x0117 -#define PropertyTagMinSampleValue 0x0118 -#define PropertyTagMaxSampleValue 0x0119 -#define PropertyTagXResolution 0x011A // Image resolution in width direction -#define PropertyTagYResolution 0x011B // Image resolution in height direction -#define PropertyTagPlanarConfig 0x011C // Image data arrangement -#define PropertyTagPageName 0x011D -#define PropertyTagXPosition 0x011E -#define PropertyTagYPosition 0x011F -#define PropertyTagFreeOffset 0x0120 -#define PropertyTagFreeByteCounts 0x0121 -#define PropertyTagGrayResponseUnit 0x0122 -#define PropertyTagGrayResponseCurve 0x0123 -#define PropertyTagT4Option 0x0124 -#define PropertyTagT6Option 0x0125 -#define PropertyTagResolutionUnit 0x0128 // Unit of X and Y resolution -#define PropertyTagPageNumber 0x0129 -#define PropertyTagTransferFuncition 0x012D -#define PropertyTagSoftwareUsed 0x0131 -#define PropertyTagDateTime 0x0132 -#define PropertyTagArtist 0x013B -#define PropertyTagHostComputer 0x013C -#define PropertyTagPredictor 0x013D -#define PropertyTagWhitePoint 0x013E -#define PropertyTagPrimaryChromaticities 0x013F -#define PropertyTagColorMap 0x0140 -#define PropertyTagHalftoneHints 0x0141 -#define PropertyTagTileWidth 0x0142 -#define PropertyTagTileLength 0x0143 -#define PropertyTagTileOffset 0x0144 -#define PropertyTagTileByteCounts 0x0145 -#define PropertyTagInkSet 0x014C -#define PropertyTagInkNames 0x014D -#define PropertyTagNumberOfInks 0x014E -#define PropertyTagDotRange 0x0150 -#define PropertyTagTargetPrinter 0x0151 -#define PropertyTagExtraSamples 0x0152 -#define PropertyTagSampleFormat 0x0153 -#define PropertyTagSMinSampleValue 0x0154 -#define PropertyTagSMaxSampleValue 0x0155 -#define PropertyTagTransferRange 0x0156 - -#define PropertyTagJPEGProc 0x0200 -#define PropertyTagJPEGInterFormat 0x0201 -#define PropertyTagJPEGInterLength 0x0202 -#define PropertyTagJPEGRestartInterval 0x0203 -#define PropertyTagJPEGLosslessPredictors 0x0205 -#define PropertyTagJPEGPointTransforms 0x0206 -#define PropertyTagJPEGQTables 0x0207 -#define PropertyTagJPEGDCTables 0x0208 -#define PropertyTagJPEGACTables 0x0209 - -#define PropertyTagYCbCrCoefficients 0x0211 -#define PropertyTagYCbCrSubsampling 0x0212 -#define PropertyTagYCbCrPositioning 0x0213 -#define PropertyTagREFBlackWhite 0x0214 - -#define PropertyTagICCProfile 0x8773 // This TAG is defined by ICC - // for embedded ICC in TIFF -#define PropertyTagGamma 0x0301 -#define PropertyTagICCProfileDescriptor 0x0302 -#define PropertyTagSRGBRenderingIntent 0x0303 - -#define PropertyTagImageTitle 0x0320 -#define PropertyTagCopyright 0x8298 - -// Extra TAGs (Like Adobe Image Information tags etc.) - -#define PropertyTagResolutionXUnit 0x5001 -#define PropertyTagResolutionYUnit 0x5002 -#define PropertyTagResolutionXLengthUnit 0x5003 -#define PropertyTagResolutionYLengthUnit 0x5004 -#define PropertyTagPrintFlags 0x5005 -#define PropertyTagPrintFlagsVersion 0x5006 -#define PropertyTagPrintFlagsCrop 0x5007 -#define PropertyTagPrintFlagsBleedWidth 0x5008 -#define PropertyTagPrintFlagsBleedWidthScale 0x5009 -#define PropertyTagHalftoneLPI 0x500A -#define PropertyTagHalftoneLPIUnit 0x500B -#define PropertyTagHalftoneDegree 0x500C -#define PropertyTagHalftoneShape 0x500D -#define PropertyTagHalftoneMisc 0x500E -#define PropertyTagHalftoneScreen 0x500F -#define PropertyTagJPEGQuality 0x5010 -#define PropertyTagGridSize 0x5011 -#define PropertyTagThumbnailFormat 0x5012 // 1 = JPEG, 0 = RAW RGB -#define PropertyTagThumbnailWidth 0x5013 -#define PropertyTagThumbnailHeight 0x5014 -#define PropertyTagThumbnailColorDepth 0x5015 -#define PropertyTagThumbnailPlanes 0x5016 -#define PropertyTagThumbnailRawBytes 0x5017 -#define PropertyTagThumbnailSize 0x5018 -#define PropertyTagThumbnailCompressedSize 0x5019 -#define PropertyTagColorTransferFunction 0x501A -#define PropertyTagThumbnailData 0x501B// RAW thumbnail bits in - // JPEG format or RGB format - // depends on - // PropertyTagThumbnailFormat - -// Thumbnail related TAGs - -#define PropertyTagThumbnailImageWidth 0x5020 // Thumbnail width -#define PropertyTagThumbnailImageHeight 0x5021 // Thumbnail height -#define PropertyTagThumbnailBitsPerSample 0x5022 // Number of bits per - // component -#define PropertyTagThumbnailCompression 0x5023 // Compression Scheme -#define PropertyTagThumbnailPhotometricInterp 0x5024 // Pixel composition -#define PropertyTagThumbnailImageDescription 0x5025 // Image Tile -#define PropertyTagThumbnailEquipMake 0x5026 // Manufacturer of Image - // Input equipment -#define PropertyTagThumbnailEquipModel 0x5027 // Model of Image input - // equipment -#define PropertyTagThumbnailStripOffsets 0x5028 // Image data location -#define PropertyTagThumbnailOrientation 0x5029 // Orientation of image -#define PropertyTagThumbnailSamplesPerPixel 0x502A // Number of components -#define PropertyTagThumbnailRowsPerStrip 0x502B // Number of rows per strip -#define PropertyTagThumbnailStripBytesCount 0x502C // Bytes per compressed - // strip -#define PropertyTagThumbnailResolutionX 0x502D // Resolution in width - // direction -#define PropertyTagThumbnailResolutionY 0x502E // Resolution in height - // direction -#define PropertyTagThumbnailPlanarConfig 0x502F // Image data arrangement -#define PropertyTagThumbnailResolutionUnit 0x5030 // Unit of X and Y - // Resolution -#define PropertyTagThumbnailTransferFunction 0x5031 // Transfer function -#define PropertyTagThumbnailSoftwareUsed 0x5032 // Software used -#define PropertyTagThumbnailDateTime 0x5033 // File change date and - // time -#define PropertyTagThumbnailArtist 0x5034 // Person who created the - // image -#define PropertyTagThumbnailWhitePoint 0x5035 // White point chromaticity -#define PropertyTagThumbnailPrimaryChromaticities 0x5036 - // Chromaticities of - // primaries -#define PropertyTagThumbnailYCbCrCoefficients 0x5037 // Color space transforma- - // tion coefficients -#define PropertyTagThumbnailYCbCrSubsampling 0x5038 // Subsampling ratio of Y - // to C -#define PropertyTagThumbnailYCbCrPositioning 0x5039 // Y and C position -#define PropertyTagThumbnailRefBlackWhite 0x503A // Pair of black and white - // reference values -#define PropertyTagThumbnailCopyRight 0x503B // CopyRight holder - -#define PropertyTagLuminanceTable 0x5090 -#define PropertyTagChrominanceTable 0x5091 - -#define PropertyTagFrameDelay 0x5100 -#define PropertyTagLoopCount 0x5101 - -#define PropertyTagPixelUnit 0x5110 // Unit specifier for pixel/unit -#define PropertyTagPixelPerUnitX 0x5111 // Pixels per unit in X -#define PropertyTagPixelPerUnitY 0x5112 // Pixels per unit in Y -#define PropertyTagPaletteHistogram 0x5113 // Palette histogram - -// EXIF specific tag - -#define PropertyTagExifExposureTime 0x829A -#define PropertyTagExifFNumber 0x829D - -#define PropertyTagExifExposureProg 0x8822 -#define PropertyTagExifSpectralSense 0x8824 -#define PropertyTagExifISOSpeed 0x8827 -#define PropertyTagExifOECF 0x8828 - -#define PropertyTagExifVer 0x9000 -#define PropertyTagExifDTOrig 0x9003 // Date & time of original -#define PropertyTagExifDTDigitized 0x9004 // Date & time of digital data generation - -#define PropertyTagExifCompConfig 0x9101 -#define PropertyTagExifCompBPP 0x9102 - -#define PropertyTagExifShutterSpeed 0x9201 -#define PropertyTagExifAperture 0x9202 -#define PropertyTagExifBrightness 0x9203 -#define PropertyTagExifExposureBias 0x9204 -#define PropertyTagExifMaxAperture 0x9205 -#define PropertyTagExifSubjectDist 0x9206 -#define PropertyTagExifMeteringMode 0x9207 -#define PropertyTagExifLightSource 0x9208 -#define PropertyTagExifFlash 0x9209 -#define PropertyTagExifFocalLength 0x920A -#define PropertyTagExifMakerNote 0x927C -#define PropertyTagExifUserComment 0x9286 -#define PropertyTagExifDTSubsec 0x9290 // Date & Time subseconds -#define PropertyTagExifDTOrigSS 0x9291 // Date & Time original subseconds -#define PropertyTagExifDTDigSS 0x9292 // Date & TIme digitized subseconds - -#define PropertyTagExifFPXVer 0xA000 -#define PropertyTagExifColorSpace 0xA001 -#define PropertyTagExifPixXDim 0xA002 -#define PropertyTagExifPixYDim 0xA003 -#define PropertyTagExifRelatedWav 0xA004 // related sound file -#define PropertyTagExifInterop 0xA005 -#define PropertyTagExifFlashEnergy 0xA20B -#define PropertyTagExifSpatialFR 0xA20C // Spatial Frequency Response -#define PropertyTagExifFocalXRes 0xA20E // Focal Plane X Resolution -#define PropertyTagExifFocalYRes 0xA20F // Focal Plane Y Resolution -#define PropertyTagExifFocalResUnit 0xA210 // Focal Plane Resolution Unit -#define PropertyTagExifSubjectLoc 0xA214 -#define PropertyTagExifExposureIndex 0xA215 -#define PropertyTagExifSensingMethod 0xA217 -#define PropertyTagExifFileSource 0xA300 -#define PropertyTagExifSceneType 0xA301 -#define PropertyTagExifCfaPattern 0xA302 - -#define PropertyTagGpsVer 0x0000 -#define PropertyTagGpsLatitudeRef 0x0001 -#define PropertyTagGpsLatitude 0x0002 -#define PropertyTagGpsLongitudeRef 0x0003 -#define PropertyTagGpsLongitude 0x0004 -#define PropertyTagGpsAltitudeRef 0x0005 -#define PropertyTagGpsAltitude 0x0006 -#define PropertyTagGpsGpsTime 0x0007 -#define PropertyTagGpsGpsSatellites 0x0008 -#define PropertyTagGpsGpsStatus 0x0009 -#define PropertyTagGpsGpsMeasureMode 0x00A -#define PropertyTagGpsGpsDop 0x000B // Measurement precision -#define PropertyTagGpsSpeedRef 0x000C -#define PropertyTagGpsSpeed 0x000D -#define PropertyTagGpsTrackRef 0x000E -#define PropertyTagGpsTrack 0x000F -#define PropertyTagGpsImgDirRef 0x0010 -#define PropertyTagGpsImgDir 0x0011 -#define PropertyTagGpsMapDatum 0x0012 -#define PropertyTagGpsDestLatRef 0x0013 -#define PropertyTagGpsDestLat 0x0014 -#define PropertyTagGpsDestLongRef 0x0015 -#define PropertyTagGpsDestLong 0x0016 -#define PropertyTagGpsDestBearRef 0x0017 -#define PropertyTagGpsDestBear 0x0018 -#define PropertyTagGpsDestDistRef 0x0019 -#define PropertyTagGpsDestDist 0x001A - -#endif diff --git a/src/includes/GdiPlusInit.h b/src/includes/GdiPlusInit.h deleted file mode 100644 index 868e0f15..00000000 --- a/src/includes/GdiPlusInit.h +++ /dev/null @@ -1,99 +0,0 @@ -/************************************************************************** -* -* Copyright (c) 2000 Microsoft Corporation -* -* Module Name: -* -* Gdiplus init -* -* Abstract: -* -* GDI+ startup/shutdown API's -* -* Created: -* -* 09/02/2000 agodfrey -* Created it. -* -**************************************************************************/ - -#ifndef _GDIPLUSINIT_H -#define _GDIPLUSINIT_H - -// Used for debug event notification (debug builds only) - -enum DebugEventLevel -{ - DebugEventLevelFatal, - DebugEventLevelWarning -}; - -// Callback function that GDI+ can call, on debug builds, for assertions -// and warnings. - -typedef VOID (WINAPI *DebugEventProc)(DebugEventLevel level, CHAR *message); - -// Notification functions which the user must call appropriately if -// "SuppressBackgroundThread" (below) is set. - -typedef Status (WINAPI *NotificationHookProc)(OUT ULONG_PTR *token); -typedef VOID (WINAPI *NotificationUnhookProc)(ULONG_PTR token); - -// Input structure for GdiplusStartup() - -struct GdiplusStartupInput -{ - UINT32 GdiplusVersion; // Must be 1 - DebugEventProc DebugEventCallback; // Ignored on free builds - BOOL SuppressBackgroundThread; // FALSE unless you're prepared to call - // the hook/unhook functions properly - BOOL SuppressExternalCodecs; // FALSE unless you want GDI+ only to use - // its internal image codecs. - - GdiplusStartupInput( - DebugEventProc debugEventCallback = NULL, - BOOL suppressBackgroundThread = FALSE, - BOOL suppressExternalCodecs = FALSE) - { - GdiplusVersion = 1; - DebugEventCallback = debugEventCallback; - SuppressBackgroundThread = suppressBackgroundThread; - SuppressExternalCodecs = suppressExternalCodecs; - } -}; - -// Output structure for GdiplusStartup() - -struct GdiplusStartupOutput -{ - // The following 2 fields are NULL if SuppressBackgroundThread is FALSE. - // Otherwise, they are functions which must be called appropriately to - // replace the background thread. - // - // These should be called on the application's main message loop - i.e. - // a message loop which is active for the lifetime of GDI+. - // "NotificationHook" should be called before starting the loop, - // and "NotificationUnhook" should be called after the loop ends. - - NotificationHookProc NotificationHook; - NotificationUnhookProc NotificationUnhook; -}; - -// GDI+ initialization. Must be called before GDI+ API's are used. -// -// token - may not be NULL - accepts a token to be passed in the corresponding -// GdiplusShutdown call. -// input - may not be NULL -// output - may be NULL only if input->SuppressBackgroundThread is FALSE. - -extern "C" Status WINAPI GdiplusStartup( - OUT ULONG_PTR *token, - const GdiplusStartupInput *input, - OUT GdiplusStartupOutput *output); - -// GDI+ termination. Must be called before GDI+ is unloaded. GDI+ API's may not -// be called after this. - -extern "C" VOID WINAPI GdiplusShutdown(ULONG_PTR token); - -#endif diff --git a/src/includes/GdiPlusLineCaps.h b/src/includes/GdiPlusLineCaps.h deleted file mode 100644 index 5ac880f5..00000000 --- a/src/includes/GdiPlusLineCaps.h +++ /dev/null @@ -1,253 +0,0 @@ -/**************************************************************************\ -* -* Copyright (c) 2000, Microsoft Corp. All Rights Reserved. -* -* Module Name: -* -* GdiplusLineCaps.h -* -* Abstract: -* -* APIs for Custom Line Caps -* -\**************************************************************************/ - -#ifndef _GDIPLUSLINECAPS_H -#define _GDIPLUSLINECAPS_H - -inline -CustomLineCap::CustomLineCap( - IN const GraphicsPath* fillPath, - IN const GraphicsPath* strokePath, - IN LineCap baseCap, - IN REAL baseInset - ) -{ - nativeCap = NULL; - GpPath* nativeFillPath = NULL; - GpPath* nativeStrokePath = NULL; - - if(fillPath) - nativeFillPath = fillPath->nativePath; - if(strokePath) - nativeStrokePath = strokePath->nativePath; - - lastResult = DllExports::GdipCreateCustomLineCap( - nativeFillPath, nativeStrokePath, - baseCap, baseInset, &nativeCap); -} - -inline -CustomLineCap::CustomLineCap() -{ - // This is used for default constructor for subclasses. - // So don't create a nativeCap. - - nativeCap = NULL; - lastResult = Ok; -} - -inline -CustomLineCap::~CustomLineCap() -{ - DllExports::GdipDeleteCustomLineCap(nativeCap); -} - -inline Status -CustomLineCap::SetStrokeCaps( - IN LineCap startCap, - IN LineCap endCap) -{ - return SetStatus(DllExports::GdipSetCustomLineCapStrokeCaps(nativeCap, - startCap, endCap)); -} - -inline Status -CustomLineCap::GetStrokeCaps( - OUT LineCap* startCap, - OUT LineCap* endCap) const -{ - return SetStatus(DllExports::GdipGetCustomLineCapStrokeCaps(nativeCap, - startCap, endCap)); -} - -inline Status -CustomLineCap::SetStrokeJoin( - IN LineJoin lineJoin) -{ - return SetStatus(DllExports::GdipSetCustomLineCapStrokeJoin(nativeCap, lineJoin)); -} - -inline LineJoin -CustomLineCap::GetStrokeJoin() const -{ - LineJoin lineJoin; - - SetStatus(DllExports::GdipGetCustomLineCapStrokeJoin(nativeCap, &lineJoin)); - - return lineJoin; -} - -inline Status -CustomLineCap::SetBaseCap(IN LineCap baseCap) -{ - return SetStatus(DllExports::GdipSetCustomLineCapBaseCap(nativeCap, baseCap)); -} - -inline LineCap -CustomLineCap::GetBaseCap() const -{ - LineCap baseCap; - SetStatus(DllExports::GdipGetCustomLineCapBaseCap(nativeCap, &baseCap)); - - return baseCap; -} - -inline Status -CustomLineCap::SetBaseInset(IN REAL inset) -{ - return SetStatus(DllExports::GdipSetCustomLineCapBaseInset(nativeCap, inset)); -} - -inline REAL -CustomLineCap::GetBaseInset() const -{ - REAL inset; - SetStatus(DllExports::GdipGetCustomLineCapBaseInset(nativeCap, &inset)); - - return inset; -} - - -inline Status -CustomLineCap::SetWidthScale(IN REAL widthScale) -{ - return SetStatus(DllExports::GdipSetCustomLineCapWidthScale(nativeCap, widthScale)); -} - -inline REAL -CustomLineCap::GetWidthScale() const -{ - REAL widthScale; - SetStatus(DllExports::GdipGetCustomLineCapWidthScale(nativeCap, &widthScale)); - - return widthScale; -} - -inline CustomLineCap* -CustomLineCap::Clone() const -{ - GpCustomLineCap *newNativeLineCap = NULL; - - SetStatus(DllExports::GdipCloneCustomLineCap(nativeCap, &newNativeLineCap)); - - if (lastResult == Ok) - { - CustomLineCap *newLineCap = new CustomLineCap(newNativeLineCap, lastResult); - if (newLineCap == NULL) - { - SetStatus(DllExports::GdipDeleteCustomLineCap(newNativeLineCap)); - } - - return newLineCap; - } - - return NULL; -} - -class AdjustableArrowCap : public CustomLineCap -{ -public: - - AdjustableArrowCap( - IN REAL height, - IN REAL width, - IN BOOL isFilled = TRUE - ) - { - GpAdjustableArrowCap* cap = NULL; - - lastResult = DllExports::GdipCreateAdjustableArrowCap( - height, width, isFilled, &cap); - SetNativeCap(cap); - } - - Status SetHeight(IN REAL height) - { - GpAdjustableArrowCap* cap = (GpAdjustableArrowCap*) nativeCap; - return SetStatus(DllExports::GdipSetAdjustableArrowCapHeight( - cap, height)); - } - - REAL GetHeight() const - { - GpAdjustableArrowCap* cap = (GpAdjustableArrowCap*) nativeCap; - REAL height; - SetStatus(DllExports::GdipGetAdjustableArrowCapHeight( - cap, &height)); - - return height; - } - - Status SetWidth(IN REAL width) - { - GpAdjustableArrowCap* cap = (GpAdjustableArrowCap*) nativeCap; - return SetStatus(DllExports::GdipSetAdjustableArrowCapWidth( - cap, width)); - } - - REAL GetWidth() const - { - GpAdjustableArrowCap* cap = (GpAdjustableArrowCap*) nativeCap; - REAL width; - SetStatus(DllExports::GdipGetAdjustableArrowCapWidth( - cap, &width)); - - return width; - } - - Status SetMiddleInset(IN REAL middleInset) - { - GpAdjustableArrowCap* cap = (GpAdjustableArrowCap*) nativeCap; - return SetStatus(DllExports::GdipSetAdjustableArrowCapMiddleInset( - cap, middleInset)); - } - - REAL GetMiddleInset() const - { - GpAdjustableArrowCap* cap = (GpAdjustableArrowCap*) nativeCap; - REAL middleInset; - SetStatus(DllExports::GdipGetAdjustableArrowCapMiddleInset( - cap, &middleInset)); - - return middleInset; - } - - Status SetFillState(IN BOOL isFilled) - { - GpAdjustableArrowCap* cap = (GpAdjustableArrowCap*) nativeCap; - return SetStatus(DllExports::GdipSetAdjustableArrowCapFillState( - cap, isFilled)); - } - - BOOL IsFilled() const - { - GpAdjustableArrowCap* cap = (GpAdjustableArrowCap*) nativeCap; - BOOL isFilled; - SetStatus(DllExports::GdipGetAdjustableArrowCapFillState( - cap, &isFilled)); - - return isFilled; - } - -#ifdef DCR_USE_NEW_250932 - -private: - AdjustableArrowCap(const AdjustableArrowCap &); - AdjustableArrowCap& operator=(const AdjustableArrowCap &); - -#endif - -}; - -#endif diff --git a/src/includes/GdiPlusMatrix.h b/src/includes/GdiPlusMatrix.h deleted file mode 100644 index 1338d8c1..00000000 --- a/src/includes/GdiPlusMatrix.h +++ /dev/null @@ -1,309 +0,0 @@ -/**************************************************************************\ -* -* Copyright (c) 1998-2000, Microsoft Corp. All Rights Reserved. -* -* Module Name: -* -* GdiplusMatrix.h -* -* Abstract: -* -* GDI+ Matrix class -* -\**************************************************************************/ - -class Matrix : public GdiplusBase -{ -public: - friend class Graphics; - friend class GraphicsPath; - friend class TextureBrush; - friend class LinearGradientBrush; - friend class PathGradientBrush; - friend class Pen; - friend class Region; - - // Default constructor - set to identity matrix - - Matrix() - { - GpMatrix *matrix = NULL; - - lastResult = DllExports::GdipCreateMatrix(&matrix); - - SetNativeMatrix(matrix); - } - - Matrix(IN REAL m11, - IN REAL m12, - IN REAL m21, - IN REAL m22, - IN REAL dx, - IN REAL dy) - { - GpMatrix *matrix = NULL; - - lastResult = DllExports::GdipCreateMatrix2(m11, m12, m21, m22, - dx, dy, &matrix); - - SetNativeMatrix(matrix); - } - - Matrix(IN const RectF& rect, - IN const PointF* dstplg) - { - GpMatrix *matrix = NULL; - - lastResult = DllExports::GdipCreateMatrix3(&rect, - dstplg, - &matrix); - - SetNativeMatrix(matrix); - } - - Matrix(IN const Rect& rect, - IN const Point* dstplg) - { - GpMatrix *matrix = NULL; - - lastResult = DllExports::GdipCreateMatrix3I(&rect, - dstplg, - &matrix); - - SetNativeMatrix(matrix); - } - - ~Matrix() - { - DllExports::GdipDeleteMatrix(nativeMatrix); - } - - Matrix *Clone() const - { - GpMatrix *cloneMatrix = NULL; - - SetStatus(DllExports::GdipCloneMatrix(nativeMatrix, - &cloneMatrix)); - - if (lastResult != Ok) - return NULL; - - return new Matrix(cloneMatrix); - } - - Status GetElements(OUT REAL *m) const - { - return SetStatus(DllExports::GdipGetMatrixElements(nativeMatrix, m)); - } - - Status SetElements(IN REAL m11, - IN REAL m12, - IN REAL m21, - IN REAL m22, - IN REAL dx, - IN REAL dy) - { - return SetStatus(DllExports::GdipSetMatrixElements(nativeMatrix, - m11, m12, m21, m22, dx, dy)); - } - - REAL OffsetX() const - { - REAL elements[6]; - - if (GetElements(&elements[0]) == Ok) - return elements[4]; - else - return 0.0f; - } - - REAL OffsetY() const - { - REAL elements[6]; - - if (GetElements(&elements[0]) == Ok) - return elements[5]; - else - return 0.0f; - } - - Status Reset() - { - // set identity matrix elements - return SetStatus(DllExports::GdipSetMatrixElements(nativeMatrix, - 1.0, 0.0, 0.0, 1.0, 0.0, 0.0)); - } - - Status Multiply(IN const Matrix *matrix, - IN MatrixOrder order = MatrixOrderPrepend) - { - return SetStatus(DllExports::GdipMultiplyMatrix(nativeMatrix, - matrix->nativeMatrix, - order)); - } - - Status Translate(IN REAL offsetX, - IN REAL offsetY, - IN MatrixOrder order = MatrixOrderPrepend) - { - return SetStatus(DllExports::GdipTranslateMatrix(nativeMatrix, offsetX, offsetY, order)); - } - - Status Scale(IN REAL scaleX, - IN REAL scaleY, - IN MatrixOrder order = MatrixOrderPrepend) - { - return SetStatus(DllExports::GdipScaleMatrix(nativeMatrix, scaleX, scaleY, order)); - } - - Status Rotate(IN REAL angle, - IN MatrixOrder order = MatrixOrderPrepend) - { - return SetStatus(DllExports::GdipRotateMatrix(nativeMatrix, angle, order)); - } - - Status RotateAt(IN REAL angle, - IN const PointF& center, - IN MatrixOrder order = MatrixOrderPrepend) - { - if(order == MatrixOrderPrepend) - { - SetStatus(DllExports::GdipTranslateMatrix(nativeMatrix, center.X, center.Y, order)); - SetStatus(DllExports::GdipRotateMatrix(nativeMatrix, angle, order)); - return SetStatus(DllExports::GdipTranslateMatrix(nativeMatrix, - center.X, - center.Y, order)); - } - else - { - SetStatus(DllExports::GdipTranslateMatrix(nativeMatrix, - center.X, - center.Y, order)); - SetStatus(DllExports::GdipRotateMatrix(nativeMatrix, angle, order)); - return SetStatus(DllExports::GdipTranslateMatrix(nativeMatrix, center.X, center.Y, order)); - } - } - - Status Shear(IN REAL shearX, - IN REAL shearY, - IN MatrixOrder order = MatrixOrderPrepend) - { - return SetStatus(DllExports::GdipShearMatrix(nativeMatrix, shearX, shearY, order)); - } - - Status Invert() - { - return SetStatus(DllExports::GdipInvertMatrix(nativeMatrix)); - } - - // float version - Status TransformPoints(IN OUT PointF* pts, - IN INT count = 1) const - { - return SetStatus(DllExports::GdipTransformMatrixPoints(nativeMatrix, pts, count)); - } - - Status TransformPoints(IN OUT Point* pts, - IN INT count = 1) const - { - return SetStatus(DllExports::GdipTransformMatrixPointsI(nativeMatrix, - pts, - count)); - } - - Status TransformVectors(IN OUT PointF* pts, - IN INT count = 1) const - { - return SetStatus(DllExports::GdipVectorTransformMatrixPoints(nativeMatrix, pts, count)); - } - - Status TransformVectors(IN OUT Point* pts, - IN INT count = 1) const - { - return SetStatus(DllExports::GdipVectorTransformMatrixPointsI(nativeMatrix, - pts, - count)); - } - - BOOL IsInvertible() const - { - BOOL result = FALSE; - - SetStatus(DllExports::GdipIsMatrixInvertible(nativeMatrix, &result)); - - return result; - } - - BOOL IsIdentity() const - { - BOOL result = FALSE; - - SetStatus(DllExports::GdipIsMatrixIdentity(nativeMatrix, &result)); - - return result; - } - - BOOL Equals(IN const Matrix *matrix) const - { - BOOL result = FALSE; - - SetStatus(DllExports::GdipIsMatrixEqual(nativeMatrix, - matrix->nativeMatrix, &result)); - - return result; - } - - Status GetLastStatus() const - { - Status lastStatus = lastResult; - lastResult = Ok; - - return lastStatus; - } - -protected: - -#ifdef DCR_USE_NEW_250932 - -private: - Matrix(const Matrix &); - Matrix& operator=(const Matrix &); -protected: - -#else - - Matrix(const Matrix& matrix) - { - matrix; - SetStatus(NotImplemented); - SetNativeMatrix(NULL); - } - - Matrix& operator=(const Matrix& matrix) - { - matrix; - SetStatus(NotImplemented); - return *this; - } - -#endif - - Matrix(GpMatrix *nativeMatrix) - { - lastResult = Ok; - SetNativeMatrix(nativeMatrix); - } - - VOID SetNativeMatrix(GpMatrix *nativeMatrix) - { - this->nativeMatrix = nativeMatrix; - } - - Status SetStatus(Status status) const - { - if (status != Ok) - return (lastResult = status); - else - return status; - } - -protected: - GpMatrix *nativeMatrix; - mutable Status lastResult; -}; diff --git a/src/includes/GdiPlusMem.h b/src/includes/GdiPlusMem.h deleted file mode 100644 index a0e0e44f..00000000 --- a/src/includes/GdiPlusMem.h +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************\ -* -* Copyright (c) 1998-2000, Microsoft Corp. All Rights Reserved. -* -* Module Name: -* -* GdiplusMem.h -* -* Abstract: -* -* Flat GDI+ Memory Allocators - header file -* -\**************************************************************************/ - -// TODO: this file style needs to be made internally consistent with the way -// it handles breaking the long argument lists across multiple lines - -#ifndef _GDIPLUSMEM_H -#define _GDIPLUSMEM_H - -#define WINGDIPAPI __stdcall - -// currently, only C++ wrapper API's force const. - -#ifdef _GDIPLUS_H -#define GDIPCONST const -#else -#define GDIPCONST -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -//---------------------------------------------------------------------------- -// Memory Allocation APIs -//---------------------------------------------------------------------------- - -void* WINGDIPAPI -GdipAlloc(size_t size); - -void WINGDIPAPI -GdipFree(void* ptr); - -#ifdef __cplusplus -} -#endif - -#endif // !_GDIPLUSMEM_H diff --git a/src/includes/GdiPlusMetaFile.h b/src/includes/GdiPlusMetaFile.h deleted file mode 100644 index f7e0d91a..00000000 --- a/src/includes/GdiPlusMetaFile.h +++ /dev/null @@ -1,374 +0,0 @@ -/**************************************************************************\ -* -* Copyright (c) 1998-2000, Microsoft Corp. All Rights Reserved. -* -* Module Name: -* -* GdiplusMetafile.h -* -* Abstract: -* -* Metafile related declarations -* -\**************************************************************************/ - -#ifndef _GDIPLUSMETAFILE_H -#define _GDIPLUSMETAFILE_H - -class Metafile : public Image -{ -public: - friend class Image; - - // Read a metafile - Metafile() - { - SetNativeImage(NULL); - lastResult = Ok; - } - - // Playback a metafile from a HMETAFILE - // If deleteWmf is TRUE, then when the metafile is deleted, - // the hWmf will also be deleted. Otherwise, it won't be. - Metafile(IN HMETAFILE hWmf, - IN const APMFileHeader * apmFileHeader, - IN BOOL deleteWmf = FALSE) - { - GpMetafile * metafile = NULL; - - lastResult = DllExports::GdipCreateMetafileFromWmf(hWmf, deleteWmf, apmFileHeader, &metafile); - - SetNativeImage(metafile); - } - - // Playback a metafile from a HENHMETAFILE - // If deleteEmf is TRUE, then when the metafile is deleted, - // the hEmf will also be deleted. Otherwise, it won't be. - Metafile(IN HENHMETAFILE hEmf, - IN BOOL deleteEmf = FALSE) - { - GpMetafile * metafile = NULL; - - lastResult = DllExports::GdipCreateMetafileFromEmf(hEmf, deleteEmf, &metafile); - - SetNativeImage(metafile); - } - - // Playback a metafile from a file - Metafile(IN const WCHAR* filename) - { - GpMetafile * metafile = NULL; - - lastResult = DllExports::GdipCreateMetafileFromFile(filename, &metafile); - - SetNativeImage(metafile); - } - - // Playback a WMF metafile from a file - Metafile(IN const WCHAR* filename, - IN const APMFileHeader * apmFileHeader - ) - { - GpMetafile * metafile = NULL; - - lastResult = DllExports::GdipCreateMetafileFromWmfFile(filename, apmFileHeader, &metafile); - - SetNativeImage(metafile); - } - - // Playback a metafile from a stream - Metafile(IN IStream* stream) - { - GpMetafile * metafile = NULL; - - lastResult = DllExports::GdipCreateMetafileFromStream(stream, &metafile); - - SetNativeImage(metafile); - } - - // Record a metafile to memory - Metafile( - IN HDC referenceHdc, - IN EmfType type = EmfTypeEmfPlusDual, - IN const WCHAR * description = NULL - ) - { - GpMetafile * metafile = NULL; - - lastResult = DllExports::GdipRecordMetafile( - referenceHdc, type, NULL, MetafileFrameUnitGdi, - description, &metafile); - - SetNativeImage(metafile); - } - - // Record a metafile to memory - Metafile( - IN HDC referenceHdc, - IN const RectF & frameRect, - IN MetafileFrameUnit frameUnit = MetafileFrameUnitGdi, - IN EmfType type = EmfTypeEmfPlusDual, - IN const WCHAR * description = NULL - ) - { - GpMetafile * metafile = NULL; - - lastResult = DllExports::GdipRecordMetafile( - referenceHdc, type, &frameRect, frameUnit, - description, &metafile); - - SetNativeImage(metafile); - } - - // Record a metafile to memory - Metafile( - IN HDC referenceHdc, - IN const Rect & frameRect, - IN MetafileFrameUnit frameUnit = MetafileFrameUnitGdi, - IN EmfType type = EmfTypeEmfPlusDual, - IN const WCHAR * description = NULL - ) - { - GpMetafile * metafile = NULL; - - lastResult = DllExports::GdipRecordMetafileI( - referenceHdc, type, &frameRect, frameUnit, - description, &metafile); - - SetNativeImage(metafile); - } - - // Record a metafile to a file - Metafile( - IN const WCHAR* fileName, - IN HDC referenceHdc, - IN EmfType type = EmfTypeEmfPlusDual, - IN const WCHAR * description = NULL - ) - { - GpMetafile * metafile = NULL; - - lastResult = DllExports::GdipRecordMetafileFileName(fileName, - referenceHdc, type, NULL, MetafileFrameUnitGdi, - description, &metafile); - - SetNativeImage(metafile); - } - - // Record a metafile to a file - Metafile( - IN const WCHAR* fileName, - IN HDC referenceHdc, - IN const RectF & frameRect, - IN MetafileFrameUnit frameUnit = MetafileFrameUnitGdi, - IN EmfType type = EmfTypeEmfPlusDual, - IN const WCHAR * description = NULL - ) - { - GpMetafile * metafile = NULL; - - lastResult = DllExports::GdipRecordMetafileFileName(fileName, - referenceHdc, type, &frameRect, frameUnit, - description, &metafile); - - SetNativeImage(metafile); - } - - // Record a metafile to a file - Metafile( - IN const WCHAR* fileName, - IN HDC referenceHdc, - IN const Rect & frameRect, - IN MetafileFrameUnit frameUnit = MetafileFrameUnitGdi, - IN EmfType type = EmfTypeEmfPlusDual, - IN const WCHAR * description = NULL - ) - { - GpMetafile * metafile = NULL; - - lastResult = DllExports::GdipRecordMetafileFileNameI(fileName, - referenceHdc, type, &frameRect, frameUnit, - description, &metafile); - - SetNativeImage(metafile); - } - - // Record a metafile to a stream - Metafile( - IN IStream * stream, - IN HDC referenceHdc, - IN EmfType type = EmfTypeEmfPlusDual, - IN const WCHAR * description = NULL - ) - { - GpMetafile * metafile = NULL; - - lastResult = DllExports::GdipRecordMetafileStream(stream, - referenceHdc, type, NULL, MetafileFrameUnitGdi, - description, &metafile); - - SetNativeImage(metafile); - } - - // Record a metafile to a stream - Metafile( - IN IStream * stream, - IN HDC referenceHdc, - IN const RectF & frameRect, - IN MetafileFrameUnit frameUnit = MetafileFrameUnitGdi, - IN EmfType type = EmfTypeEmfPlusDual, - IN const WCHAR * description = NULL - ) - { - GpMetafile * metafile = NULL; - - lastResult = DllExports::GdipRecordMetafileStream(stream, - referenceHdc, type, &frameRect, frameUnit, - description, &metafile); - - SetNativeImage(metafile); - } - - // Write a metafile to a stream with down-level GDI records - Metafile( - IN IStream * stream, - IN HDC referenceHdc, - IN const Rect & frameRect, - IN MetafileFrameUnit frameUnit = MetafileFrameUnitGdi, - IN EmfType type = EmfTypeEmfPlusDual, - IN const WCHAR * description = NULL - ) - { - GpMetafile * metafile = NULL; - - lastResult = DllExports::GdipRecordMetafileStreamI(stream, - referenceHdc, type, &frameRect, frameUnit, - description, &metafile); - - SetNativeImage(metafile); - } - - static Status GetMetafileHeader( - IN HMETAFILE hWmf, - IN const APMFileHeader * apmFileHeader, - OUT MetafileHeader * header - ) - { - return DllExports::GdipGetMetafileHeaderFromWmf(hWmf, apmFileHeader, header); - } - - static Status GetMetafileHeader( - IN HENHMETAFILE hEmf, - OUT MetafileHeader * header - ) - { - return DllExports::GdipGetMetafileHeaderFromEmf(hEmf, header); - } - - static Status GetMetafileHeader( - IN const WCHAR* filename, - OUT MetafileHeader * header - ) - { - return DllExports::GdipGetMetafileHeaderFromFile(filename, header); - } - - static Status GetMetafileHeader( - IN IStream * stream, - OUT MetafileHeader * header - ) - { - return DllExports::GdipGetMetafileHeaderFromStream(stream, header); - } - - Status GetMetafileHeader( - OUT MetafileHeader * header - ) const - { - return SetStatus(DllExports::GdipGetMetafileHeaderFromMetafile( - (GpMetafile *)nativeImage, - header)); - } - - // Once this method is called, the Metafile object is in an invalid state - // and can no longer be used. It is the responsiblity of the caller to - // invoke DeleteEnhMetaFile to delete this hEmf. - - HENHMETAFILE GetHENHMETAFILE() - { - HENHMETAFILE hEmf; - - SetStatus(DllExports::GdipGetHemfFromMetafile((GpMetafile *)nativeImage, &hEmf)); - - return hEmf; - } - - // Used in conjuction with Graphics::EnumerateMetafile to play an EMF+ - // The data must be DWORD aligned if it's an EMF or EMF+. It must be - // WORD aligned if it's a WMF. - Status - PlayRecord( - IN EmfPlusRecordType recordType, - IN UINT flags, - IN UINT dataSize, - IN const BYTE * data - ) const - { - return SetStatus(DllExports::GdipPlayMetafileRecord( - (GpMetafile *)nativeImage, - recordType, - flags, - dataSize, - data)); - } - - // If you're using a printer HDC for the metafile, but you want the - // metafile rasterized at screen resolution, then use this API to set - // the rasterization dpi of the metafile to the screen resolution, - // e.g. 96 dpi or 120 dpi. - Status SetDownLevelRasterizationLimit( - IN UINT metafileRasterizationLimitDpi - ) - { - return SetStatus(DllExports::GdipSetMetafileDownLevelRasterizationLimit( - (GpMetafile *)nativeImage, - metafileRasterizationLimitDpi)); - } - - UINT GetDownLevelRasterizationLimit() const - { - UINT metafileRasterizationLimitDpi = 0; - - SetStatus(DllExports::GdipGetMetafileDownLevelRasterizationLimit( - (GpMetafile *)nativeImage, - &metafileRasterizationLimitDpi)); - - return metafileRasterizationLimitDpi; - } - - static UINT Metafile::EmfToWmfBits( - IN HENHMETAFILE hemf, - IN UINT cbData16, - IN LPBYTE pData16, - IN INT iMapMode = MM_ANISOTROPIC, - IN EmfToWmfBitsFlags eFlags = EmfToWmfBitsFlagsDefault - ) - { - return DllExports::GdipEmfToWmfBits( - hemf, - cbData16, - pData16, - iMapMode, - eFlags); - } - -#ifdef DCR_USE_NEW_250932 - -private: - Metafile(const Metafile &); - Metafile& operator=(const Metafile &); - -#endif -}; - -#endif // !_METAFILE_H diff --git a/src/includes/GdiPlusMetaHeader.h b/src/includes/GdiPlusMetaHeader.h deleted file mode 100644 index 95ee190f..00000000 --- a/src/includes/GdiPlusMetaHeader.h +++ /dev/null @@ -1,213 +0,0 @@ -/**************************************************************************\ -* -* Copyright (c) 1998-2000, Microsoft Corp. All Rights Reserved. -* -* Module Name: -* -* Metafile headers -* -* Abstract: -* -* Declarations for various metafile header structures. -* -\**************************************************************************/ - -#ifndef _GDIPLUSMETAHEADER_H -#define _GDIPLUSMETAHEADER_H - -typedef struct -{ - DWORD iType; // Record type EMR_HEADER - DWORD nSize; // Record size in bytes. This may be greater - // than the sizeof(ENHMETAHEADER). - RECTL rclBounds; // Inclusive-inclusive bounds in device units - RECTL rclFrame; // Inclusive-inclusive Picture Frame of metafile in .01 mm units - DWORD dSignature; // Signature. Must be ENHMETA_SIGNATURE. - DWORD nVersion; // Version number - DWORD nBytes; // Size of the metafile in bytes - DWORD nRecords; // Number of records in the metafile - WORD nHandles; // Number of handles in the handle table - // Handle index zero is reserved. - WORD sReserved; // Reserved. Must be zero. - DWORD nDescription; // Number of chars in the unicode description string - // This is 0 if there is no description string - DWORD offDescription; // Offset to the metafile description record. - // This is 0 if there is no description string - DWORD nPalEntries; // Number of entries in the metafile palette. - SIZEL szlDevice; // Size of the reference device in pels - SIZEL szlMillimeters; // Size of the reference device in millimeters -} ENHMETAHEADER3; - -// Aldus Placeable Metafiles - -// Placeable Metafiles were created by Aldus Corporation as a non-standard -// way of specifying how a metafile is mapped and scaled on an output device. -// Placeable metafiles are quite wide-spread, but not directly supported by -// the Windows API. To playback a placeable metafile using the Windows API, -// you will first need to strip the placeable metafile header from the file. -// This is typically performed by copying the metafile to a temporary file -// starting at file offset 22 (0x16). The contents of the temporary file may -// then be used as input to the Windows GetMetaFile(), PlayMetaFile(), -// CopyMetaFile(), etc. GDI functions. - -// Each placeable metafile begins with a 22-byte header, -// followed by a standard metafile: - -#include // set structure packing to 2 - -typedef struct -{ - INT16 Left; - INT16 Top; - INT16 Right; - INT16 Bottom; -} APMRect16; - -typedef struct -{ - UINT32 Key; // GDIP_WMF_ALDUSKEY - INT16 Hmf; // Metafile HANDLE number (always 0) - APMRect16 BoundingBox; // Coordinates in metafile units - INT16 Inch; // Number of metafile units per inch - UINT32 Reserved; // Reserved (always 0) - INT16 Checksum; // Checksum value for previous 10 WORDs -} APMFileHeader; - -#include - -// Key contains a special identification value that indicates the presence -// of a placeable metafile header and is always 0x9AC6CDD7. - -// Handle is used to stored the handle of the metafile in memory. When written -// to disk, this field is not used and will always contains the value 0. - -// Left, Top, Right, and Bottom contain the coordinates of the upper-left -// and lower-right corners of the image on the output device. These are -// measured in twips. - -// A twip (meaning "twentieth of a point") is the logical unit of measurement -// used in Windows Metafiles. A twip is equal to 1/1440 of an inch. Thus 720 -// twips equal 1/2 inch, while 32,768 twips is 22.75 inches. - -// Inch contains the number of twips per inch used to represent the image. -// Normally, there are 1440 twips per inch; however, this number may be -// changed to scale the image. A value of 720 indicates that the image is -// double its normal size, or scaled to a factor of 2:1. A value of 360 -// indicates a scale of 4:1, while a value of 2880 indicates that the image -// is scaled down in size by a factor of two. A value of 1440 indicates -// a 1:1 scale ratio. - -// Reserved is not used and is always set to 0. - -// Checksum contains a checksum value for the previous 10 WORDs in the header. -// This value can be used in an attempt to detect if the metafile has become -// corrupted. The checksum is calculated by XORing each WORD value to an -// initial value of 0. - -// If the metafile was recorded with a reference Hdc that was a display. -#define GDIP_EMFPLUSFLAGS_DISPLAY 0x00000001 - -class MetafileHeader -{ -public: - MetafileType Type; - UINT Size; // Size of the metafile (in bytes) - UINT Version; // EMF+, EMF, or WMF version - UINT EmfPlusFlags; - REAL DpiX; - REAL DpiY; - INT X; // Bounds in device units - INT Y; - INT Width; - INT Height; - union - { - METAHEADER WmfHeader; - ENHMETAHEADER3 EmfHeader; - }; - INT EmfPlusHeaderSize; // size of the EMF+ header in file - INT LogicalDpiX; // Logical Dpi of reference Hdc - INT LogicalDpiY; // usually valid only for EMF+ files - -public: - // Get the metafile type - MetafileType GetType() const { return Type; } - - // Get the size of the metafile in BYTEs - UINT GetMetafileSize() const { return Size; } - - // If IsEmfPlus, this is the EMF+ version; else it is the WMF or EMF version - UINT GetVersion() const { return Version; } - - // Get the EMF+ flags associated with the metafile - UINT GetEmfPlusFlags() const { return EmfPlusFlags; } - - // Get the X Dpi of the metafile - REAL GetDpiX() const { return DpiX; } - - // Get the Y Dpi of the metafile - REAL GetDpiY() const { return DpiY; } - - // Get the bounds of the metafile in device units - VOID GetBounds (OUT Rect *rect) const - { - rect->X = X; - rect->Y = Y; - rect->Width = Width; - rect->Height = Height; - } - - // Is it any type of WMF (standard or Aldus Placeable Metafile)? - BOOL IsWmf() const - { - return ((Type == MetafileTypeWmf) || (Type == MetafileTypeWmfAldus)); - } - - // Is this an Aldus Placeable Metafile? - BOOL IsWmfAldus() const { return (Type == MetafileTypeWmf); } - - // Is this an EMF (not an EMF+)? - BOOL IsEmf() const { return (Type == MetafileTypeEmf); } - - // Is this an EMF or EMF+ file? - BOOL IsEmfOrEmfPlus() const { return (Type >= MetafileTypeEmf); } - - // Is this an EMF+ file? - BOOL IsEmfPlus() const { return (Type >= MetafileTypeEmfPlusOnly); } - - // Is this an EMF+ dual (has dual, down-level records) file? - BOOL IsEmfPlusDual() const { return (Type == MetafileTypeEmfPlusDual); } - - // Is this an EMF+ only (no dual records) file? - BOOL IsEmfPlusOnly() const { return (Type == MetafileTypeEmfPlusOnly); } - - // If it's an EMF+ file, was it recorded against a display Hdc? - BOOL IsDisplay() const - { - return (IsEmfPlus() && - ((EmfPlusFlags & GDIP_EMFPLUSFLAGS_DISPLAY) != 0)); - } - - // Get the WMF header of the metafile (if it is a WMF) - const METAHEADER * GetWmfHeader() const - { - if (IsWmf()) - { - return &WmfHeader; - } - return NULL; - } - - // Get the EMF header of the metafile (if it is an EMF) - const ENHMETAHEADER3 * GetEmfHeader() const - { - if (IsEmfOrEmfPlus()) - { - return &EmfHeader; - } - return NULL; - } -}; - -#endif - diff --git a/src/includes/GdiPlusPath.h b/src/includes/GdiPlusPath.h deleted file mode 100644 index 99f8afdd..00000000 --- a/src/includes/GdiPlusPath.h +++ /dev/null @@ -1,1686 +0,0 @@ -/**************************************************************************\ -* -* Copyright (c) 1998-2000, Microsoft Corp. All Rights Reserved. -* -* Module Name: -* -* GdiplusPath.h -* -* Abstract: -* -* Path related declarations -* -\**************************************************************************/ - -#ifndef _GDIPLUSPATH_H -#define _GDIPLUSPATH_H - -class GraphicsPath : public GdiplusBase -{ -public: - friend class Graphics; - friend class Region; - friend class PathGradientBrush; - friend class GraphicsPathIterator; - friend class CustomLineCap; - - // Path constructors - - GraphicsPath(IN FillMode fillMode = FillModeAlternate) - { - nativePath = NULL; - lastResult = DllExports::GdipCreatePath(fillMode, &nativePath); - } - - GraphicsPath(IN const PointF* points, - IN const BYTE* types, - IN INT count, - IN FillMode fillMode = FillModeAlternate) - { - nativePath = NULL; - lastResult = DllExports::GdipCreatePath2(points, - types, - count, - fillMode, - &nativePath); - } - - GraphicsPath(IN const Point* points, - IN const BYTE* types, - IN INT count, - IN FillMode fillMode = FillModeAlternate) - { - nativePath = NULL; - lastResult = DllExports::GdipCreatePath2I(points, - types, - count, - fillMode, - &nativePath); - } - - ~GraphicsPath() - { - DllExports::GdipDeletePath(nativePath); - } - - /** - * Make a copy of the current path object - */ - GraphicsPath* Clone() const - { - GpPath *clonepath = NULL; - - SetStatus(DllExports::GdipClonePath(nativePath, &clonepath)); - - return new GraphicsPath(clonepath); - } - - /** - * Reset the path object to empty (and fill mode to FillModeAlternate) - */ - Status Reset() - { - return SetStatus(DllExports::GdipResetPath(nativePath)); - } - - /** - * Get path fill mode information - */ - FillMode GetFillMode() const - { - FillMode fillmode = FillModeAlternate; - - SetStatus(DllExports::GdipGetPathFillMode(nativePath, &fillmode)); - - return fillmode; - } - - /** - * Set path fill mode information - */ - Status SetFillMode(IN FillMode fillmode) - { - return SetStatus(DllExports::GdipSetPathFillMode(nativePath, fillmode)); - } - - /** - * Set/get path data - */ - Status GetPathData(OUT PathData* pathData) const - { - if (pathData == NULL) - { - return SetStatus(InvalidParameter); - } - - INT count = GetPointCount(); - - if ((count <= 0) || (pathData->Count>0 && pathData->CountCount = 0; - if (pathData->Points) - { - delete pathData->Points; - pathData->Points = NULL; - } - - if (pathData->Types) - { - delete pathData->Types; - pathData->Types = NULL; - } - - if (count <= 0) - { - return lastResult; - } - } - - if (pathData->Count == 0) - { - pathData->Points = new PointF[count]; - if (pathData->Points == NULL) - { - return SetStatus(OutOfMemory); - - } - pathData->Types = new byte[count]; - if (pathData->Types == NULL) - { - delete pathData->Points; - pathData->Points = NULL; - - return SetStatus(OutOfMemory); - } - pathData->Count = count; - } - - return SetStatus(DllExports::GdipGetPathData(nativePath, pathData)); - } - - /** - * Start/end a subpath - */ - Status StartFigure() - { - return SetStatus(DllExports::GdipStartPathFigure(nativePath)); - } - - Status CloseFigure() - { - return SetStatus(DllExports::GdipClosePathFigure(nativePath)); - } - - Status CloseAllFigures() - { - return SetStatus(DllExports::GdipClosePathFigures(nativePath)); - } - - Status SetMarker() - { - return SetStatus(DllExports::GdipSetPathMarker(nativePath)); - } - - Status ClearMarkers() - { - return SetStatus(DllExports::GdipClearPathMarkers(nativePath)); - } - - Status Reverse() - { - return SetStatus(DllExports::GdipReversePath(nativePath)); - } - - Status GetLastPoint(OUT PointF* lastPoint) const - { - return SetStatus(DllExports::GdipGetPathLastPoint(nativePath, lastPoint)); - } - - /** - * Add lines to the path object - */ - // float version - Status AddLine(IN const PointF& pt1, - IN const PointF& pt2) - { - return AddLine(pt1.X, pt1.Y, pt2.X, pt2.Y); - } - - Status AddLine(IN REAL x1, - IN REAL y1, - IN REAL x2, - IN REAL y2) - { - return SetStatus(DllExports::GdipAddPathLine(nativePath, x1, y1, x2, y2)); - } - - Status AddLines(IN const PointF* points, - IN INT count) - { - return SetStatus(DllExports::GdipAddPathLine2(nativePath, points, count)); - } - - // integer version - Status AddLine(IN const Point& pt1, - IN const Point& pt2) - { - return AddLine(pt1.X, - pt1.Y, - pt2.X, - pt2.Y); - } - - Status AddLine(IN INT x1, - IN INT y1, - IN INT x2, - IN INT y2) - { - return SetStatus(DllExports::GdipAddPathLineI(nativePath, - x1, - y1, - x2, - y2)); - } - - Status AddLines(IN const Point* points, - IN INT count) - { - return SetStatus(DllExports::GdipAddPathLine2I(nativePath, - points, - count)); - } - - /** - * Add an arc to the path object - */ - // float version - Status AddArc(IN const RectF& rect, - IN REAL startAngle, - IN REAL sweepAngle) - { - return AddArc(rect.X, rect.Y, rect.Width, rect.Height, - startAngle, sweepAngle); - } - - Status AddArc(IN REAL x, - IN REAL y, - IN REAL width, - IN REAL height, - IN REAL startAngle, - IN REAL sweepAngle) - { - return SetStatus(DllExports::GdipAddPathArc(nativePath, x, y, width, height, - startAngle, sweepAngle)); - } - - // integer version - Status AddArc(IN const Rect& rect, - IN REAL startAngle, - IN REAL sweepAngle) - { - return AddArc(rect.X, rect.Y, rect.Width, rect.Height, - startAngle, sweepAngle); - } - - Status AddArc(IN INT x, - IN INT y, - IN INT width, - IN INT height, - IN REAL startAngle, - IN REAL sweepAngle) - { - return SetStatus(DllExports::GdipAddPathArcI(nativePath, - x, - y, - width, - height, - startAngle, - sweepAngle)); - } - - /** - * Add Bezier curves to the path object - */ - // float version - Status AddBezier(IN const PointF& pt1, - IN const PointF& pt2, - IN const PointF& pt3, - IN const PointF& pt4) - { - return AddBezier(pt1.X, pt1.Y, pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, - pt4.Y); - } - - Status AddBezier(IN REAL x1, - IN REAL y1, - IN REAL x2, - IN REAL y2, - IN REAL x3, - IN REAL y3, - IN REAL x4, - IN REAL y4) - { - return SetStatus(DllExports::GdipAddPathBezier(nativePath, x1, y1, x2, y2, - x3, y3, x4, y4)); - } - - Status AddBeziers(IN const PointF* points, - IN INT count) - { - return SetStatus(DllExports::GdipAddPathBeziers(nativePath, points, count)); - } - - // integer version - Status AddBezier(IN const Point& pt1, - IN const Point& pt2, - IN const Point& pt3, - IN const Point& pt4) - { - return AddBezier(pt1.X, pt1.Y, pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, - pt4.Y); - } - - Status AddBezier(IN INT x1, - IN INT y1, - IN INT x2, - IN INT y2, - IN INT x3, - IN INT y3, - IN INT x4, - IN INT y4) - { - return SetStatus(DllExports::GdipAddPathBezierI(nativePath, - x1, - y1, - x2, - y2, - x3, - y3, - x4, - y4)); - } - - Status AddBeziers(IN const Point* points, - IN INT count) - { - return SetStatus(DllExports::GdipAddPathBeziersI(nativePath, - points, - count)); - } - - // float version - Status AddCurve(IN const PointF* points, - IN INT count) - { - return SetStatus(DllExports::GdipAddPathCurve(nativePath, - points, - count)); - } - - Status AddCurve(IN const PointF* points, - IN INT count, - IN REAL tension) - { - return SetStatus(DllExports::GdipAddPathCurve2(nativePath, - points, - count, - tension)); - } - - Status AddCurve(IN const PointF* points, - IN INT count, - IN INT offset, - IN INT numberOfSegments, - IN REAL tension) - { - return SetStatus(DllExports::GdipAddPathCurve3(nativePath, - points, - count, - offset, - numberOfSegments, - tension)); - } - - // integer version - Status AddCurve(IN const Point* points, - IN INT count) - { - return SetStatus(DllExports::GdipAddPathCurveI(nativePath, - points, - count)); - } - - Status AddCurve(IN const Point* points, - IN INT count, - IN REAL tension) - { - return SetStatus(DllExports::GdipAddPathCurve2I(nativePath, - points, - count, - tension)); - } - - Status AddCurve(IN const Point* points, - IN INT count, - IN INT offset, - IN INT numberOfSegments, - IN REAL tension) - { - return SetStatus(DllExports::GdipAddPathCurve3I(nativePath, - points, - count, - offset, - numberOfSegments, - tension)); - } - - // float version - Status AddClosedCurve(IN const PointF* points, - IN INT count) - { - return SetStatus(DllExports::GdipAddPathClosedCurve(nativePath, - points, - count)); - } - - Status AddClosedCurve(IN const PointF* points, - IN INT count, - IN REAL tension) - { - return SetStatus(DllExports::GdipAddPathClosedCurve2(nativePath, - points, - count, - tension)); - } - - // integer version - Status AddClosedCurve(IN const Point* points, - IN INT count) - { - return SetStatus(DllExports::GdipAddPathClosedCurveI(nativePath, - points, - count)); - } - - - Status AddClosedCurve(IN const Point* points, - IN INT count, - IN REAL tension) - { - return SetStatus(DllExports::GdipAddPathClosedCurve2I(nativePath, - points, - count, - tension)); - } - - - /** - * Add closed shapes to the path object - */ - - // float version - Status AddRectangle(IN const RectF& rect) - { - return SetStatus(DllExports::GdipAddPathRectangle(nativePath, - rect.X, - rect.Y, - rect.Width, - rect.Height)); - } - - Status AddRectangles(IN const RectF* rects, - IN INT count) - { - return SetStatus(DllExports::GdipAddPathRectangles(nativePath, - rects, - count)); - } - - // integer version - Status AddRectangle(IN const Rect& rect) - { - return SetStatus(DllExports::GdipAddPathRectangleI(nativePath, - rect.X, - rect.Y, - rect.Width, - rect.Height)); - } - - Status AddRectangles(IN const Rect* rects, INT count) - { - return SetStatus(DllExports::GdipAddPathRectanglesI(nativePath, - rects, - count)); - } - - // float version - Status AddEllipse(IN const RectF& rect) - { - return AddEllipse(rect.X, rect.Y, rect.Width, rect.Height); - } - - Status AddEllipse(IN REAL x, - IN REAL y, - IN REAL width, - IN REAL height) - { - return SetStatus(DllExports::GdipAddPathEllipse(nativePath, - x, - y, - width, - height)); - } - - // integer version - Status AddEllipse(IN const Rect& rect) - { - return AddEllipse(rect.X, rect.Y, rect.Width, rect.Height); - } - - Status AddEllipse(IN INT x, - IN INT y, - IN INT width, - IN INT height) - { - return SetStatus(DllExports::GdipAddPathEllipseI(nativePath, - x, - y, - width, - height)); - } - - // float version - Status AddPie(IN const RectF& rect, - IN REAL startAngle, - IN REAL sweepAngle) - { - return AddPie(rect.X, rect.Y, rect.Width, rect.Height, startAngle, - sweepAngle); - } - - Status AddPie(IN REAL x, - IN REAL y, - IN REAL width, - IN REAL height, - IN REAL startAngle, - IN REAL sweepAngle) - { - return SetStatus(DllExports::GdipAddPathPie(nativePath, x, y, width, height, - startAngle, sweepAngle)); - } - - // integer version - Status AddPie(IN const Rect& rect, - IN REAL startAngle, - IN REAL sweepAngle) - { - return AddPie(rect.X, - rect.Y, - rect.Width, - rect.Height, - startAngle, - sweepAngle); - } - - Status AddPie(IN INT x, - IN INT y, - IN INT width, - IN INT height, - IN REAL startAngle, - IN REAL sweepAngle) - { - return SetStatus(DllExports::GdipAddPathPieI(nativePath, - x, - y, - width, - height, - startAngle, - sweepAngle)); - } - - // float version - Status AddPolygon(IN const PointF* points, - IN INT count) - { - return SetStatus(DllExports::GdipAddPathPolygon(nativePath, points, count)); - } - - // integer version - Status AddPolygon(IN const Point* points, - IN INT count) - { - return SetStatus(DllExports::GdipAddPathPolygonI(nativePath, points, count)); - } - - Status AddPath(IN const GraphicsPath* addingPath, - IN BOOL connect) - { - GpPath* nativePath2 = NULL; - if(addingPath) - nativePath2 = addingPath->nativePath; - - return SetStatus(DllExports::GdipAddPathPath(nativePath, nativePath2, connect)); - } - - // AddString point version - - Status AddString( - IN const WCHAR *string, - IN INT length, - IN const FontFamily *family, - IN INT style, - IN REAL emSize, // In world units - IN const PointF &origin, - IN const StringFormat *format - ) - { - RectF rect(origin.X, origin.Y, 0.0f, 0.0f); - - return SetStatus(DllExports::GdipAddPathString( - nativePath, - string, - length, - family ? family->nativeFamily : NULL, - style, - emSize, - &rect, - format ? format->nativeFormat : NULL - )); - } - - // AddString rectangle version - - Status AddString( - IN const WCHAR *string, - IN INT length, - IN const FontFamily *family, - IN INT style, - IN REAL emSize, // In world units - IN const RectF &layoutRect, - IN const StringFormat *format - ) - { - return SetStatus(DllExports::GdipAddPathString( - nativePath, - string, - length, - family ? family->nativeFamily : NULL, - style, - emSize, - &layoutRect, - format ? format->nativeFormat : NULL - )); - } - - Status AddString( - IN const WCHAR *string, - IN INT length, - IN const FontFamily *family, - IN INT style, - IN REAL emSize, // In world units - IN const Point &origin, - IN const StringFormat *format - ) - { - Rect rect(origin.X, origin.Y, 0, 0); - - return SetStatus(DllExports::GdipAddPathStringI( - nativePath, - string, - length, - family ? family->nativeFamily : NULL, - style, - emSize, - &rect, - format ? format->nativeFormat : NULL - )); - } - - // AddString rectangle version - - Status AddString( - IN const WCHAR *string, - IN INT length, - IN const FontFamily *family, - IN INT style, - IN REAL emSize, // In world units - IN const Rect &layoutRect, - IN const StringFormat *format - ) - { - return SetStatus(DllExports::GdipAddPathStringI( - nativePath, - string, - length, - family ? family->nativeFamily : NULL, - style, - emSize, - &layoutRect, - format ? format->nativeFormat : NULL - )); - } - - /** - * Transforms the path object - */ - Status Transform(IN const Matrix* matrix) - { - if(matrix) - return SetStatus(DllExports::GdipTransformPath(nativePath, matrix->nativeMatrix)); - else - return Ok; // No need to transform. - } - - /** - * Get the bounds of the path object with the given transform. - * This is not always the tightest bounds. - * - * Defined in GdiplusGraphics.h. - */ - Status GetBounds(OUT RectF* bounds, - IN const Matrix* matrix = NULL, - IN const Pen* pen = NULL) const; - - // integer version (defined in GdiplusGraphics.h) - Status GetBounds(OUT Rect* bounds, - IN const Matrix* matrix = NULL, - IN const Pen* pen = NULL) const; - - /** - * Flatten the path object - * Once this is called, the resultant path is made of line segments and - * the original path information is lost. - * When matrix = NULL, the identity matrix is assumed. - */ - Status Flatten(IN const Matrix* matrix = NULL, - IN REAL flatness = FlatnessDefault) - { - GpMatrix* nativeMatrix = NULL; - if(matrix) - { - nativeMatrix = matrix->nativeMatrix; - } - - return SetStatus(DllExports::GdipFlattenPath( - nativePath, - nativeMatrix, - flatness - )); - } - -#ifdef DCR_USE_NEW_202903 - - Status Widen( - IN const Pen* pen, - IN const Matrix* matrix = NULL, - IN REAL flatness = FlatnessDefault - ) - { - GpMatrix* nativeMatrix = NULL; - if(matrix) - nativeMatrix = matrix->nativeMatrix; - - return SetStatus(DllExports::GdipWidenPath( - nativePath, - pen->nativePen, - nativeMatrix, - flatness - )); - } - -#else - - /** - * Widen the path object - * When removeSelfIntersects is TRUE, this returns the widened path - * without self intersections. - * When it is FALSE, it returns the widened path with selfintersections. - * The latter is faster and is usually safficient for filling. - */ - Status Widen(IN const Pen* pen, - IN const Matrix* matrix = NULL, - IN BOOL removeSelfIntersects = TRUE) - { - GpMatrix* nativeMatrix = NULL; - if(matrix) - nativeMatrix = matrix->nativeMatrix; - - return SetStatus(DllExports::GdipWidenPathWithMinimumResolutions(nativePath, pen->nativePen, - 0, 0, nativeMatrix, removeSelfIntersects)); - } - - /** - * Widen the path object - * This is equivalent to Widen() method except that - * The widths of the widened path are larger than the given - * minimum resolutions in x and y coordinates after the transform. - * This is usefull when widening a path with the limited device resolutions. - */ - - Status Widen(IN const Pen* pen, - IN REAL minXres, - IN REAL minYres, - IN const Matrix* matrix = NULL, - IN BOOL removeSelfIntersects = TRUE) - { - GpMatrix* nativeMatrix = NULL; - if(matrix) - nativeMatrix = matrix->nativeMatrix; - - return SetStatus(DllExports::GdipWidenPathWithMinimumResolutions(nativePath, pen->nativePen, - minXres, minYres, nativeMatrix, removeSelfIntersects)); - } - -#endif // DCR_USE_NEW_202903 - - Status Outline( - IN const Matrix *matrix = NULL, - IN REAL flatness = FlatnessDefault - ) - { - GpMatrix* nativeMatrix = NULL; - if(matrix) - { - nativeMatrix = matrix->nativeMatrix; - } - - return SetStatus(DllExports::GdipWindingModeOutline( - nativePath, nativeMatrix, flatness - )); - } - - /** - * Warp the path object - * Once this is called, the resultant path is made of line segments and - * the original path information is lost. - * When matrix = NULL, the identity matrix is assumed. - */ - Status Warp(IN const PointF* destPoints, - IN INT count, - IN const RectF& srcRect, - IN const Matrix* matrix = NULL, - IN WarpMode warpMode = WarpModePerspective, - IN REAL flatness = FlatnessDefault) - { - GpMatrix* nativeMatrix = NULL; - if(matrix) - nativeMatrix = matrix->nativeMatrix; - - return SetStatus(DllExports::GdipWarpPath( - nativePath, - nativeMatrix, - destPoints, - count, - srcRect.X, - srcRect.Y, - srcRect.Width, - srcRect.Height, - warpMode, - flatness)); - } - - /** - * Return the number of points in the current path - */ - INT GetPointCount() const - { - INT count = 0; - - SetStatus(DllExports::GdipGetPointCount(nativePath, &count)); - - return count; - } - - /** - * Return the path point type information - */ - Status GetPathTypes(OUT BYTE* types, - IN INT count) const - { - return SetStatus(DllExports::GdipGetPathTypes(nativePath, types, count)); - } - - /** - * Return the path point coordinate information - * @notes Should there be PathData that contains types[] and points[] - * for get & set purposes. - */ - Status GetPathPoints(OUT PointF* points, - IN INT count) const - { - return SetStatus(DllExports::GdipGetPathPoints(nativePath, points, count)); - } - - // integer version - Status GetPathPoints(OUT Point* points, - IN INT count) const - { - return SetStatus(DllExports::GdipGetPathPointsI(nativePath, points, count)); - } - - Status GetLastStatus() const - { - Status lastStatus = lastResult; - lastResult = Ok; - - return lastStatus; - } - - /** - * Hit testing operations - * - * inline implementation is in gdiplusgraphics.h. - */ - - BOOL IsVisible(IN const PointF& point, - IN const Graphics* g = NULL) const - { - return IsVisible(point.X, point.Y, g); - } - - BOOL IsVisible(IN REAL x, - IN REAL y, - IN const Graphics* g = NULL) const; - - BOOL IsVisible(IN const Point& point, - IN const Graphics* g = NULL) const - { - return IsVisible(point.X, point.Y, g); - } - - BOOL IsVisible(IN INT x, - IN INT y, - IN const Graphics* g = NULL) const; - - BOOL IsOutlineVisible(IN const PointF& point, - IN const Pen* pen, - IN const Graphics* g = NULL) const - { - return IsOutlineVisible(point.X, point.Y, pen, g); - } - - BOOL IsOutlineVisible(IN REAL x, - IN REAL y, - IN const Pen* pen, - IN const Graphics* g = NULL) const; - - BOOL IsOutlineVisible(IN const Point& point, - IN const Pen* pen, - IN const Graphics* g = NULL) const - { - return IsOutlineVisible(point.X, point.Y, pen, g); - } - - BOOL IsOutlineVisible(IN INT x, - IN INT y, - IN const Pen* pen, - IN const Graphics* g = NULL) const; - -protected: - - GraphicsPath(const GraphicsPath& path) - { - GpPath *clonepath = NULL; - SetStatus(DllExports::GdipClonePath(path.nativePath, &clonepath)); - SetNativePath(clonepath); - } - -#ifdef DCR_USE_NEW_250932 - -private: - GraphicsPath& operator=(const GraphicsPath &); -protected: - -#else - - GraphicsPath& operator=(const GraphicsPath& path) - { - path; - SetStatus(NotImplemented); - return *this; - } - -#endif - - GraphicsPath(GpPath* nativePath) - { - lastResult = Ok; - SetNativePath(nativePath); - } - - VOID SetNativePath(GpPath *nativePath) - { - this->nativePath = nativePath; - } - - Status SetStatus(Status status) const - { - if (status != Ok) - return (lastResult = status); - else - return status; - } - -protected: - GpPath* nativePath; - mutable Status lastResult; -}; - - -//-------------------------------------------------------------------------- -// GraphisPathIterator class -//-------------------------------------------------------------------------- - -class GraphicsPathIterator : public GdiplusBase -{ -public: - - GraphicsPathIterator(IN const GraphicsPath* path) - { - GpPath* nativePath = NULL; - if(path) - nativePath = path->nativePath; - - GpPathIterator *iter = NULL; - lastResult = DllExports::GdipCreatePathIter(&iter, nativePath); - SetNativeIterator(iter); - } - - ~GraphicsPathIterator() - { - DllExports::GdipDeletePathIter(nativeIterator); - } - - - INT NextSubpath(OUT INT* startIndex, - OUT INT* endIndex, - OUT BOOL* isClosed) - { - INT resultCount; - - SetStatus(DllExports::GdipPathIterNextSubpath(nativeIterator, - &resultCount, startIndex, endIndex, isClosed)); - - return resultCount; - } - - - INT NextSubpath(IN const GraphicsPath* path, - OUT BOOL* isClosed) - { - GpPath* nativePath = NULL; - - INT resultCount; - - if(path) - nativePath= path->nativePath; - - SetStatus(DllExports::GdipPathIterNextSubpathPath(nativeIterator, - &resultCount, nativePath, isClosed)); - - return resultCount; - } - - INT NextPathType(OUT BYTE* pathType, - OUT INT* startIndex, - OUT INT* endIndex) - { - INT resultCount; - - SetStatus(DllExports::GdipPathIterNextPathType(nativeIterator, - &resultCount, pathType, startIndex, endIndex)); - - return resultCount; - } - - INT NextMarker(OUT INT* startIndex, - OUT INT* endIndex) - { - INT resultCount; - - SetStatus(DllExports::GdipPathIterNextMarker(nativeIterator, - &resultCount, startIndex, endIndex)); - - return resultCount; - } - - - INT NextMarker(IN const GraphicsPath* path) - { - GpPath* nativePath = NULL; - - INT resultCount; - - if(path) - nativePath= path->nativePath; - - SetStatus(DllExports::GdipPathIterNextMarkerPath(nativeIterator, - &resultCount, nativePath)); - - return resultCount; - } - - INT GetCount() const - { - INT resultCount; - - SetStatus(DllExports::GdipPathIterGetCount(nativeIterator, &resultCount)); - - return resultCount; - } - - INT GetSubpathCount() const - { - INT resultCount; - - SetStatus(DllExports::GdipPathIterGetSubpathCount(nativeIterator, &resultCount)); - - return resultCount; - } - - BOOL HasCurve() const - { - BOOL hasCurve; - - SetStatus(DllExports::GdipPathIterHasCurve(nativeIterator, &hasCurve)); - - return hasCurve; - } - - VOID Rewind() - { - SetStatus(DllExports::GdipPathIterRewind(nativeIterator)); - } - - INT Enumerate(OUT PointF *points, - OUT BYTE *types, - IN INT count) - { - INT resultCount; - - SetStatus(DllExports::GdipPathIterEnumerate(nativeIterator, - &resultCount, points, types, count)); - - return resultCount; - } - - INT CopyData(OUT PointF* points, - OUT BYTE* types, - IN INT startIndex, - IN INT endIndex) - { - INT resultCount; - - SetStatus(DllExports::GdipPathIterCopyData(nativeIterator, - &resultCount, points, types, startIndex, endIndex)); - - return resultCount; - } - - Status GetLastStatus() const - { - Status lastStatus = lastResult; - lastResult = Ok; - - return lastStatus; - } - -#ifdef DCR_USE_NEW_250932 - -private: - GraphicsPathIterator(const GraphicsPathIterator &); - GraphicsPathIterator& operator=(const GraphicsPathIterator &); - -#endif - -protected: - VOID SetNativeIterator(GpPathIterator *nativeIterator) - { - this->nativeIterator = nativeIterator; - } - - Status SetStatus(Status status) const - { - if (status != Ok) - return (lastResult = status); - else - return status; - } - -protected: - GpPathIterator* nativeIterator; - mutable Status lastResult; -}; - - -//-------------------------------------------------------------------------- -// Represent polygon gradient brush object -//-------------------------------------------------------------------------- - -class PathGradientBrush : public Brush -{ -public: - friend class Pen; - - PathGradientBrush( - IN const PointF* points, - IN INT count, - IN WrapMode wrapMode = WrapModeClamp) - { - GpPathGradient *brush = NULL; - - lastResult = DllExports::GdipCreatePathGradient( - points, count, - wrapMode, &brush); - SetNativeBrush(brush); - } - - PathGradientBrush( - IN const Point* points, - IN INT count, - IN WrapMode wrapMode = WrapModeClamp) - { - GpPathGradient *brush = NULL; - - lastResult = DllExports::GdipCreatePathGradientI( - points, count, - wrapMode, &brush); - - SetNativeBrush(brush); - } - - PathGradientBrush( - IN const GraphicsPath* path - ) - { - GpPathGradient *brush = NULL; - - lastResult = DllExports::GdipCreatePathGradientFromPath( - path->nativePath, &brush); - SetNativeBrush(brush); - } - - // Get/set colors - - Status GetCenterColor(OUT Color* color) const - { - ARGB argb; - - if (color == NULL) - { - return SetStatus(InvalidParameter); - } - - SetStatus(DllExports::GdipGetPathGradientCenterColor( - (GpPathGradient*) nativeBrush, &argb)); - - color->SetValue(argb); - - return lastResult; - } - - Status SetCenterColor(IN const Color& color) - { - SetStatus(DllExports::GdipSetPathGradientCenterColor( - (GpPathGradient*) nativeBrush, - color.GetValue())); - - return lastResult; - } - - INT GetPointCount() const - { - INT count; - - SetStatus(DllExports::GdipGetPathGradientPointCount( - (GpPathGradient*) nativeBrush, &count)); - - return count; - } - - INT GetSurroundColorCount() const - { - INT count; - - SetStatus(DllExports::GdipGetPathGradientSurroundColorCount( - (GpPathGradient*) nativeBrush, &count)); - - return count; - } - - Status GetSurroundColors(OUT Color* colors, - IN OUT INT* count) const - { - if(colors == NULL || count == NULL) - { - return SetStatus(InvalidParameter); - } - - INT count1; - - SetStatus(DllExports::GdipGetPathGradientSurroundColorCount( - (GpPathGradient*) nativeBrush, &count1)); - - if(lastResult != Ok) - return lastResult; - - if((*count < count1) || (count1 <= 0)) - return SetStatus(InsufficientBuffer); - - ARGB* argbs = (ARGB*) new ARGB[count1]; - if(argbs == NULL) - return SetStatus(OutOfMemory); - - SetStatus(DllExports::GdipGetPathGradientSurroundColorsWithCount( - (GpPathGradient*)nativeBrush, argbs, &count1)); - - if(lastResult == Ok) - { - for(INT i = 0; i < count1; i++) - { - colors[i].SetValue(argbs[i]); - } - *count = count1; - } - - delete [] argbs; - return lastResult; - } - - Status SetSurroundColors(IN const Color* colors, - IN OUT INT* count) - { - if(colors == NULL || count == NULL) - { - return SetStatus(InvalidParameter); - } - - INT count1 = GetPointCount(); - - if((*count > count1) || (count1 <= 0)) - return SetStatus(InvalidParameter); - - count1 = *count; - - ARGB* argbs = (ARGB*) new ARGB[count1]; - if(argbs == NULL) - return SetStatus(OutOfMemory); - - for(INT i = 0; i < count1; i++) - { - argbs[i] = colors[i].GetValue(); - } - - SetStatus(DllExports::GdipSetPathGradientSurroundColorsWithCount( - (GpPathGradient*)nativeBrush, argbs, &count1)); - - if(lastResult == Ok) - *count = count1; - - delete [] argbs; - - return lastResult; - } - - Status GetGraphicsPath(OUT GraphicsPath* path) const - { - if(path == NULL) - return SetStatus(InvalidParameter); - - return SetStatus(DllExports::GdipGetPathGradientPath( - (GpPathGradient*)nativeBrush, path->nativePath)); - } - - Status SetGraphicsPath(IN const GraphicsPath* path) - { - if(path == NULL) - return SetStatus(InvalidParameter); - - return SetStatus(DllExports::GdipSetPathGradientPath( - (GpPathGradient*)nativeBrush, path->nativePath)); - } - - Status GetCenterPoint(OUT PointF* point) const - { - return SetStatus(DllExports::GdipGetPathGradientCenterPoint( - (GpPathGradient*)nativeBrush, - point)); - } - - - Status GetCenterPoint(OUT Point* point) const - { - return SetStatus(DllExports::GdipGetPathGradientCenterPointI( - (GpPathGradient*)nativeBrush, - point)); - } - - Status SetCenterPoint(IN const PointF& point) - { - return SetStatus(DllExports::GdipSetPathGradientCenterPoint( - (GpPathGradient*)nativeBrush, - &point)); - } - - Status SetCenterPoint(IN const Point& point) - { - return SetStatus(DllExports::GdipSetPathGradientCenterPointI( - (GpPathGradient*)nativeBrush, - &point)); - } - - Status GetRectangle(OUT RectF* rect) const - { - return SetStatus(DllExports::GdipGetPathGradientRect( - (GpPathGradient*)nativeBrush, rect)); - } - - Status GetRectangle(OUT Rect* rect) const - { - return SetStatus(DllExports::GdipGetPathGradientRectI( - (GpPathGradient*)nativeBrush, rect)); - } - - // Gamma correction. - - Status SetGammaCorrection(IN BOOL useGammaCorrection) - { - return SetStatus(DllExports::GdipSetPathGradientGammaCorrection( - (GpPathGradient*)nativeBrush, useGammaCorrection)); - } - - BOOL GetGammaCorrection() const - { - BOOL useGammaCorrection; - - SetStatus(DllExports::GdipGetPathGradientGammaCorrection( - (GpPathGradient*)nativeBrush, &useGammaCorrection)); - - return useGammaCorrection; - } - - INT GetBlendCount() const - { - INT count = 0; - - SetStatus(DllExports::GdipGetPathGradientBlendCount( - (GpPathGradient*) nativeBrush, &count)); - - return count; - } - - Status GetBlend(OUT REAL* blendFactors, - OUT REAL* blendPositions, - IN INT count) const - { - return SetStatus(DllExports::GdipGetPathGradientBlend( - (GpPathGradient*)nativeBrush, - blendFactors, blendPositions, count)); - } - - Status SetBlend(IN const REAL* blendFactors, - IN const REAL* blendPositions, - IN INT count) - { - return SetStatus(DllExports::GdipSetPathGradientBlend( - (GpPathGradient*)nativeBrush, - blendFactors, blendPositions, count)); - } - - INT GetInterpolationColorCount() const - { - INT count = 0; - - SetStatus(DllExports::GdipGetPathGradientPresetBlendCount( - (GpPathGradient*) nativeBrush, &count)); - - return count; - } - - Status SetInterpolationColors(IN const Color* presetColors, - IN const REAL* blendPositions, - IN INT count) - { - if ((count <= 0) || !presetColors) - { - return SetStatus(InvalidParameter); - } - - ARGB* argbs = (ARGB*) new ARGB[count]; - if(argbs) - { - for(INT i = 0; i < count; i++) - { - argbs[i] = presetColors[i].GetValue(); - } - - Status status = SetStatus(DllExports::GdipSetPathGradientPresetBlend( - (GpPathGradient*) nativeBrush, - argbs, - blendPositions, - count)); - delete[] argbs; - return status; - } - else - { - return SetStatus(OutOfMemory); - } - } - - Status GetInterpolationColors(OUT Color* presetColors, - OUT REAL* blendPositions, - IN INT count) const - { - if ((count <= 0) || !presetColors) - { - return SetStatus(InvalidParameter); - } - - ARGB* argbs = (ARGB*) new ARGB[count]; - - if (!argbs) - { - return SetStatus(OutOfMemory); - } - - GpStatus status = SetStatus(DllExports::GdipGetPathGradientPresetBlend( - (GpPathGradient*)nativeBrush, - argbs, - blendPositions, - count)); - - for(INT i = 0; i < count; i++) - { - presetColors[i] = Color(argbs[i]); - } - delete [] argbs; - - return status; - } - - Status SetBlendBellShape(IN REAL focus, - IN REAL scale = 1.0) - { - return SetStatus(DllExports::GdipSetPathGradientSigmaBlend( - (GpPathGradient*)nativeBrush, focus, scale)); - } - - #ifdef DCR_USE_NEW_145135 - Status SetBlendTriangularShape( - IN REAL focus, - IN REAL scale = 1.0 - ) - #else - Status SetBlendTrianglarShape(IN REAL focus, - IN REAL scale = 1.0) - #endif - { - return SetStatus(DllExports::GdipSetPathGradientLinearBlend( - (GpPathGradient*)nativeBrush, focus, scale)); - } - - /** - * Get/set brush transform - */ - Status GetTransform(OUT Matrix *matrix) const - { - return SetStatus(DllExports::GdipGetPathGradientTransform( - (GpPathGradient*) nativeBrush, matrix->nativeMatrix)); - } - - Status SetTransform(IN const Matrix* matrix) - { - return SetStatus(DllExports::GdipSetPathGradientTransform( - (GpPathGradient*) nativeBrush, matrix->nativeMatrix)); - } - - Status ResetTransform() - { - return SetStatus(DllExports::GdipResetPathGradientTransform((GpPathGradient*)nativeBrush)); - } - - Status MultiplyTransform(IN const Matrix* matrix, - IN MatrixOrder order = MatrixOrderPrepend) - { - return SetStatus(DllExports::GdipMultiplyPathGradientTransform((GpPathGradient*)nativeBrush, - matrix->nativeMatrix, - order)); - } - - Status TranslateTransform(IN REAL dx, - IN REAL dy, - IN MatrixOrder order = MatrixOrderPrepend) - { - return SetStatus(DllExports::GdipTranslatePathGradientTransform((GpPathGradient*)nativeBrush, - dx, dy, order)); - } - - Status ScaleTransform(IN REAL sx, - IN REAL sy, - IN MatrixOrder order = MatrixOrderPrepend) - { - return SetStatus(DllExports::GdipScalePathGradientTransform((GpPathGradient*)nativeBrush, - sx, sy, order)); - } - - Status RotateTransform(IN REAL angle, - IN MatrixOrder order = MatrixOrderPrepend) - { - return SetStatus(DllExports::GdipRotatePathGradientTransform((GpPathGradient*)nativeBrush, - angle, order)); - } - - /** - * Get/set brush focus scales - */ - Status GetFocusScales(OUT REAL* xScale, - OUT REAL* yScale) const - { - return SetStatus(DllExports::GdipGetPathGradientFocusScales( - (GpPathGradient*) nativeBrush, xScale, yScale)); - } - - Status SetFocusScales(IN REAL xScale, - IN REAL yScale) - { - return SetStatus(DllExports::GdipSetPathGradientFocusScales( - (GpPathGradient*) nativeBrush, xScale, yScale)); - } - - /** - * Get/set brush wrapping mode - */ - WrapMode GetWrapMode() const - { - WrapMode wrapMode; - - SetStatus(DllExports::GdipGetPathGradientWrapMode( - (GpPathGradient*) nativeBrush, &wrapMode)); - - return wrapMode; - } - - Status SetWrapMode(IN WrapMode wrapMode) - { - return SetStatus(DllExports::GdipSetPathGradientWrapMode( - (GpPathGradient*) nativeBrush, wrapMode)); - } - -#ifdef DCR_USE_NEW_250932 - -private: - PathGradientBrush(const PathGradientBrush &); - PathGradientBrush& operator=(const PathGradientBrush &); - -#endif - -protected: - - PathGradientBrush() - { - } -}; - - -#endif // !_GRAPHICSPATH_HPP diff --git a/src/includes/GdiPlusPen.h b/src/includes/GdiPlusPen.h deleted file mode 100644 index c5776ab6..00000000 --- a/src/includes/GdiPlusPen.h +++ /dev/null @@ -1,519 +0,0 @@ -/**************************************************************************\ -* -* Copyright (c) 1998-2000, Microsoft Corp. All Rights Reserved. -* -* Module Name: -* -* GdiplusPen.h -* -* Abstract: -* -* Pen API related declarations -* -\**************************************************************************/ -#ifndef _GDIPLUSPEN_H -#define _GDIPLUSPEN_H - -//-------------------------------------------------------------------------- -// class for various pen types -//-------------------------------------------------------------------------- - -class Pen : public GdiplusBase -{ -public: - friend class GraphicsPath; - friend class Graphics; - - // abstract Clone() can't be implemented here because it can't - // new an object with pure virtual functions - - // Constructors - - Pen(IN const Color& color, - IN REAL width = 1.0f) - { - Unit unit = UnitWorld; - nativePen = NULL; - lastResult = DllExports::GdipCreatePen1(color.GetValue(), - width, unit, &nativePen); - } - - Pen(IN const Brush* brush, - IN REAL width = 1.0f) - { - Unit unit = UnitWorld; - nativePen = NULL; - lastResult = DllExports::GdipCreatePen2(brush->nativeBrush, - width, unit, &nativePen); - } - - ~Pen() - { - DllExports::GdipDeletePen(nativePen); - } - - Pen* Clone() const - { - GpPen *clonePen = NULL; - - lastResult = DllExports::GdipClonePen(nativePen, &clonePen); - - return new Pen(clonePen, lastResult); - } - - Status SetWidth(IN REAL width) - { - return SetStatus(DllExports::GdipSetPenWidth(nativePen, width)); - } - - REAL GetWidth() const - { - REAL width; - - SetStatus(DllExports::GdipGetPenWidth(nativePen, &width)); - - return width; - } - - // Set/get line caps: start, end, and dash - - // Line cap and join APIs by using LineCap and LineJoin enums. - - #ifdef DCR_USE_NEW_197819 - Status SetLineCap(IN LineCap startCap, - IN LineCap endCap, - IN DashCap dashCap) - { - return SetStatus(DllExports::GdipSetPenLineCap197819(nativePen, - startCap, endCap, dashCap)); - } - #else - Status SetLineCap(IN LineCap startCap, - IN LineCap endCap, - IN LineCap dashCap) - { - return SetStatus(DllExports::GdipSetPenLineCap(nativePen, - startCap, endCap, dashCap)); - } - #endif // DCR_USE_NEW_197819 - - Status SetStartCap(IN LineCap startCap) - { - return SetStatus(DllExports::GdipSetPenStartCap(nativePen, startCap)); - } - - Status SetEndCap(IN LineCap endCap) - { - return SetStatus(DllExports::GdipSetPenEndCap(nativePen, endCap)); - } - - #ifdef DCR_USE_NEW_197819 - Status SetDashCap(IN DashCap dashCap) - { - return SetStatus(DllExports::GdipSetPenDashCap197819(nativePen, - dashCap)); - } - #else - Status SetDashCap(IN LineCap dashCap) - { - return SetStatus(DllExports::GdipSetPenDashCap(nativePen, dashCap)); - } - #endif // DCR_USE_NEW_197819 - - LineCap GetStartCap() const - { - LineCap startCap; - - SetStatus(DllExports::GdipGetPenStartCap(nativePen, &startCap)); - - return startCap; - } - - LineCap GetEndCap() const - { - LineCap endCap; - - SetStatus(DllExports::GdipGetPenEndCap(nativePen, &endCap)); - - return endCap; - } - - #ifdef DCR_USE_NEW_197819 - DashCap GetDashCap() const - { - DashCap dashCap; - - SetStatus(DllExports::GdipGetPenDashCap197819(nativePen, - &dashCap)); - - return dashCap; - } - #else - LineCap GetDashCap() const - { - LineCap dashCap; - - SetStatus(DllExports::GdipGetPenDashCap(nativePen, &dashCap)); - - return dashCap; - } - #endif // DCR_USE_NEW_197819 - - - // Set/get line join - - Status SetLineJoin(IN LineJoin lineJoin) - { - return SetStatus(DllExports::GdipSetPenLineJoin(nativePen, lineJoin)); - } - - LineJoin GetLineJoin() const - { - LineJoin lineJoin; - - SetStatus(DllExports::GdipGetPenLineJoin(nativePen, &lineJoin)); - - return lineJoin; - } - - Status SetCustomStartCap(IN const CustomLineCap* customCap) - { - GpCustomLineCap* nativeCap = NULL; - if(customCap) - nativeCap = customCap->nativeCap; - - return SetStatus(DllExports::GdipSetPenCustomStartCap(nativePen, nativeCap)); - } - - Status GetCustomStartCap(OUT CustomLineCap* customCap) const - { - if(!customCap) - return SetStatus(InvalidParameter); - - return SetStatus(DllExports::GdipGetPenCustomStartCap(nativePen, &(customCap->nativeCap))); - } - - Status SetCustomEndCap(IN const CustomLineCap* customCap) - { - GpCustomLineCap* nativeCap = NULL; - if(customCap) - nativeCap = customCap->nativeCap; - - return SetStatus(DllExports::GdipSetPenCustomEndCap(nativePen, nativeCap)); - } - - Status GetCustomEndCap(OUT CustomLineCap* customCap) const - { - if(!customCap) - return SetStatus(InvalidParameter); - - return SetStatus(DllExports::GdipGetPenCustomEndCap(nativePen, &(customCap->nativeCap))); - } - - Status SetMiterLimit(IN REAL miterLimit) - { - return SetStatus(DllExports::GdipSetPenMiterLimit(nativePen, miterLimit)); - } - - REAL GetMiterLimit() const - { - REAL miterLimit; - - SetStatus(DllExports::GdipGetPenMiterLimit(nativePen, &miterLimit)); - - return miterLimit; - } - - // Set/get pen mode - Status SetAlignment(IN PenAlignment penAlignment) - { - return SetStatus(DllExports::GdipSetPenMode(nativePen, penAlignment)); - } - - PenAlignment GetAlignment() const - { - PenAlignment penAlignment; - - SetStatus(DllExports::GdipGetPenMode(nativePen, &penAlignment)); - - return penAlignment; - } - - // Set/get pen transform - Status SetTransform(IN const Matrix* matrix) - { - return SetStatus(DllExports::GdipSetPenTransform(nativePen, - matrix->nativeMatrix)); - } - - Status GetTransform(OUT Matrix* matrix) const - { - return SetStatus(DllExports::GdipGetPenTransform(nativePen, matrix->nativeMatrix)); - } - - Status ResetTransform() - { - return SetStatus(DllExports::GdipResetPenTransform(nativePen)); - } - - Status MultiplyTransform(IN const Matrix* matrix, - IN MatrixOrder order = MatrixOrderPrepend) - { - return SetStatus(DllExports::GdipMultiplyPenTransform(nativePen, - matrix->nativeMatrix, - order)); - } - - Status TranslateTransform(IN REAL dx, - IN REAL dy, - IN MatrixOrder order = MatrixOrderPrepend) - { - return SetStatus(DllExports::GdipTranslatePenTransform(nativePen, - dx, dy, order)); - } - - Status ScaleTransform(IN REAL sx, - IN REAL sy, - IN MatrixOrder order = MatrixOrderPrepend) - { - return SetStatus(DllExports::GdipScalePenTransform(nativePen, - sx, sy, order)); - } - - Status RotateTransform(IN REAL angle, - IN MatrixOrder order = MatrixOrderPrepend) - { - return SetStatus(DllExports::GdipRotatePenTransform(nativePen, - angle, order)); - } - - PenType GetPenType() const - { - PenType type; - SetStatus(DllExports::GdipGetPenFillType(nativePen, &type)); - - return type; - } - - Status SetColor(IN const Color& color) - { - return SetStatus(DllExports::GdipSetPenColor(nativePen, - color.GetValue())); - } - - Status SetBrush(IN const Brush* brush) - { - return SetStatus(DllExports::GdipSetPenBrushFill(nativePen, - brush->nativeBrush)); - } - - Status GetColor(OUT Color* color) const - { - if (color == NULL) - { - return SetStatus(InvalidParameter); - } - - PenType type = GetPenType(); - - if (type != PenTypeSolidColor) - { - return WrongState; - } - - ARGB argb; - - SetStatus(DllExports::GdipGetPenColor(nativePen, - &argb)); - if (lastResult == Ok) - { - color->SetValue(argb); - } - - return lastResult; - } - - Brush* GetBrush() const - { - PenType type = GetPenType(); - - Brush* brush = NULL; - - switch(type) - { - case PenTypeSolidColor: - brush = new SolidBrush(); - break; - - case PenTypeHatchFill: - brush = new HatchBrush(); - break; - - case PenTypeTextureFill: - brush = new TextureBrush(); - break; - - case PenTypePathGradient: - brush = new Brush(); - break; - - case PenTypeLinearGradient: - brush = new LinearGradientBrush(); - break; - - default: - break; - } - - if(brush) - { - GpBrush* nativeBrush; - - SetStatus(DllExports::GdipGetPenBrushFill(nativePen, &nativeBrush)); - brush->SetNativeBrush(nativeBrush); - } - - return brush; - } - - DashStyle GetDashStyle() const - { - DashStyle dashStyle; - - SetStatus(DllExports::GdipGetPenDashStyle(nativePen, &dashStyle)); - - return dashStyle; - } - - Status SetDashStyle(IN DashStyle dashStyle) - { - return SetStatus(DllExports::GdipSetPenDashStyle(nativePen, dashStyle)); - } - - REAL GetDashOffset() const - { - REAL dashOffset; - - SetStatus(DllExports::GdipGetPenDashOffset(nativePen, &dashOffset)); - - return dashOffset; - } - - Status SetDashOffset(IN REAL dashOffset) - { - return SetStatus(DllExports::GdipSetPenDashOffset(nativePen, dashOffset)); - } - - Status SetDashPattern(IN const REAL* dashArray, IN INT count) - { - return SetStatus(DllExports::GdipSetPenDashArray(nativePen, dashArray, - count)); - } - - INT GetDashPatternCount() const - { - INT count = 0; - - SetStatus(DllExports::GdipGetPenDashCount(nativePen, &count)); - - return count; - } - - Status GetDashPattern(OUT REAL* dashArray, - IN INT count) const - { - if (dashArray == NULL || count <= 0) - return SetStatus(InvalidParameter); - - return SetStatus(DllExports::GdipGetPenDashArray(nativePen, - dashArray, - count)); - } - - Status SetCompoundArray(IN const REAL* compoundArray, - IN INT count) - { - return SetStatus(DllExports::GdipSetPenCompoundArray(nativePen, compoundArray, - count)); - } - - INT GetCompoundArrayCount() const - { - INT count = 0; - - SetStatus(DllExports::GdipGetPenCompoundCount(nativePen, &count)); - - return count; - } - - Status GetCompoundArray(OUT REAL* compoundArray, - IN INT count) const - { - if (compoundArray == NULL || count <= 0) - return SetStatus(InvalidParameter); - - return SetStatus(DllExports::GdipGetPenCompoundArray(nativePen, - compoundArray, - count)); - } - - Status GetLastStatus() const - { - Status lastStatus = lastResult; - lastResult = Ok; - - return lastStatus; - } - -protected: - -#ifdef DCR_USE_NEW_250932 - -private: - Pen(const Pen &); - Pen& operator=(const Pen &); -protected: - -#else - - Pen(const Pen& pen) - { - pen; - SetStatus(NotImplemented); - SetNativePen(NULL); - } - - Pen& operator=(const Pen& pen) - { - pen; - SetStatus(NotImplemented); - return *this; - } - -#endif - - Pen(GpPen* nativePen, Status status) - { - lastResult = status; - SetNativePen(nativePen); - } - - VOID SetNativePen(GpPen* nativePen) - { - this->nativePen = nativePen; - } - - Status SetStatus(Status status) const - { - if (status != Ok) - return (lastResult = status); - else - return status; - } - -protected: - GpPen* nativePen; - mutable Status lastResult; -}; - -#endif diff --git a/src/includes/GdiPlusPixelFormats.h b/src/includes/GdiPlusPixelFormats.h deleted file mode 100644 index 68b70840..00000000 --- a/src/includes/GdiPlusPixelFormats.h +++ /dev/null @@ -1,201 +0,0 @@ -/**************************************************************************\ -* -* Copyright (c) 1998-2000, Microsoft Corp. All Rights Reserved. -* -* Module Name: -* -* Gdiplus pixel formats -* -* Abstract: -* -* Definitions for color types, palettes, pixel format IDs. -* -\**************************************************************************/ - -#ifndef _GDIPLUSPIXELFORMATS_H -#define _GDIPLUSPIXELFORMATS_H - -/* - * 32-bit and 64-bit ARGB pixel value - */ - -typedef DWORD ARGB; -typedef DWORDLONG ARGB64; - -#define ALPHA_SHIFT 24 -#define RED_SHIFT 16 -#define GREEN_SHIFT 8 -#define BLUE_SHIFT 0 -#define ALPHA_MASK ((ARGB) 0xff << ALPHA_SHIFT) - -/* - * In-memory pixel data formats: - * bits 0-7 = format index - * bits 8-15 = pixel size (in bits) - * bits 16-23 = flags - * bits 24-31 = reserved - */ - -#ifndef DCR_USE_NEW_105760 - -enum PixelFormat -{ - PixelFormatIndexed = 0x00010000, // Indexes into a palette - PixelFormatGDI = 0x00020000, // Is a GDI-supported format - PixelFormatAlpha = 0x00040000, // Has an alpha component - PixelFormatPAlpha = 0x00080000, // Uses pre-multiplied alpha - PixelFormatExtended = 0x00100000, // Uses extended color (16 bits per channel) - PixelFormatCanonical = 0x00200000, // ? - - PixelFormatUndefined = 0, - PixelFormatDontCare = 0, - - PixelFormat1bppIndexed = 1 | ( 1 << 8) | PixelFormatIndexed - | PixelFormatGDI, - PixelFormat4bppIndexed = 2 | ( 4 << 8) | PixelFormatIndexed - | PixelFormatGDI, - PixelFormat8bppIndexed = 3 | ( 8 << 8) | PixelFormatIndexed - | PixelFormatGDI, - PixelFormat16bppGrayScale = 4 | (16 << 8) | PixelFormatExtended, - PixelFormat16bppRGB555 = 5 | (16 << 8) | PixelFormatGDI, - PixelFormat16bppRGB565 = 6 | (16 << 8) | PixelFormatGDI, - PixelFormat16bppARGB1555 = 7 | (16 << 8) | PixelFormatAlpha - | PixelFormatGDI, - PixelFormat24bppRGB = 8 | (24 << 8) | PixelFormatGDI, - PixelFormat32bppRGB = 9 | (32 << 8) | PixelFormatGDI, - PixelFormat32bppARGB = 10 | (32 << 8) | PixelFormatAlpha - | PixelFormatGDI - | PixelFormatCanonical, - PixelFormat32bppPARGB = 11 | (32 << 8) | PixelFormatAlpha - | PixelFormatPAlpha - | PixelFormatGDI, - PixelFormat48bppRGB = 12 | (48 << 8) | PixelFormatExtended, - PixelFormat64bppARGB = 13 | (64 << 8) | PixelFormatAlpha - | PixelFormatCanonical - | PixelFormatExtended, - PixelFormat64bppPARGB = 14 | (64 << 8) | PixelFormatAlpha - | PixelFormatPAlpha - | PixelFormatExtended, - PixelFormat24bppBGR = 15 | (24 << 8) | PixelFormatGDI, - PixelFormatMax = 16 -}; - -#else - -typedef INT PixelFormat; - -#define PixelFormatIndexed 0x00010000 // Indexes into a palette -#define PixelFormatGDI 0x00020000 // Is a GDI-supported format -#define PixelFormatAlpha 0x00040000 // Has an alpha component -#define PixelFormatPAlpha 0x00080000 // Uses pre-multiplied alpha -#define PixelFormatExtended 0x00100000 // Uses extended color (16 bits per channel) -#define PixelFormatCanonical 0x00200000 // ? - -#define PixelFormatUndefined 0 -#define PixelFormatDontCare 0 - -#define PixelFormat1bppIndexed (1 | ( 1 << 8) | PixelFormatIndexed | PixelFormatGDI) -#define PixelFormat4bppIndexed (2 | ( 4 << 8) | PixelFormatIndexed | PixelFormatGDI) -#define PixelFormat8bppIndexed (3 | ( 8 << 8) | PixelFormatIndexed | PixelFormatGDI) -#define PixelFormat16bppGrayScale (4 | (16 << 8) | PixelFormatExtended) -#define PixelFormat16bppRGB555 (5 | (16 << 8) | PixelFormatGDI) -#define PixelFormat16bppRGB565 (6 | (16 << 8) | PixelFormatGDI) -#define PixelFormat16bppARGB1555 (7 | (16 << 8) | PixelFormatAlpha | PixelFormatGDI) -#define PixelFormat24bppRGB (8 | (24 << 8) | PixelFormatGDI) -#define PixelFormat32bppRGB (9 | (32 << 8) | PixelFormatGDI) -#define PixelFormat32bppARGB (10 | (32 << 8) | PixelFormatAlpha | PixelFormatGDI | PixelFormatCanonical) -#define PixelFormat32bppPARGB (11 | (32 << 8) | PixelFormatAlpha | PixelFormatPAlpha | PixelFormatGDI) -#define PixelFormat48bppRGB (12 | (48 << 8) | PixelFormatExtended) -#define PixelFormat64bppARGB (13 | (64 << 8) | PixelFormatAlpha | PixelFormatCanonical | PixelFormatExtended) -#define PixelFormat64bppPARGB (14 | (64 << 8) | PixelFormatAlpha | PixelFormatPAlpha | PixelFormatExtended) -#define PixelFormatMax 15 - -#endif - - -/* - * Return the pixel size for the specified format (in bits) - */ - -inline UINT -GetPixelFormatSize( - PixelFormat pixfmt - ) -{ - return (pixfmt >> 8) & 0xff; -} - -/* - * Determine if the specified pixel format is an indexed color format - */ - -inline BOOL -IsIndexedPixelFormat( - PixelFormat pixfmt - ) -{ - return (pixfmt & PixelFormatIndexed) != 0; -} - -/* - * Determine if the pixel format can have alpha channel - */ - -inline BOOL -IsAlphaPixelFormat( - PixelFormat pixfmt -) -{ - return (pixfmt & PixelFormatAlpha) != 0; -} - -/* - * Determine if the pixel format is an extended format, - * i.e. supports 16-bit per channel - */ - -inline BOOL -IsExtendedPixelFormat( - PixelFormat pixfmt - ) -{ - return (pixfmt & PixelFormatExtended) != 0; -} - -/* - * Determine if the pixel format is canonical format: - * PixelFormat32bppARGB - * PixelFormat32bppPARGB - * PixelFormat64bppARGB - * PixelFormat64bppPARGB - */ - -inline BOOL -IsCanonicalPixelFormat( - PixelFormat pixfmt - ) -{ - return (pixfmt & PixelFormatCanonical) != 0; -} - -/* - * Color palette - * palette entries are limited to 32bpp ARGB pixel format - */ - -enum PaletteFlags -{ - PaletteFlagsHasAlpha = 0x0001, - PaletteFlagsGrayScale = 0x0002, - PaletteFlagsHalftone = 0x0004 -}; - -struct ColorPalette -{ -public: - UINT Flags; // palette flags - UINT Count; // number of color entries - ARGB Entries[1]; // palette color entries -}; - -#endif diff --git a/src/includes/GdiPlusRegion.h b/src/includes/GdiPlusRegion.h deleted file mode 100644 index cfb40a17..00000000 --- a/src/includes/GdiPlusRegion.h +++ /dev/null @@ -1,498 +0,0 @@ -/**************************************************************************\ -* -* Copyright (c) 1998-2000, Microsoft Corp. All Rights Reserved. -* -* Module Name: -* -* GdiplusRegion.h -* -* Abstract: -* -* Region API related declarations -* -\**************************************************************************/ - -#ifndef _GDIPLUSREGION_H -#define _GDIPLUSREGION_H - -/** - * Construct a new region object - */ - -inline -Region::Region() -{ - GpRegion *region = NULL; - - lastResult = DllExports::GdipCreateRegion(®ion); - - SetNativeRegion(region); -} - -inline -Region::Region(IN const RectF& rect) -{ - GpRegion *region = NULL; - - lastResult = DllExports::GdipCreateRegionRect(&rect, ®ion); - - SetNativeRegion(region); -} - -inline -Region::Region(IN const Rect& rect) -{ - GpRegion *region = NULL; - - lastResult = DllExports::GdipCreateRegionRectI(&rect, ®ion); - - SetNativeRegion(region); -} - -inline -Region::Region(IN const GraphicsPath* path) -{ - GpRegion *region = NULL; - - lastResult = DllExports::GdipCreateRegionPath(path->nativePath, ®ion); - - SetNativeRegion(region); -} - -inline -Region::Region(IN const BYTE* regionData, IN INT size) -{ - GpRegion *region = NULL; - - lastResult = DllExports::GdipCreateRegionRgnData(regionData, size, ®ion); - - SetNativeRegion(region); -} - -inline -Region::Region(IN HRGN hRgn) -{ - GpRegion *region = NULL; - - lastResult = DllExports::GdipCreateRegionHrgn(hRgn, ®ion); - - SetNativeRegion(region); -} - -inline -Region* Region::FromHRGN(IN HRGN hRgn) -{ - GpRegion *region = NULL; - - if (DllExports::GdipCreateRegionHrgn(hRgn, ®ion) == Ok) - { - Region* newRegion = new Region(region); - - if (newRegion == NULL) - { - DllExports::GdipDeleteRegion(region); - } - - return newRegion; - } - else - return NULL; -} - -inline -Region::~Region() -{ - DllExports::GdipDeleteRegion(nativeRegion); -} - -/** - * Make a copy of the region object - */ -inline Region* -Region::Clone() const -{ - GpRegion *region = NULL; - - SetStatus(DllExports::GdipCloneRegion(nativeRegion, ®ion)); - - return new Region(region); -} - -inline Status -Region::MakeInfinite() -{ - return SetStatus(DllExports::GdipSetInfinite(nativeRegion)); -} - -inline Status -Region::MakeEmpty() -{ - return SetStatus(DllExports::GdipSetEmpty(nativeRegion)); -} - -/** - * Region operations - */ -inline Status -Region::Intersect(IN const RectF& rect) -{ - return SetStatus(DllExports::GdipCombineRegionRect(nativeRegion, &rect, CombineModeIntersect)); -} - -inline Status -Region::Intersect(IN const Rect& rect) -{ - return SetStatus(DllExports::GdipCombineRegionRectI(nativeRegion, &rect, CombineModeIntersect)); -} - -inline Status -Region::Intersect(IN const GraphicsPath* path) -{ - return SetStatus(DllExports::GdipCombineRegionPath(nativeRegion, path->nativePath, CombineModeIntersect)); -} - -inline Status -Region::Intersect(IN const Region* region) -{ - return SetStatus(DllExports::GdipCombineRegionRegion(nativeRegion, region->nativeRegion, CombineModeIntersect)); -} - -inline Status -Region::Union(IN const RectF& rect) -{ - return SetStatus(DllExports::GdipCombineRegionRect(nativeRegion, &rect, CombineModeUnion)); -} - -inline Status -Region::Union(IN const Rect& rect) -{ - return SetStatus(DllExports::GdipCombineRegionRectI(nativeRegion, &rect, CombineModeUnion)); -} - -inline Status -Region::Union(IN const GraphicsPath* path) -{ - return SetStatus(DllExports::GdipCombineRegionPath(nativeRegion, path->nativePath, CombineModeUnion)); -} - -inline Status -Region::Union(IN const Region* region) -{ - return SetStatus(DllExports::GdipCombineRegionRegion(nativeRegion, region->nativeRegion, CombineModeUnion)); -} - -inline Status -Region::Xor(IN const RectF& rect) -{ - return SetStatus(DllExports::GdipCombineRegionRect(nativeRegion, &rect, CombineModeXor)); -} - -inline Status -Region::Xor(IN const Rect& rect) -{ - return SetStatus(DllExports::GdipCombineRegionRectI(nativeRegion, &rect, CombineModeXor)); -} - -inline Status -Region::Xor(IN const GraphicsPath* path) -{ - return SetStatus(DllExports::GdipCombineRegionPath(nativeRegion, path->nativePath, CombineModeXor)); -} - -inline Status -Region::Xor(IN const Region* region) -{ - return SetStatus(DllExports::GdipCombineRegionRegion(nativeRegion, region->nativeRegion, CombineModeXor)); -} - -inline Status -Region::Exclude(IN const RectF& rect) -{ - return SetStatus(DllExports::GdipCombineRegionRect(nativeRegion, &rect, CombineModeExclude)); -} - -inline Status -Region::Exclude(IN const Rect& rect) -{ - return SetStatus(DllExports::GdipCombineRegionRectI(nativeRegion, &rect, CombineModeExclude)); -} - -inline Status -Region::Exclude(IN const GraphicsPath* path) -{ - return SetStatus(DllExports::GdipCombineRegionPath(nativeRegion, path->nativePath, CombineModeExclude)); -} - -inline Status -Region::Exclude(IN const Region* region) -{ - return SetStatus(DllExports::GdipCombineRegionRegion(nativeRegion, - region->nativeRegion, CombineModeExclude)); -} - -inline Status -Region::Complement(IN const RectF& rect) -{ - return SetStatus(DllExports::GdipCombineRegionRect(nativeRegion, &rect, CombineModeComplement)); -} - -inline Status -Region::Complement(IN const Rect& rect) -{ - return SetStatus(DllExports::GdipCombineRegionRectI(nativeRegion, &rect, CombineModeComplement)); -} - -inline Status -Region::Complement(IN const GraphicsPath* path) -{ - return SetStatus(DllExports::GdipCombineRegionPath(nativeRegion, - path->nativePath, CombineModeComplement)); -} - -inline Status -Region::Complement(IN const Region* region) -{ - return SetStatus(DllExports::GdipCombineRegionRegion(nativeRegion, - region->nativeRegion, CombineModeComplement)); -} - -/** - * Transform operations - */ -inline Status -Region::Translate(IN REAL dx, - IN REAL dy) -{ - return SetStatus(DllExports::GdipTranslateRegion(nativeRegion, dx, dy)); -} - -inline Status -Region::Translate(IN INT dx, - IN INT dy) -{ - return SetStatus(DllExports::GdipTranslateRegionI(nativeRegion, dx, dy)); -} - -inline Status -Region::Transform(IN const Matrix* matrix) -{ - return SetStatus(DllExports::GdipTransformRegion(nativeRegion, matrix->nativeMatrix)); -} - -/** - * Get region attributes - */ -inline Status -Region::GetBounds(OUT RectF* rect, - IN const Graphics* g) const -{ - return SetStatus(DllExports::GdipGetRegionBounds(nativeRegion, - g->nativeGraphics, - rect)); -} - -inline Status -Region::GetBounds(OUT Rect* rect, - IN const Graphics* g) const -{ - return SetStatus(DllExports::GdipGetRegionBoundsI(nativeRegion, - g->nativeGraphics, - rect)); -} - -inline HRGN -Region::GetHRGN(IN const Graphics* g) const -{ - HRGN hrgn; - - SetStatus(DllExports::GdipGetRegionHRgn(nativeRegion, - g->nativeGraphics, - &hrgn)); - - return hrgn; -} - -inline BOOL -Region::IsEmpty(IN const Graphics *g) const -{ - BOOL booln = FALSE; - - SetStatus(DllExports::GdipIsEmptyRegion(nativeRegion, - g->nativeGraphics, - &booln)); - - return booln; -} - -inline BOOL -Region::IsInfinite(IN const Graphics *g) const -{ - BOOL booln = FALSE; - - SetStatus(DllExports::GdipIsInfiniteRegion(nativeRegion, - g->nativeGraphics, - &booln)); - - return booln; -} - -inline BOOL -Region::Equals(IN const Region* region, - IN const Graphics* g) const -{ - BOOL booln = FALSE; - - SetStatus(DllExports::GdipIsEqualRegion(nativeRegion, - region->nativeRegion, - g->nativeGraphics, - &booln)); - return booln; -} - -// Get the size of the buffer needed for the GetData method -inline UINT -Region::GetDataSize() const -{ - UINT bufferSize = 0; - - SetStatus(DllExports::GdipGetRegionDataSize(nativeRegion, &bufferSize)); - - return bufferSize; -} - -// buffer - where to put the data -// bufferSize - how big the buffer is (should be at least as big as GetDataSize()) -// sizeFilled - if not NULL, this is an OUT param that says how many bytes -// of data were written to the buffer. -inline Status -Region::GetData(OUT BYTE* buffer, - IN UINT bufferSize, - OUT UINT* sizeFilled) const -{ - return SetStatus(DllExports::GdipGetRegionData(nativeRegion, buffer, bufferSize, sizeFilled)); -} - -/** - * Hit testing operations - */ -inline BOOL -Region::IsVisible(IN const PointF& point, - IN const Graphics* g) const -{ - BOOL booln = FALSE; - - SetStatus(DllExports::GdipIsVisibleRegionPoint(nativeRegion, - point.X, point.Y, - (g == NULL) ? NULL : g->nativeGraphics, - &booln)); - return booln; -} - -inline BOOL -Region::IsVisible(IN const RectF& rect, - IN const Graphics* g) const -{ - BOOL booln = FALSE; - - SetStatus(DllExports::GdipIsVisibleRegionRect(nativeRegion, rect.X, - rect.Y, rect.Width, - rect.Height, - (g == NULL) ? NULL : g->nativeGraphics, - &booln)); - return booln; -} - -inline BOOL -Region::IsVisible(IN const Point& point, - IN const Graphics* g) const -{ - BOOL booln = FALSE; - - - SetStatus(DllExports::GdipIsVisibleRegionPointI(nativeRegion, - point.X, - point.Y, - (g == NULL) ? NULL : g->nativeGraphics, - &booln)); - return booln; -} - -inline BOOL -Region::IsVisible(IN const Rect& rect, - IN const Graphics* g) const -{ - BOOL booln = FALSE; - - SetStatus(DllExports::GdipIsVisibleRegionRectI(nativeRegion, - rect.X, - rect.Y, - rect.Width, - rect.Height, - (g == NULL) ? NULL : g->nativeGraphics, - &booln)); - return booln; -} - -inline UINT -Region::GetRegionScansCount(IN const Matrix* matrix) const -{ - UINT count = 0; - - SetStatus(DllExports::GdipGetRegionScansCount(nativeRegion, - &count, - matrix->nativeMatrix)); - return count; -} - -inline Status -Region::GetRegionScans( - IN const Matrix* matrix, - OUT RectF* rects, - IN OUT INT* count) const -{ - return SetStatus(DllExports::GdipGetRegionScans(nativeRegion, - rects, - count, - matrix->nativeMatrix)); -} - -// If rects is NULL, return the count of rects in the region. -// Otherwise, assume rects is big enough to hold all the region rects -// and fill them in and return the number of rects filled in. -// The rects are returned in the units specified by the matrix -// (which is typically a world-to-device transform). -// Note that the number of rects returned can vary, depending on the -// matrix that is used. -inline Status -Region::GetRegionScans( - IN const Matrix* matrix, - OUT Rect* rects, // NULL to just get the count - IN OUT INT* count) const -{ - return SetStatus(DllExports::GdipGetRegionScansI(nativeRegion, - rects, - count, - matrix->nativeMatrix)); -} - -// protected method -inline Region::Region(GpRegion* nativeRegion) -{ - SetNativeRegion(nativeRegion); -} - -// protected method -inline VOID Region::SetNativeRegion(GpRegion* nativeRegion) -{ - this->nativeRegion = nativeRegion; -} - -inline Status Region::GetLastStatus() const -{ - Status lastStatus = lastResult; - lastResult = Ok; - - return lastStatus; -} - -#endif // !_GDIPLUSREGION_H diff --git a/src/includes/GdiPlusStringFormat.h b/src/includes/GdiPlusStringFormat.h deleted file mode 100644 index b4ed431a..00000000 --- a/src/includes/GdiPlusStringFormat.h +++ /dev/null @@ -1,381 +0,0 @@ -/**************************************************************************\ -* -* Copyright (c) 1998-2000, Microsoft Corp. All Rights Reserved. -* -* Module Name: -* -* GdiplusStringFormat.h -* -* Abstract: -* -* String format specification for DrawString and text APIs -* -\**************************************************************************/ - -#ifndef _GDIPLUSSTRINGFORMAT_H -#define _GDIPLUSSTRINGFORMAT_H - - -class StringFormat : public GdiplusBase -{ -public: - friend class Graphics; - friend class GraphicsPath; - - - StringFormat( - IN INT formatFlags = 0, - IN LANGID language = LANG_NEUTRAL - ) - { - nativeFormat = NULL; - lastError = DllExports::GdipCreateStringFormat( - formatFlags, - language, - &nativeFormat - ); - } - - static const StringFormat *GenericDefault(); - static const StringFormat *GenericTypographic(); - - // Constructor based on existing string format - - StringFormat( - IN const StringFormat *format - ) - { - nativeFormat = NULL; - lastError = DllExports::GdipCloneStringFormat( - format ? format->nativeFormat : NULL, - &nativeFormat - ); - } - - StringFormat *Clone() const - { - GpStringFormat *clonedStringFormat = NULL; - - lastError = DllExports::GdipCloneStringFormat( - nativeFormat, - &clonedStringFormat - ); - - if (lastError == Ok) - return new StringFormat(clonedStringFormat, lastError); - else - return NULL; - } - - ~StringFormat() - { - DllExports::GdipDeleteStringFormat(nativeFormat); - } - - Status SetFormatFlags(IN INT flags) - { - return SetStatus(DllExports::GdipSetStringFormatFlags( - nativeFormat, - flags - )); - } - - INT GetFormatFlags() const - { - INT flags; - SetStatus(DllExports::GdipGetStringFormatFlags(nativeFormat, &flags)); - return flags; - } - -#ifndef DCR_USE_NEW_152154 - Status SetLineSpacing( - IN REAL amount = 1.0f, - IN LineSpacing method = LineSpacingRecommended - ) - { - return SetStatus(DllExports::GdipSetStringFormatLineSpacing( - nativeFormat, - amount, - method - )); - } -#endif - - Status SetAlignment(IN StringAlignment align) - { - return SetStatus(DllExports::GdipSetStringFormatAlign( - nativeFormat, - align - )); - } - - StringAlignment GetAlignment() const - { - StringAlignment alignment; - SetStatus(DllExports::GdipGetStringFormatAlign( - nativeFormat, - &alignment - )); - return alignment; - } - - Status SetLineAlignment(IN StringAlignment align) - { - return SetStatus(DllExports::GdipSetStringFormatLineAlign( - nativeFormat, - align - )); - } - - StringAlignment GetLineAlignment() const - { - StringAlignment alignment; - SetStatus(DllExports::GdipGetStringFormatLineAlign( - nativeFormat, - &alignment - )); - return alignment; - } - - Status SetHotkeyPrefix(IN HotkeyPrefix hotkeyPrefix) - { - return SetStatus(DllExports::GdipSetStringFormatHotkeyPrefix( - nativeFormat, - (INT)hotkeyPrefix - )); - } - - HotkeyPrefix GetHotkeyPrefix() const - { - HotkeyPrefix hotkeyPrefix; - SetStatus(DllExports::GdipGetStringFormatHotkeyPrefix( - nativeFormat, - (INT*)&hotkeyPrefix - )); - return hotkeyPrefix; - } - - Status SetTabStops( - IN REAL firstTabOffset, - IN INT count, - IN const REAL *tabStops - ) - { - return SetStatus(DllExports::GdipSetStringFormatTabStops( - nativeFormat, - firstTabOffset, - count, - tabStops - )); - } - - INT GetTabStopCount() const - { - INT count; - SetStatus(DllExports::GdipGetStringFormatTabStopCount(nativeFormat, &count)); - return count; - } - - Status GetTabStops( - IN INT count, - OUT REAL *firstTabOffset, - OUT REAL *tabStops - ) const - { - return SetStatus(DllExports::GdipGetStringFormatTabStops( - nativeFormat, - count, - firstTabOffset, - tabStops - )); - } - -#ifdef DCR_USE_NEW_146933 - Status SetDigitSubstitution( - IN LANGID language, - IN StringDigitSubstitute substitute - ) - { - return SetStatus(DllExports::GdipSetStringFormatDigitSubstitution( - nativeFormat, - language, - substitute - )); - } - - LANGID GetDigitSubstitutionLanguage( - ) const - { - LANGID language; - SetStatus(DllExports::GdipGetStringFormatDigitSubstitution( - nativeFormat, - &language, - NULL - )); - return language; - } - - StringDigitSubstitute GetDigitSubstitutionMethod( - ) const - { - StringDigitSubstitute substitute; - SetStatus(DllExports::GdipGetStringFormatDigitSubstitution( - nativeFormat, - NULL, - &substitute - )); - return substitute; - } -#endif // DCR_USE_NEW_146933 - - // String trimming. How to handle more text than can be displayed - // in the limits available. - - Status SetTrimming(IN StringTrimming trimming) - { - return SetStatus(DllExports::GdipSetStringFormatTrimming( - nativeFormat, - trimming - )); - } - - StringTrimming StringFormat::GetTrimming() const - { - StringTrimming trimming; - SetStatus(DllExports::GdipGetStringFormatTrimming( - nativeFormat, - &trimming - )); - return trimming; - } - -#ifdef DCR_USE_NEW_174340 - Status SetMeasurableCharacterRanges( - IN INT rangeCount, - IN const CharacterRange *ranges - ) - { - return SetStatus(DllExports::GdipSetStringFormatMeasurableCharacterRanges( - nativeFormat, - rangeCount, - ranges - )); - } - - INT GetMeasurableCharacterRangeCount() - { - INT count; - SetStatus(DllExports::GdipGetStringFormatMeasurableCharacterRangeCount( - nativeFormat, - &count - )); - return count; - } -#endif - - // GetLastStatus - return last error code and clear error code - - Status GetLastStatus() const - { - Status lastStatus = lastError; - lastError = Ok; - - return lastStatus; - } - -protected: - - Status SetStatus(GpStatus newStatus) const - { - if (newStatus == Ok) - { - return Ok; - } - else - { - return lastError = newStatus; - } - } - - -// Not allowed and move to private - StringFormat(const StringFormat &source) - { - nativeFormat = NULL; - lastError = DllExports::GdipCloneStringFormat( - source.nativeFormat, - &nativeFormat - ); - } - - StringFormat& operator=(const StringFormat &source) - { - DllExports::GdipDeleteStringFormat(nativeFormat); - lastError = DllExports::GdipCloneStringFormat( - source.nativeFormat, - &nativeFormat - ); - return *this; - } - - - // private constructor for copy - StringFormat(GpStringFormat * clonedStringFormat, Status status) - { - lastError = status; - nativeFormat = clonedStringFormat; - - } - - GpStringFormat *nativeFormat; - mutable Status lastError; -}; - -// Generic constant string formats. - -static BYTE GenericTypographicStringFormatBuffer[sizeof(StringFormat)] = {0}; -static BYTE GenericDefaultStringFormatBuffer[sizeof(StringFormat)] = {0}; - -static StringFormat *GenericTypographicStringFormat = NULL; -static StringFormat *GenericDefaultStringFormat = NULL; - -// Define the generic string formats - - -inline const StringFormat *StringFormat::GenericDefault() -{ - if (GenericDefaultStringFormat != NULL) - { - return GenericDefaultStringFormat; - } - - GenericDefaultStringFormat = - (StringFormat*)GenericDefaultStringFormatBuffer; - - GenericDefaultStringFormat->lastError = - DllExports::GdipStringFormatGetGenericDefault( - &(GenericDefaultStringFormat->nativeFormat) - ); - - return GenericDefaultStringFormat; -} - -inline const StringFormat *StringFormat::GenericTypographic() -{ - if (GenericTypographicStringFormat != NULL) - { - return GenericTypographicStringFormat; - } - - GenericTypographicStringFormat = - (StringFormat*)GenericTypographicStringFormatBuffer; - - GenericTypographicStringFormat->lastError = - DllExports::GdipStringFormatGetGenericTypographic( - &GenericTypographicStringFormat->nativeFormat - ); - - return GenericTypographicStringFormat; -} - -#endif // !_GDIPLUSSTRINGFORMAT_H diff --git a/src/includes/GdiPlusTypes.h b/src/includes/GdiPlusTypes.h deleted file mode 100644 index d5c03a26..00000000 --- a/src/includes/GdiPlusTypes.h +++ /dev/null @@ -1,826 +0,0 @@ -/**************************************************************************\ -* -* Copyright (c) 1998-2000, Microsoft Corp. All Rights Reserved. -* -* Module Name: -* -* GdiplusTypes.h -* -* Abstract: -* -* Basic types used by GDI+ -* -\**************************************************************************/ - -#ifndef _GDIPLUSTYPES_H -#define _GDIPLUSTYPES_H - -#ifndef DCR_USE_NEW_175866 - -//-------------------------------------------------------------------------- -// LIB version initialization functions -//-------------------------------------------------------------------------- - -typedef VOID (__cdecl *DEBUGEVENTFUNCTION)(INT level, CHAR *message); - -extern "C" BOOL __stdcall InitializeGdiplus(DEBUGEVENTFUNCTION); -extern "C" VOID __stdcall UninitializeGdiplus(); - -#endif - -//-------------------------------------------------------------------------- -// Callback functions -//-------------------------------------------------------------------------- - -extern "C" { -typedef BOOL (CALLBACK * ImageAbort)(VOID *); -typedef ImageAbort DrawImageAbort; -typedef ImageAbort GetThumbnailImageAbort; -} - -// Callback for EnumerateMetafile methods. The parameters are: - -// recordType WMF, EMF, or EMF+ record type -// flags (always 0 for WMF/EMF records) -// dataSize size of the record data (in bytes), or 0 if no data -// data pointer to the record data, or NULL if no data -// callbackData pointer to callbackData, if any - -// This method can then call Metafile::PlayRecord to play the -// record that was just enumerated. If this method returns -// FALSE, the enumeration process is aborted. Otherwise, it continues. - -extern "C" { -typedef BOOL (CALLBACK * EnumerateMetafileProc)(EmfPlusRecordType,UINT,UINT,const BYTE*,VOID*); -} - -//-------------------------------------------------------------------------- -// Primitive data types -// -// NOTE: -// Types already defined in standard header files: -// INT8 -// UINT8 -// INT16 -// UINT16 -// INT32 -// UINT32 -// INT64 -// UINT64 -// -// Avoid using the following types: -// LONG - use INT -// ULONG - use UINT -// DWORD - use UINT32 -//-------------------------------------------------------------------------- - -typedef float REAL; - -#define REAL_MAX FLT_MAX -#define REAL_MIN FLT_MIN -#define REAL_TOLERANCE (FLT_MIN * 100) -#define REAL_EPSILON 1.192092896e-07F /* FLT_EPSILON */ - -//-------------------------------------------------------------------------- -// Forward declarations of various internal classes -//-------------------------------------------------------------------------- - -class Size; -class SizeF; -class Point; -class PointF; -class Rect; -class RectF; -class CharacterRange; - -//-------------------------------------------------------------------------- -// Return values from any GDI+ API -//-------------------------------------------------------------------------- - -enum Status -{ - Ok = 0, - GenericError = 1, - InvalidParameter = 2, - OutOfMemory = 3, - ObjectBusy = 4, - InsufficientBuffer = 5, - NotImplemented = 6, - Win32Error = 7, - WrongState = 8, - Aborted = 9, -#ifdef DCR_USE_NEW_135429 - FileNotFound = 10, - ValueOverflow = 11, - AccessDenied = 12, - UnknownImageFormat = 13, - FontFamilyNotFound = 14, - FontStyleNotFound = 15, - NotTrueTypeFont = 16, -#else - NotFound = 10, - ValueOverflow = 11, -#endif - UnsupportedGdiplusVersion = 17, - GdiplusNotInitialized - -}; - -//-------------------------------------------------------------------------- -// Represents a dimension in a 2D coordinate system -// (floating-point coordinates) -//-------------------------------------------------------------------------- - -class SizeF -{ -public: - - // Default constructor - SizeF() - { - Width = Height = 0.0f; - } - - SizeF(IN const SizeF& size) - { - Width = size.Width; - Height = size.Height; - } - - SizeF(IN REAL width, - IN REAL height) - { - Width = width; - Height = height; - } - - SizeF operator+(IN const SizeF& sz) const - { - return SizeF(Width + sz.Width, - Height + sz.Height); - } - - SizeF operator-(IN const SizeF& sz) const - { - return SizeF(Width - sz.Width, - Height - sz.Height); - } - - BOOL Equals(IN const SizeF& sz) const - { - return (Width == sz.Width) && (Height == sz.Height); - } - - BOOL Empty() const - { - return (Width == 0.0f && Height == 0.0f); - } - -public: - - REAL Width; - REAL Height; -}; - -//-------------------------------------------------------------------------- -// Represents a dimension in a 2D coordinate system -// (integer coordinates) -//-------------------------------------------------------------------------- - -class Size -{ -public: - - // Default constructor - Size() - { - Width = Height = 0; - } - - Size(IN const Size& size) - { - Width = size.Width; - Height = size.Height; - } - - Size(IN INT width, - IN INT height) - { - Width = width; - Height = height; - } - - Size operator+(IN const Size& sz) const - { - return Size(Width + sz.Width, - Height + sz.Height); - } - - Size operator-(IN const Size& sz) const - { - return Size(Width - sz.Width, - Height - sz.Height); - } - - BOOL Equals(IN const Size& sz) const - { - return (Width == sz.Width) && (Height == sz.Height); - } - - BOOL Empty() const - { - return (Width == 0 && Height == 0); - } - -public: - - INT Width; - INT Height; -}; - -//-------------------------------------------------------------------------- -// Represents a location in a 2D coordinate system -// (floating-point coordinates) -//-------------------------------------------------------------------------- - -class PointF -{ -public: - PointF() - { - X = Y = 0.0f; - } - - PointF(IN const PointF &point) - { - X = point.X; - Y = point.Y; - } - - PointF(IN const SizeF &size) - { - X = size.Width; - Y = size.Height; - } - - PointF(IN REAL x, - IN REAL y) - { - X = x; - Y = y; - } - - PointF operator+(IN const PointF& point) const - { - return PointF(X + point.X, - Y + point.Y); - } - - PointF operator-(IN const PointF& point) const - { - return PointF(X - point.X, - Y - point.Y); - } - - BOOL Equals(IN const PointF& point) - { - return (X == point.X) && (Y == point.Y); - } - -public: - - REAL X; - REAL Y; -}; - -//-------------------------------------------------------------------------- -// Represents a location in a 2D coordinate system -// (integer coordinates) -//-------------------------------------------------------------------------- - -class Point -{ -public: - Point() - { - X = Y = 0; - } - - Point(IN const Point &point) - { - X = point.X; - Y = point.Y; - } - - Point(IN const Size &size) - { - X = size.Width; - Y = size.Height; - } - - Point(IN INT x, - IN INT y) - { - X = x; - Y = y; - } - - Point operator+(IN const Point& point) const - { - return Point(X + point.X, - Y + point.Y); - } - - Point operator-(IN const Point& point) const - { - return Point(X - point.X, - Y - point.Y); - } - - BOOL Equals(IN const Point& point) - { - return (X == point.X) && (Y == point.Y); - } - -public: - - INT X; - INT Y; -}; - -//-------------------------------------------------------------------------- -// Represents a rectangle in a 2D coordinate system -// (floating-point coordinates) -//-------------------------------------------------------------------------- - -class RectF -{ -public: - - // Default constructor - - RectF() - { - X = Y = Width = Height = 0.0f; - } - - RectF(IN REAL x, - IN REAL y, - IN REAL width, - IN REAL height) - { - X = x; - Y = y; - Width = width; - Height = height; - } - - RectF(IN const PointF& location, - IN const SizeF& size) - { - X = location.X; - Y = location.Y; - Width = size.Width; - Height = size.Height; - } - - RectF* Clone() const - { - return new RectF(X, Y, Width, Height); - } - - VOID GetLocation(OUT PointF* point) const - { - point->X = X; - point->Y = Y; - } - - VOID GetSize(OUT SizeF* size) const - { - size->Width = Width; - size->Height = Height; - } - - VOID GetBounds(OUT RectF* rect) const - { - rect->X = X; - rect->Y = Y; - rect->Width = Width; - rect->Height = Height; - } - - // Return the left, top, right, and bottom - // coordinates of the rectangle - - REAL GetLeft() const - { - return X; - } - - REAL GetTop() const - { - return Y; - } - - REAL GetRight() const - { - return X+Width; - } - - REAL GetBottom() const - { - return Y+Height; - } - - // Determine if the rectangle is empty - BOOL IsEmptyArea() const - { - return (Width <= REAL_EPSILON) || (Height <= REAL_EPSILON); - } - - BOOL Equals(IN const RectF & rect) const - { - return X == rect.X && - Y == rect.Y && - Width == rect.Width && - Height == rect.Height; - } - - BOOL Contains(IN REAL x, - IN REAL y) const - { - return x >= X && x < X+Width && - y >= Y && y < Y+Height; - } - - BOOL Contains(IN const PointF& pt) const - { - return Contains(pt.X, pt.Y); - } - - BOOL Contains(IN const RectF& rect) const - { - return (X <= rect.X) && (rect.GetRight() <= GetRight()) && - (Y <= rect.Y) && (rect.GetBottom() <= GetBottom()); - } - - VOID Inflate(IN REAL dx, - IN REAL dy) - { - X -= dx; - Y -= dy; - Width += 2*dx; - Height += 2*dy; - } - - VOID Inflate(IN const PointF& point) - { - Inflate(point.X, point.Y); - } - - // Intersect the current rect with the specified object - - BOOL Intersect(IN const RectF& rect) - { - return Intersect(*this, *this, rect); - } - - // Intersect rect a and b and save the result into c - // Notice that c may be the same object as a or b. - - static BOOL Intersect(OUT RectF& c, - IN const RectF& a, - IN const RectF& b) - { - REAL right = min(a.GetRight(), b.GetRight()); - REAL bottom = min(a.GetBottom(), b.GetBottom()); - REAL left = max(a.GetLeft(), b.GetLeft()); - REAL top = max(a.GetTop(), b.GetTop()); - - c.X = left; - c.Y = top; - c.Width = right - left; - c.Height = bottom - top; - return !c.IsEmptyArea(); - } - - // Determine if the specified rect intersects with the - // current rect object. - - BOOL IntersectsWith(IN const RectF& rect) const - { - return (GetLeft() < rect.GetRight() && - GetTop() < rect.GetTop() && - GetRight() > rect.GetLeft() && - GetBottom() > rect.GetTop()); - } - - static BOOL Union(OUT RectF& c, - IN const RectF& a, - IN const RectF& b) - { - REAL right = max(a.GetRight(), b.GetRight()); - REAL bottom = max(a.GetBottom(), b.GetBottom()); - REAL left = min(a.GetLeft(), b.GetLeft()); - REAL top = min(a.GetTop(), b.GetTop()); - - c.X = left; - c.Y = top; - c.Width = right - left; - c.Height = bottom - top; - return !c.IsEmptyArea(); - } - - VOID Offset(IN const PointF& point) - { - Offset(point.X, point.Y); - } - - VOID Offset(IN REAL dx, - IN REAL dy) - { - X += dx; - Y += dy; - } - -public: - - REAL X; - REAL Y; - REAL Width; - REAL Height; -}; - -//-------------------------------------------------------------------------- -// Represents a rectangle in a 2D coordinate system -// (integer coordinates) -//-------------------------------------------------------------------------- - -class Rect -{ -public: - - // Default constructor - - Rect() - { - X = Y = Width = Height = 0; - } - - Rect(IN INT x, - IN INT y, - IN INT width, - IN INT height) - { - X = x; - Y = y; - Width = width; - Height = height; - } - - Rect(IN const Point& location, - IN const Size& size) - { - X = location.X; - Y = location.Y; - Width = size.Width; - Height = size.Height; - } - - Rect* Clone() const - { - return new Rect(X, Y, Width, Height); - } - - VOID GetLocation(OUT Point* point) const - { - point->X = X; - point->Y = Y; - } - - VOID GetSize(OUT Size* size) const - { - size->Width = Width; - size->Height = Height; - } - - VOID GetBounds(OUT Rect* rect) const - { - rect->X = X; - rect->Y = Y; - rect->Width = Width; - rect->Height = Height; - } - - // Return the left, top, right, and bottom - // coordinates of the rectangle - - INT GetLeft() const - { - return X; - } - - INT GetTop() const - { - return Y; - } - - INT GetRight() const - { - return X+Width; - } - - INT GetBottom() const - { - return Y+Height; - } - - // Determine if the rectangle is empty - BOOL IsEmptyArea() const - { - return (Width <= 0) || (Height <= 0); - } - - BOOL Equals(IN const Rect & rect) const - { - return X == rect.X && - Y == rect.Y && - Width == rect.Width && - Height == rect.Height; - } - - BOOL Contains(IN INT x, - IN INT y) const - { - return x >= X && x < X+Width && - y >= Y && y < Y+Height; - } - - BOOL Contains(IN const Point& pt) const - { - return Contains(pt.X, pt.Y); - } - - BOOL Contains(IN Rect& rect) const - { - return (X <= rect.X) && (rect.GetRight() <= GetRight()) && - (Y <= rect.Y) && (rect.GetBottom() <= GetBottom()); - } - - VOID Inflate(IN INT dx, - IN INT dy) - { - X -= dx; - Y -= dy; - Width += 2*dx; - Height += 2*dy; - } - - VOID Inflate(IN const Point& point) - { - Inflate(point.X, point.Y); - } - - // Intersect the current rect with the specified object - - BOOL Intersect(IN const Rect& rect) - { - return Intersect(*this, *this, rect); - } - - // Intersect rect a and b and save the result into c - // Notice that c may be the same object as a or b. - - static BOOL Intersect(OUT Rect& c, - IN const Rect& a, - IN const Rect& b) - { - INT right = min(a.GetRight(), b.GetRight()); - INT bottom = min(a.GetBottom(), b.GetBottom()); - INT left = max(a.GetLeft(), b.GetLeft()); - INT top = max(a.GetTop(), b.GetTop()); - - c.X = left; - c.Y = top; - c.Width = right - left; - c.Height = bottom - top; - return !c.IsEmptyArea(); - } - - // Determine if the specified rect intersects with the - // current rect object. - - BOOL IntersectsWith(IN const Rect& rect) const - { - return (GetLeft() < rect.GetRight() && - GetTop() < rect.GetTop() && - GetRight() > rect.GetLeft() && - GetBottom() > rect.GetTop()); - } - - static BOOL Union(OUT Rect& c, - IN const Rect& a, - IN const Rect& b) - { - INT right = max(a.GetRight(), b.GetRight()); - INT bottom = max(a.GetBottom(), b.GetBottom()); - INT left = min(a.GetLeft(), b.GetLeft()); - INT top = min(a.GetTop(), b.GetTop()); - - c.X = left; - c.Y = top; - c.Width = right - left; - c.Height = bottom - top; - return !c.IsEmptyArea(); - } - - VOID Offset(IN const Point& point) - { - Offset(point.X, point.Y); - } - - VOID Offset(IN INT dx, - IN INT dy) - { - X += dx; - Y += dy; - } - -public: - - INT X; - INT Y; - INT Width; - INT Height; -}; - -// A user must mange memory for PathData. - -class PathData -{ -public: - PathData() - { - Count = 0; - Points = NULL; - Types = NULL; - } - - ~PathData() - { - if (Points != NULL) - { - delete Points; - } - - if (Types != NULL) - { - delete Types; - } - } - -#ifdef DCR_USE_NEW_250932 - -private: - PathData(const PathData &); - PathData& operator=(const PathData &); - -#endif - -public: - INT Count; - PointF* Points; - BYTE* Types; -}; - - -//----------------------------- -// text character range -//----------------------------- - -class CharacterRange -{ -public: - CharacterRange( - INT first, - INT length - ) : - First (first), - Length (length) - {} - - CharacterRange() : First(0), Length(0) - {} - - CharacterRange & operator = (const CharacterRange &rhs) - { - First = rhs.First; - Length = rhs.Length; - return *this; - } - - INT First; - INT Length; -}; - -#endif // !_GDIPLUSTYPES_HPP diff --git a/src/includes/GdiPlusimageAttributes.h b/src/includes/GdiPlusimageAttributes.h deleted file mode 100644 index 26da28c7..00000000 --- a/src/includes/GdiPlusimageAttributes.h +++ /dev/null @@ -1,397 +0,0 @@ -/**************************************************************************\ -* -* Copyright (c) 1998-2000, Microsoft Corp. All Rights Reserved. -* -* Module Name: -* -* Image Attributes -* -* Abstract: -* -* Class for color adjustment object passed to Graphics.DrawImage -* -\**************************************************************************/ - -#ifndef _GDIPLUSIMAGEATTRIBUTES_H -#define _GDIPLUSIMAGEATTRIBUTES_H - -class GpImageAttributes; - -// There are 5 possible sets of color adjustments: -// ColorAdjustDefault, -// ColorAdjustBitmap, -// ColorAdjustBrush, -// ColorAdjustPen, -// ColorAdjustText, - -// Bitmaps, Brushes, Pens, and Text will all use any color adjustments -// that have been set into the default ImageAttributes until their own -// color adjustments have been set. So as soon as any "Set" method is -// called for Bitmaps, Brushes, Pens, or Text, then they start from -// scratch with only the color adjustments that have been set for them. -// Calling Reset removes any individual color adjustments for a type -// and makes it revert back to using all the default color adjustments -// (if any). The SetToIdentity method is a way to force a type to -// have no color adjustments at all, regardless of what previous adjustments -// have been set for the defaults or for that type. - -class ImageAttributes : public GdiplusBase -{ - friend class Graphics; - friend class TextureBrush; - -public: - - ImageAttributes() - { - nativeImageAttr = NULL; - lastResult = DllExports::GdipCreateImageAttributes(&nativeImageAttr); - } - - ~ImageAttributes() - { - DllExports::GdipDisposeImageAttributes(nativeImageAttr); - } - - ImageAttributes* Clone() const - { - GpImageAttributes* clone; - - SetStatus(DllExports::GdipCloneImageAttributes( - nativeImageAttr, - &clone)); - - return new ImageAttributes(clone, lastResult); - } - - // Set to identity, regardless of what the default color adjustment is. - Status - SetToIdentity( - IN ColorAdjustType type = ColorAdjustTypeDefault - ) - { - return SetStatus(DllExports::GdipSetImageAttributesToIdentity( - nativeImageAttr, - type)); - } - - // Remove any individual color adjustments, and go back to using the default - Status - Reset( - IN ColorAdjustType type = ColorAdjustTypeDefault - ) - { - return SetStatus(DllExports::GdipResetImageAttributes( - nativeImageAttr, - type)); - } - - Status - SetColorMatrix( - IN const ColorMatrix *colorMatrix, - IN ColorMatrixFlags mode = ColorMatrixFlagsDefault, - IN ColorAdjustType type = ColorAdjustTypeDefault - ) - { - return SetStatus(DllExports::GdipSetImageAttributesColorMatrix( - nativeImageAttr, - type, - TRUE, - colorMatrix, - NULL, - mode)); - } - - Status ClearColorMatrix( - IN ColorAdjustType type = ColorAdjustTypeDefault - ) - { - return SetStatus(DllExports::GdipSetImageAttributesColorMatrix( - nativeImageAttr, - type, - FALSE, - NULL, - NULL, - ColorMatrixFlagsDefault)); - } - - Status - SetColorMatrices( - IN const ColorMatrix *colorMatrix, - IN const ColorMatrix *grayMatrix, - IN ColorMatrixFlags mode = ColorMatrixFlagsDefault, - IN ColorAdjustType type = ColorAdjustTypeDefault - ) - { - return SetStatus(DllExports::GdipSetImageAttributesColorMatrix( - nativeImageAttr, - type, - TRUE, - colorMatrix, - grayMatrix, - mode)); - } - - Status ClearColorMatrices( - IN ColorAdjustType type = ColorAdjustTypeDefault - ) - { - return SetStatus(DllExports::GdipSetImageAttributesColorMatrix( - nativeImageAttr, - type, - FALSE, - NULL, - NULL, - ColorMatrixFlagsDefault)); - } - - Status SetThreshold( - IN REAL threshold, - IN ColorAdjustType type = ColorAdjustTypeDefault - ) - { - return SetStatus(DllExports::GdipSetImageAttributesThreshold( - nativeImageAttr, - type, - TRUE, - threshold)); - } - - Status ClearThreshold( - IN ColorAdjustType type = ColorAdjustTypeDefault - ) - { - return SetStatus(DllExports::GdipSetImageAttributesThreshold( - nativeImageAttr, - type, - FALSE, - 0.0)); - } - - Status SetGamma( - IN REAL gamma, - IN ColorAdjustType type = ColorAdjustTypeDefault - ) - { - return SetStatus(DllExports::GdipSetImageAttributesGamma( - nativeImageAttr, - type, - TRUE, - gamma)); - } - - Status ClearGamma( - IN ColorAdjustType type = ColorAdjustTypeDefault - ) - { - return SetStatus(DllExports::GdipSetImageAttributesGamma( - nativeImageAttr, - type, - FALSE, - 0.0)); - } - - Status SetNoOp( - IN ColorAdjustType type = ColorAdjustTypeDefault - ) - { - return SetStatus(DllExports::GdipSetImageAttributesNoOp( - nativeImageAttr, - type, - TRUE)); - } - - Status ClearNoOp( - IN ColorAdjustType type = ColorAdjustTypeDefault - ) - { - return SetStatus(DllExports::GdipSetImageAttributesNoOp( - nativeImageAttr, - type, - FALSE)); - } - - Status SetColorKey( - IN const Color& colorLow, - IN const Color& colorHigh, - IN ColorAdjustType type = ColorAdjustTypeDefault - ) - { - return SetStatus(DllExports::GdipSetImageAttributesColorKeys( - nativeImageAttr, - type, - TRUE, - colorLow.GetValue(), - colorHigh.GetValue())); - } - - Status ClearColorKey( - IN ColorAdjustType type = ColorAdjustTypeDefault - ) - { - return SetStatus(DllExports::GdipSetImageAttributesColorKeys( - nativeImageAttr, - type, - FALSE, - NULL, - NULL)); - } - - Status SetOutputChannel( - IN ColorChannelFlags channelFlags, - IN ColorAdjustType type = ColorAdjustTypeDefault - ) - { - return SetStatus(DllExports::GdipSetImageAttributesOutputChannel( - nativeImageAttr, - type, - TRUE, - channelFlags)); - } - - Status ClearOutputChannel( - IN ColorAdjustType type = ColorAdjustTypeDefault - ) - { - return SetStatus(DllExports::GdipSetImageAttributesOutputChannel( - nativeImageAttr, - type, - FALSE, - ColorChannelFlagsLast)); - } - - Status SetOutputChannelColorProfile( - IN const WCHAR *colorProfileFilename, - IN ColorAdjustType type = ColorAdjustTypeDefault - ) - { - return SetStatus(DllExports::GdipSetImageAttributesOutputChannelColorProfile( - nativeImageAttr, - type, - TRUE, - colorProfileFilename)); - } - - Status ClearOutputChannelColorProfile( - IN ColorAdjustType type = ColorAdjustTypeDefault - ) - { - return SetStatus(DllExports::GdipSetImageAttributesOutputChannelColorProfile( - nativeImageAttr, - type, - FALSE, - NULL)); - } - - Status SetRemapTable( - IN UINT mapSize, - IN const ColorMap *map, - IN ColorAdjustType type = ColorAdjustTypeDefault - ) - { - return SetStatus(DllExports::GdipSetImageAttributesRemapTable( - nativeImageAttr, - type, - TRUE, - mapSize, - map)); - } - - Status ClearRemapTable( - IN ColorAdjustType type = ColorAdjustTypeDefault - ) - { - return SetStatus(DllExports::GdipSetImageAttributesRemapTable( - nativeImageAttr, - type, - FALSE, - 0, - NULL)); - } - - Status SetBrushRemapTable(IN UINT mapSize, - IN const ColorMap *map) - { - return this->SetRemapTable(mapSize, map, ColorAdjustTypeBrush); - } - - Status ClearBrushRemapTable() - { - return this->ClearRemapTable(ColorAdjustTypeBrush); - } - - Status SetWrapMode(IN WrapMode wrap, - IN const Color& color = Color(), - IN BOOL clamp = FALSE) - { - ARGB argb = color.GetValue(); - - return SetStatus(DllExports::GdipSetImageAttributesWrapMode( - nativeImageAttr, wrap, argb, clamp)); - } - - #ifndef DCR_USE_NEW_145139 - Status SetICMMode(IN BOOL on) - { - on; - // This is not implemented. - // The supported method for doing ICM conversion from the embedded - // ICC profile is to use the Bitmap constructor from a file or stream - // and specify TRUE for the useIcm parameter. This will cause the - // image to be ICM converted when it's loaded from the file/stream - // if the profile exists. - return SetStatus(NotImplemented); -// DllExports::GdipSetImageAttributesICMMode(nativeImageAttr, on) - } - #endif - - // The flags of the palette are ignored. - Status GetAdjustedPalette(IN OUT ColorPalette* colorPalette, - IN ColorAdjustType colorAdjustType) const - { - return SetStatus(DllExports::GdipGetImageAttributesAdjustedPalette( - nativeImageAttr, colorPalette, colorAdjustType)); - } - - Status GetLastStatus() const - { - Status lastStatus = lastResult; - lastResult = Ok; - - return lastStatus; - } - -#ifdef DCR_USE_NEW_250932 - -private: - ImageAttributes(const ImageAttributes &); - ImageAttributes& operator=(const ImageAttributes &); - -#endif - -protected: - ImageAttributes(GpImageAttributes* imageAttr, Status status) - { - SetNativeImageAttr(imageAttr); - lastResult = status; - } - - VOID SetNativeImageAttr(GpImageAttributes* nativeImageAttr) - { - this->nativeImageAttr = nativeImageAttr; - } - - Status SetStatus(Status status) const - { - if (status != Ok) - return (lastResult = status); - else - return status; - } - -protected: - GpImageAttributes* nativeImageAttr; - mutable Status lastResult; -}; - -#endif diff --git a/src/lib/GdiPlus.lib b/src/lib/GdiPlus.lib deleted file mode 100644 index 71fff4a1f64d0a6a25ce6efe97efdaec5fa258de..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 200480 zcmeFa37A|(^*&tpiiiObQ4tX_A|fJ&BxFUzER!$;$z+@v2w)_1W_o5Cdb-D+oHPUi7A>=#=gwDuFIupC(PHuY#5s)Za4$=Gw(QWNMiu=8 zU(m(@MK|ILI(CJktMLULH(wFrejModLlq%R$Aez9M9~%af;KHu1ldiX7w@a+LVQ6d z?5gNYd^z1OY4Ze21pN?S(1}MXLLQt5svM~3J@|sQ?55~!d^y1%P9t?icj5~gJyy|8 z_=2iEiav)gXl$XPOYjAa@1Y2Oj)Nw4P=s`x0M&L;guJeSPMV_#aXATea;gYC zVu>Kc>6M@}2NYe8FX&Y$mx8Xs7jzcVPtY~^f?mB$5#sb}&}$A2+IJBIx`0f?mHu5#suK&>Mg&2x<8S&^bs?LBKc%^u|3Eq3pep(}R-E zZL>tsJ@|s&G^*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bObdm`9@QIq*P}328{O<8_z@>aMN8;W9k{;v z`ySO!Lq(h*6}z-YbtU(KCwNqUXsC!2q+$fiqq^sJpP%%oZZTBE2~uG?;-mUXRKF-|lBX9IL~p8Y9&LRJ`-iqk74~g?l`zFB>Z21gW?t(4%U9)fQk{ZG7KQ5hqBsH9+;7bzk!J<=+`9 z;(*FGs`D<(#)h2&$N%u#ikLq}bsx?(cn{*hd#}Rj7aYwWkN9Eki~sxiY{z?JgC7Ss zC|2R@sKMD-gF|T>8z{Ne3U=UC@!3_wXMGLMwKX{FYH)T7jz6!pH8`|3L3yxp1u%cv zQ5jV@Yie+=7aVHImaDf0=LW%Hjuxk<2IoOFe6R`!Fuy!E*6``B!FjOYP)jzit{NQr z42=zbnLBH69wIpXK0a6}jyJzN`)Y97YjE}pj=%l1)!-ZuoE`YTmASPB=U@#VM799) z%X3I@*orJ4o^%kz`GXo9ti-CqIV?DAMV1d%ZdKttRB-%l3@g2=aBdPD_C(8v-{xF- z3V4)@h#MRF?%=ck*8`Fg0|n#0%T-mW>Vj4m5U;xH)lCRq9_xaGchS0FbEmEQ?!Ot= z1)B5n+;{JeUKbRfwO9T6K<<^ns#O2}VGmw?r7==4P4I4H<_*c!Fa$GZrxqC%sZQZp zgsLPwO~#l$2LQZCIso8Z)Byl)vktuDI_$tZFVqeIa3y!(9d~*M-f<~-;2p=i=)1)O KQ1_y8)%HJHKKqma diff --git a/src/lib/libgdiplus.a b/src/lib/libgdiplus.a deleted file mode 100644 index 59741a15157d20019fbf7c40f424dac93ecea847..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 493572 zcmeFa4SZckbuT(PlI4)5kcJSxK`}`PAsAb>WjRe#S(0Td*p9HAIHYOpBWX)I$@x&v z*>dcZo99wqE>KH$P%B5V&O(~_6Qrc2VDW#NBO5v_G zv-f<@oEf9%``h-MpVv9^UTbFWnfdRv*Q~W>_LVo*yNjzgUHse;^|O7)w(aoQwr6Z) zWE*A4-y!yApPcN7`^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