[SDK][INCLUDE] Formatting gdiplus headers (#2190)

Just code formatting. CORE-16585
$ clang-format -style=file -i sdk/include/psdk/gdiplus[a-z]*
This commit is contained in:
Katayama Hirofumi MZ 2019-12-29 23:21:05 +09:00 committed by GitHub
parent 8faf38ed22
commit e7814f19fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 6651 additions and 5056 deletions

View file

@ -19,24 +19,29 @@
#ifndef _GDIPLUSBASE_H #ifndef _GDIPLUSBASE_H
#define _GDIPLUSBASE_H #define _GDIPLUSBASE_H
class GdiplusBase { class GdiplusBase
public: {
void operator delete(void *in_pVoid) public:
void
operator delete(void *in_pVoid)
{ {
DllExports::GdipFree(in_pVoid); DllExports::GdipFree(in_pVoid);
} }
void operator delete[](void *in_pVoid) void
operator delete[](void *in_pVoid)
{ {
DllExports::GdipFree(in_pVoid); DllExports::GdipFree(in_pVoid);
} }
void *operator new(size_t in_size) void *
operator new(size_t in_size)
{ {
return DllExports::GdipAlloc(in_size); return DllExports::GdipAlloc(in_size);
} }
void *operator new[](size_t in_size) void *
operator new[](size_t in_size)
{ {
return DllExports::GdipAlloc(in_size); return DllExports::GdipAlloc(in_size);
} }

View file

@ -23,7 +23,7 @@ class Image;
class Brush : public GdiplusBase class Brush : public GdiplusBase
{ {
public: public:
friend class Graphics; friend class Graphics;
friend class Pen; friend class Pen;
@ -44,11 +44,12 @@ public:
return type; return type;
} }
private: private:
mutable Status status; mutable Status status;
GpBrush *brush; GpBrush *brush;
Status SetStatus(Status status) const Status
SetStatus(Status status) const
{ {
if (status == Ok) if (status == Ok)
return status; return status;
@ -57,20 +58,21 @@ private:
} }
}; };
class HatchBrush : public Brush class HatchBrush : public Brush
{ {
public: public:
HatchBrush(HatchStyle hatchStyle, const Color &foreColor, const Color &backColor) HatchBrush(HatchStyle hatchStyle, const Color &foreColor, const Color &backColor)
{ {
} }
Status GetBackgroundColor(Color *color) const Status
GetBackgroundColor(Color *color) const
{ {
return NotImplemented; return NotImplemented;
} }
Status GetForegroundColor(Color *color) const Status
GetForegroundColor(Color *color) const
{ {
return NotImplemented; return NotImplemented;
} }
@ -81,10 +83,9 @@ public:
} }
}; };
class LinearGradientBrush : public Brush class LinearGradientBrush : public Brush
{ {
public: public:
LinearGradientBrush(const PointF &point1, const PointF &point2, const Color &color1, const Color &color2) LinearGradientBrush(const PointF &point1, const PointF &point2, const Color &color1, const Color &color2)
{ {
} }
@ -109,7 +110,8 @@ public:
{ {
} }
Status GetBlend(REAL *blendFactors, REAL *blendPositions, INT count) Status
GetBlend(REAL *blendFactors, REAL *blendPositions, INT count)
{ {
return NotImplemented; return NotImplemented;
} }
@ -129,27 +131,32 @@ public:
return 0; return 0;
} }
Status GetInterpolationColors(Color *presetColors, REAL *blendPositions, INT count) const Status
GetInterpolationColors(Color *presetColors, REAL *blendPositions, INT count) const
{ {
return NotImplemented; return NotImplemented;
} }
Status GetLinearColors(Color* colors) const Status
GetLinearColors(Color *colors) const
{ {
return NotImplemented; return NotImplemented;
} }
Status GetRectangle(Rect *rect) const Status
GetRectangle(Rect *rect) const
{ {
return NotImplemented; return NotImplemented;
} }
Status GetRectangle(RectF* rect) const Status
GetRectangle(RectF *rect) const
{ {
return NotImplemented; return NotImplemented;
} }
Status GetTransform(Matrix* matrix) const Status
GetTransform(Matrix *matrix) const
{ {
return NotImplemented; return NotImplemented;
} }
@ -159,7 +166,8 @@ public:
return WrapModeTile; return WrapModeTile;
} }
Status MultiplyTransform(const Matrix *matrix, MatrixOrder order) Status
MultiplyTransform(const Matrix *matrix, MatrixOrder order)
{ {
return NotImplemented; return NotImplemented;
} }
@ -169,85 +177,96 @@ public:
return NotImplemented; return NotImplemented;
} }
Status RotateTransform(REAL angle, MatrixOrder order) Status
RotateTransform(REAL angle, MatrixOrder order)
{ {
return NotImplemented; return NotImplemented;
} }
Status ScaleTransform(REAL sx, REAL sy, MatrixOrder order) Status
ScaleTransform(REAL sx, REAL sy, MatrixOrder order)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetBlend(const REAL *blendFactors, const REAL *blendPositions, INT count) Status
SetBlend(const REAL *blendFactors, const REAL *blendPositions, INT count)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetBlendBellShape(REAL focus, REAL scale) Status
SetBlendBellShape(REAL focus, REAL scale)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetBlendTriangularShape(REAL focus, REAL scale) Status
SetBlendTriangularShape(REAL focus, REAL scale)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetGammaCorrection(BOOL useGammaCorrection) Status
SetGammaCorrection(BOOL useGammaCorrection)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetInterpolationColors(const Color *presetColors, const REAL *blendPositions, INT count) Status
SetInterpolationColors(const Color *presetColors, const REAL *blendPositions, INT count)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetLinearColors(const Color& color1, const Color& color2) Status
SetLinearColors(const Color &color1, const Color &color2)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetTransform(const Matrix* matrix) Status
SetTransform(const Matrix *matrix)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetWrapMode(WrapMode wrapMode) Status
SetWrapMode(WrapMode wrapMode)
{ {
return NotImplemented; return NotImplemented;
} }
Status TranslateTransform(REAL dx, REAL dy, MatrixOrder order) Status
TranslateTransform(REAL dx, REAL dy, MatrixOrder order)
{ {
return NotImplemented; return NotImplemented;
} }
}; };
class SolidBrush : Brush class SolidBrush : Brush
{ {
public: public:
SolidBrush(const Color &color) SolidBrush(const Color &color)
{ {
} }
Status GetColor(Color *color) const Status
GetColor(Color *color) const
{ {
return NotImplemented; return NotImplemented;
} }
Status SetColor(const Color &color) Status
SetColor(const Color &color)
{ {
return NotImplemented; return NotImplemented;
} }
}; };
class TextureBrush : Brush class TextureBrush : Brush
{ {
public: public:
TextureBrush(Image *image, WrapMode wrapMode, const RectF &dstRect) TextureBrush(Image *image, WrapMode wrapMode, const RectF &dstRect)
{ {
} }
@ -281,7 +300,8 @@ public:
return NULL; return NULL;
} }
Status GetTransform(Matrix *matrix) const Status
GetTransform(Matrix *matrix) const
{ {
return NotImplemented; return NotImplemented;
} }
@ -291,7 +311,8 @@ public:
return WrapModeTile; return WrapModeTile;
} }
Status MultiplyTransform(Matrix *matrix, MatrixOrder order) Status
MultiplyTransform(Matrix *matrix, MatrixOrder order)
{ {
return NotImplemented; return NotImplemented;
} }
@ -301,27 +322,32 @@ public:
return NotImplemented; return NotImplemented;
} }
Status RotateTransform(REAL angle, MatrixOrder order) Status
RotateTransform(REAL angle, MatrixOrder order)
{ {
return NotImplemented; return NotImplemented;
} }
Status ScaleTransform(REAL sx, REAL sy, MatrixOrder order) Status
ScaleTransform(REAL sx, REAL sy, MatrixOrder order)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetTransform(const Matrix *matrix) Status
SetTransform(const Matrix *matrix)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetWrapMode(WrapMode wrapMode) Status
SetWrapMode(WrapMode wrapMode)
{ {
return NotImplemented; return NotImplemented;
} }
Status TranslateTransform(REAL dx, REAL dy, MatrixOrder order) Status
TranslateTransform(REAL dx, REAL dy, MatrixOrder order)
{ {
return NotImplemented; return NotImplemented;
} }

View file

@ -33,7 +33,7 @@ enum ColorChannelFlags
class Color class Color
{ {
public: public:
Color(VOID) Color(VOID)
{ {
Argb = 0xff000000; Argb = 0xff000000;
@ -99,17 +99,20 @@ public:
return Argb; return Argb;
} }
static ARGB MakeARGB(BYTE a, BYTE r, BYTE g, BYTE b) static ARGB
MakeARGB(BYTE a, BYTE r, BYTE g, BYTE b)
{ {
return a << 24 | r << 16 | g << 8 | b; return a << 24 | r << 16 | g << 8 | b;
} }
VOID SetFromCOLORREF(COLORREF rgb) VOID
SetFromCOLORREF(COLORREF rgb)
{ {
Argb = 0xff000000 | (rgb & 0x000000ff) << 16 | (rgb & 0x0000ff00) | (rgb & 0x00ff0000) >> 16; Argb = 0xff000000 | (rgb & 0x000000ff) << 16 | (rgb & 0x0000ff00) | (rgb & 0x00ff0000) >> 16;
} }
VOID SetValue(ARGB argb) VOID
SetValue(ARGB argb)
{ {
Argb = argb; Argb = argb;
} }
@ -119,7 +122,7 @@ public:
return (Argb & 0x000000ff) << 16 | (Argb & 0x0000ff00) | (Argb & 0x00ff0000) >> 16; return (Argb & 0x000000ff) << 16 | (Argb & 0x0000ff00) | (Argb & 0x00ff0000) >> 16;
} }
protected: protected:
ARGB Argb; ARGB Argb;
}; };

View file

@ -19,59 +19,67 @@
#ifndef _GDIPLUSEFFECTS_H #ifndef _GDIPLUSEFFECTS_H
#define _GDIPLUSEFFECTS_H #define _GDIPLUSEFFECTS_H
typedef struct { typedef struct
{
float radius; float radius;
BOOL expandEdge; BOOL expandEdge;
} BlurParams; } BlurParams;
typedef struct { typedef struct
{
INT brightnessLevel; INT brightnessLevel;
INT contrastLevel; INT contrastLevel;
} BrightnessContrastParams; } BrightnessContrastParams;
typedef struct { typedef struct
{
INT cyanRed; INT cyanRed;
INT magentaGreen; INT magentaGreen;
INT yellowBlue; INT yellowBlue;
} ColorBalanceParams; } ColorBalanceParams;
typedef struct { typedef struct
{
CurveAdjustments adjustment; CurveAdjustments adjustment;
CurveChannel channel; CurveChannel channel;
INT adjustValue; INT adjustValue;
} ColorCurveParams; } ColorCurveParams;
typedef struct { typedef struct
{
INT hueLevel; INT hueLevel;
INT saturationLevel; INT saturationLevel;
INT lightnessLevel; INT lightnessLevel;
} HueSaturationLightnessParams; } HueSaturationLightnessParams;
typedef struct { typedef struct
{
INT highlight; INT highlight;
INT midtone; INT midtone;
INT shadow; INT shadow;
} LevelsParams; } LevelsParams;
typedef struct { typedef struct
{
UINT numberOfAreas; UINT numberOfAreas;
RECT *areas; RECT *areas;
} RedEyeCorrectionParams; } RedEyeCorrectionParams;
typedef struct { typedef struct
{
REAL radius; REAL radius;
REAL amount; REAL amount;
} SharpenParams; } SharpenParams;
typedef struct { typedef struct
{
INT hue; INT hue;
INT amount; INT amount;
} TintParams; } TintParams;
class Effect class Effect
{ {
public: public:
Effect(VOID) Effect(VOID)
{ {
} }
@ -86,144 +94,153 @@ public:
return 0; return 0;
} }
Status GetParameterSize(UINT *size) Status
GetParameterSize(UINT *size)
{ {
return NotImplemented; return NotImplemented;
} }
VOID UseAuxData(const BOOL useAuxDataFlag) VOID
UseAuxData(const BOOL useAuxDataFlag)
{ {
} }
}; };
class Blur : public Effect class Blur : public Effect
{ {
public: public:
Blur(VOID) Blur(VOID)
{ {
} }
Status GetParameters(UINT *size, BlurParams *parameters) Status
GetParameters(UINT *size, BlurParams *parameters)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetParameters(const BlurParams *parameters) Status
SetParameters(const BlurParams *parameters)
{ {
return NotImplemented; return NotImplemented;
} }
}; };
class BrightnessContrast : public Effect class BrightnessContrast : public Effect
{ {
public: public:
BrightnessContrast(VOID) BrightnessContrast(VOID)
{ {
} }
Status GetParameters(UINT *size, BrightnessContrastParams *parameters) Status
GetParameters(UINT *size, BrightnessContrastParams *parameters)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetParameters(const BrightnessContrastParams *parameters) Status
SetParameters(const BrightnessContrastParams *parameters)
{ {
return NotImplemented; return NotImplemented;
} }
}; };
class ColorBalance : public Effect class ColorBalance : public Effect
{ {
public: public:
ColorBalance(VOID) ColorBalance(VOID)
{ {
} }
Status GetParameters(UINT *size, ColorBalanceParams *parameters) Status
GetParameters(UINT *size, ColorBalanceParams *parameters)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetParameters(ColorBalanceParams *parameters) Status
SetParameters(ColorBalanceParams *parameters)
{ {
return NotImplemented; return NotImplemented;
} }
}; };
class ColorCurve : public Effect class ColorCurve : public Effect
{ {
public: public:
ColorCurve(VOID) ColorCurve(VOID)
{ {
} }
Status GetParameters(UINT *size, ColorCurveParams *parameters) Status
GetParameters(UINT *size, ColorCurveParams *parameters)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetParameters(const ColorCurveParams *parameters) Status
SetParameters(const ColorCurveParams *parameters)
{ {
return NotImplemented; return NotImplemented;
} }
}; };
class ColorMatrixEffect : public Effect class ColorMatrixEffect : public Effect
{ {
public: public:
ColorMatrixEffect(VOID) ColorMatrixEffect(VOID)
{ {
} }
Status GetParameters(UINT *size, ColorMatrix *matrix) Status
GetParameters(UINT *size, ColorMatrix *matrix)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetParameters(const ColorMatrix *matrix) Status
SetParameters(const ColorMatrix *matrix)
{ {
return NotImplemented; return NotImplemented;
} }
}; };
class HueSaturationLightness : public Effect class HueSaturationLightness : public Effect
{ {
public: public:
HueSaturationLightness(VOID) HueSaturationLightness(VOID)
{ {
} }
Status GetParameters(UINT *size, HueSaturationLightnessParams *parameters) Status
GetParameters(UINT *size, HueSaturationLightnessParams *parameters)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetParameters(const HueSaturationLightnessParams *parameters) Status
SetParameters(const HueSaturationLightnessParams *parameters)
{ {
return NotImplemented; return NotImplemented;
} }
}; };
class Levels : public Effect class Levels : public Effect
{ {
public: public:
Levels(VOID) Levels(VOID)
{ {
} }
Status GetParameters(UINT *size, LevelsParams *parameters) Status
GetParameters(UINT *size, LevelsParams *parameters)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetParameters(const LevelsParams *parameters) Status
SetParameters(const LevelsParams *parameters)
{ {
return NotImplemented; return NotImplemented;
} }
@ -231,55 +248,59 @@ public:
class RedEyeCorrection : public Effect class RedEyeCorrection : public Effect
{ {
public: public:
RedEyeCorrection(VOID) RedEyeCorrection(VOID)
{ {
} }
Status GetParameters(UINT *size, RedEyeCorrectionParams *parameters) Status
GetParameters(UINT *size, RedEyeCorrectionParams *parameters)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetParameters(const RedEyeCorrectionParams *parameters) Status
SetParameters(const RedEyeCorrectionParams *parameters)
{ {
return NotImplemented; return NotImplemented;
} }
}; };
class Sharpen class Sharpen
{ {
public: public:
Sharpen(VOID) Sharpen(VOID)
{ {
} }
Status GetParameters(UINT *size, SharpenParams *parameters) Status
GetParameters(UINT *size, SharpenParams *parameters)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetParameters(const SharpenParams *parameters) Status
SetParameters(const SharpenParams *parameters)
{ {
return NotImplemented; return NotImplemented;
} }
}; };
class Tint : Effect class Tint : Effect
{ {
public: public:
Tint(VOID) Tint(VOID)
{ {
} }
Status GetParameters(UINT *size, TintParams *parameters) Status
GetParameters(UINT *size, TintParams *parameters)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetParameters(const TintParams *parameters) Status
SetParameters(const TintParams *parameters)
{ {
return NotImplemented; return NotImplemented;
} }

View file

@ -79,7 +79,8 @@ enum CustomLineCapType
CustomLineCapTypeAdjustableArrow = 1 CustomLineCapTypeAdjustableArrow = 1
}; };
enum PathPointType{ enum PathPointType
{
PathPointTypeStart = 0, /* start of a figure */ PathPointTypeStart = 0, /* start of a figure */
PathPointTypeLine = 1, PathPointTypeLine = 1,
PathPointTypeBezier = 3, PathPointTypeBezier = 3,
@ -195,7 +196,8 @@ enum ImageType
ImageTypeMetafile ImageTypeMetafile
}; };
enum WarpMode { enum WarpMode
{
WarpModePerspective, WarpModePerspective,
WarpModeBilinear WarpModeBilinear
}; };
@ -447,9 +449,10 @@ enum HatchStyle
#define GDIP_EMFPLUS_RECORD_BASE 0x00004000 #define GDIP_EMFPLUS_RECORD_BASE 0x00004000
#define GDIP_WMF_RECORD_BASE 0x00010000 #define GDIP_WMF_RECORD_BASE 0x00010000
#define GDIP_WMF_RECORD_TO_EMFPLUS(x) ((x)|GDIP_WMF_RECORD_BASE) #define GDIP_WMF_RECORD_TO_EMFPLUS(x) ((x) | GDIP_WMF_RECORD_BASE)
enum EmfPlusRecordType { enum EmfPlusRecordType
{
WmfRecordTypeSetBkColor = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETBKCOLOR), WmfRecordTypeSetBkColor = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETBKCOLOR),
WmfRecordTypeSetBkMode = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETBKMODE), WmfRecordTypeSetBkMode = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETBKMODE),
WmfRecordTypeSetMapMode = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETMAPMODE), WmfRecordTypeSetMapMode = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETMAPMODE),
@ -713,7 +716,7 @@ enum EmfPlusRecordType {
EmfPlusRecordTypeSetTSGraphics, EmfPlusRecordTypeSetTSGraphics,
EmfPlusRecordTypeSetTSClip, EmfPlusRecordTypeSetTSClip,
EmfPlusRecordTotal, EmfPlusRecordTotal,
EmfPlusRecordTypeMax = EmfPlusRecordTotal-1, EmfPlusRecordTypeMax = EmfPlusRecordTotal - 1,
EmfPlusRecordTypeMin = EmfPlusRecordTypeHeader EmfPlusRecordTypeMin = EmfPlusRecordTypeHeader
}; };
@ -767,6 +770,6 @@ typedef enum EmfPlusRecordType EmfPlusRecordType;
#endif /* end of c typedefs */ #endif /* end of c typedefs */
#undef GDIP_WMF_RECORD_TO_EMFPLUS #undef GDIP_WMF_RECORD_TO_EMFPLUS
#define GDIP_WMF_RECORD_TO_EMFPLUS(x) ((EmfPlusRecordType)((x)|GDIP_WMF_RECORD_BASE)) #define GDIP_WMF_RECORD_TO_EMFPLUS(x) ((EmfPlusRecordType)((x) | GDIP_WMF_RECORD_BASE))
#endif #endif

File diff suppressed because it is too large Load diff

View file

@ -21,30 +21,78 @@
#ifdef __cplusplus #ifdef __cplusplus
class GpGraphics {}; class GpGraphics
class GpPen {}; {
class GpBrush {}; };
class GpHatch : public GpBrush {}; class GpPen
class GpSolidFill : public GpBrush {}; {
class GpPath {}; };
class GpMatrix {}; class GpBrush
class GpPathIterator {}; {
class GpCustomLineCap {}; };
class GpAdjustableArrowCap : public GpCustomLineCap {}; class GpHatch : public GpBrush
class GpImage {}; {
class GpMetafile : public GpImage {}; };
class GpImageAttributes {}; class GpSolidFill : public GpBrush
class GpCachedBitmap {}; {
class GpBitmap : public GpImage {}; };
class GpPathGradient : public GpBrush {}; class GpPath
class GpLineGradient : public GpBrush {}; {
class GpTexture : public GpBrush {}; };
class GpFont {}; class GpMatrix
class GpFontCollection {}; {
class GpFontFamily {}; };
class GpStringFormat {}; class GpPathIterator
class GpRegion {}; {
class CGpEffect {}; };
class GpCustomLineCap
{
};
class GpAdjustableArrowCap : public GpCustomLineCap
{
};
class GpImage
{
};
class GpMetafile : public GpImage
{
};
class GpImageAttributes
{
};
class GpCachedBitmap
{
};
class GpBitmap : public GpImage
{
};
class GpPathGradient : public GpBrush
{
};
class GpLineGradient : public GpBrush
{
};
class GpTexture : public GpBrush
{
};
class GpFont
{
};
class GpFontCollection
{
};
class GpFontFamily
{
};
class GpStringFormat
{
};
class GpRegion
{
};
class CGpEffect
{
};
#else /* end of c++ declarations */ #else /* end of c++ declarations */

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -21,7 +21,7 @@
class ImageAttributes : public GdiplusBase class ImageAttributes : public GdiplusBase
{ {
public: public:
ImageAttributes(VOID) ImageAttributes(VOID)
{ {
} }
@ -31,47 +31,56 @@ public:
return NotImplemented; return NotImplemented;
} }
Status ClearColorKey(ColorAdjustType type) Status
ClearColorKey(ColorAdjustType type)
{ {
return NotImplemented; return NotImplemented;
} }
Status ClearColorMatrices(ColorAdjustType type) Status
ClearColorMatrices(ColorAdjustType type)
{ {
return NotImplemented; return NotImplemented;
} }
Status ClearColorMatrix(ColorAdjustType type) Status
ClearColorMatrix(ColorAdjustType type)
{ {
return NotImplemented; return NotImplemented;
} }
Status ClearGamma(ColorAdjustType type) Status
ClearGamma(ColorAdjustType type)
{ {
return NotImplemented; return NotImplemented;
} }
Status ClearNoOp(ColorAdjustType type) Status
ClearNoOp(ColorAdjustType type)
{ {
return NotImplemented; return NotImplemented;
} }
Status ClearOutputChannel(ColorAdjustType type) Status
ClearOutputChannel(ColorAdjustType type)
{ {
return NotImplemented; return NotImplemented;
} }
Status ClearOutputChannelColorProfile(ColorAdjustType type) Status
ClearOutputChannelColorProfile(ColorAdjustType type)
{ {
return NotImplemented; return NotImplemented;
} }
Status ClearRemapTable(ColorAdjustType type) Status
ClearRemapTable(ColorAdjustType type)
{ {
return NotImplemented; return NotImplemented;
} }
Status ClearThreshold(ColorAdjustType type) Status
ClearThreshold(ColorAdjustType type)
{ {
return NotImplemented; return NotImplemented;
} }
@ -81,7 +90,8 @@ public:
return NULL; return NULL;
} }
Status GetAdjustedPalette(ColorPalette *colorPalette, ColorPalette colorAdjustType) Status
GetAdjustedPalette(ColorPalette *colorPalette, ColorPalette colorAdjustType)
{ {
return NotImplemented; return NotImplemented;
} }
@ -91,67 +101,84 @@ public:
return NotImplemented; return NotImplemented;
} }
Status Reset(ColorAdjustType type) Status
Reset(ColorAdjustType type)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetBrushRemapTable(UINT mapSize, ColorMap *map) Status
SetBrushRemapTable(UINT mapSize, ColorMap *map)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetColorKey(const Color &colorLow, const Color &colorHigh, ColorAdjustType type) Status
SetColorKey(const Color &colorLow, const Color &colorHigh, ColorAdjustType type)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetColorMatrices(const ColorMatrix *colorMatrix, const ColorMatrix *grayMatrix, ColorMatrixFlags mode, ColorAdjustType type) Status
SetColorMatrices(
const ColorMatrix *colorMatrix,
const ColorMatrix *grayMatrix,
ColorMatrixFlags mode,
ColorAdjustType type)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetColorMatrix(const ColorMatrix *colorMatrix, ColorMatrixFlags mode, ColorAdjustType type) Status
SetColorMatrix(const ColorMatrix *colorMatrix, ColorMatrixFlags mode, ColorAdjustType type)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetGamma(REAL gamma, ColorAdjustType type) Status
SetGamma(REAL gamma, ColorAdjustType type)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetNoOp(ColorAdjustType type) Status
SetNoOp(ColorAdjustType type)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetOutputChannel(ColorChannelFlags channelFlags, ColorAdjustType type) Status
SetOutputChannel(ColorChannelFlags channelFlags, ColorAdjustType type)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetOutputChannelColorProfile(const WCHAR *colorProfileFilename, ColorAdjustType type) Status
SetOutputChannelColorProfile(const WCHAR *colorProfileFilename, ColorAdjustType type)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetRemapTable(UINT mapSize, const ColorMap *map, ColorAdjustType type) Status
SetRemapTable(UINT mapSize, const ColorMap *map, ColorAdjustType type)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetThreshold(REAL threshold, ColorAdjustType type) Status
SetThreshold(REAL threshold, ColorAdjustType type)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetToIdentity(ColorAdjustType type) Status
SetToIdentity(ColorAdjustType type)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetWrapMode(WrapMode wrap, const Color &color, BOOL clamp) Status
SetWrapMode(WrapMode wrap, const Color &color, BOOL clamp)
{ {
return NotImplemented; return NotImplemented;
} }

View file

@ -72,68 +72,68 @@ enum RotateFlipType
#ifdef __cplusplus #ifdef __cplusplus
class EncoderParameter class EncoderParameter
{ {
public: public:
GUID Guid; GUID Guid;
ULONG NumberOfValues; ULONG NumberOfValues;
ULONG Type; ULONG Type;
VOID* Value; VOID *Value;
}; };
class EncoderParameters class EncoderParameters
{ {
public: public:
UINT Count; UINT Count;
EncoderParameter Parameter[1]; EncoderParameter Parameter[1];
}; };
class ImageCodecInfo class ImageCodecInfo
{ {
public: public:
CLSID Clsid; CLSID Clsid;
GUID FormatID; GUID FormatID;
const WCHAR* CodecName; const WCHAR *CodecName;
const WCHAR* DllName; const WCHAR *DllName;
const WCHAR* FormatDescription; const WCHAR *FormatDescription;
const WCHAR* FilenameExtension; const WCHAR *FilenameExtension;
const WCHAR* MimeType; const WCHAR *MimeType;
DWORD Flags; DWORD Flags;
DWORD Version; DWORD Version;
DWORD SigCount; DWORD SigCount;
DWORD SigSize; DWORD SigSize;
const BYTE* SigPattern; const BYTE *SigPattern;
const BYTE* SigMask; const BYTE *SigMask;
}; };
class BitmapData class BitmapData
{ {
public: public:
UINT Width; UINT Width;
UINT Height; UINT Height;
INT Stride; INT Stride;
Gdiplus::PixelFormat PixelFormat; Gdiplus::PixelFormat PixelFormat;
VOID* Scan0; VOID *Scan0;
UINT_PTR Reserved; UINT_PTR Reserved;
}; };
class ImageItemData class ImageItemData
{ {
public: public:
UINT Size; UINT Size;
UINT Position; UINT Position;
VOID* Desc; VOID *Desc;
UINT DescSize; UINT DescSize;
VOID* Data; VOID *Data;
UINT DataSize; UINT DataSize;
UINT Cookie; UINT Cookie;
}; };
class PropertyItem class PropertyItem
{ {
public: public:
PROPID id; PROPID id;
ULONG length; ULONG length;
WORD type; WORD type;
VOID* value; VOID *value;
}; };
#else /* end of c++ typedefs */ #else /* end of c++ typedefs */
@ -146,7 +146,7 @@ typedef struct EncoderParameter
GUID Guid; GUID Guid;
ULONG NumberOfValues; ULONG NumberOfValues;
ULONG Type; ULONG Type;
VOID* Value; VOID *Value;
} EncoderParameter; } EncoderParameter;
typedef struct EncoderParameters typedef struct EncoderParameters
@ -159,17 +159,17 @@ typedef struct ImageCodecInfo
{ {
CLSID Clsid; CLSID Clsid;
GUID FormatID; GUID FormatID;
const WCHAR* CodecName; const WCHAR *CodecName;
const WCHAR* DllName; const WCHAR *DllName;
const WCHAR* FormatDescription; const WCHAR *FormatDescription;
const WCHAR* FilenameExtension; const WCHAR *FilenameExtension;
const WCHAR* MimeType; const WCHAR *MimeType;
DWORD Flags; DWORD Flags;
DWORD Version; DWORD Version;
DWORD SigCount; DWORD SigCount;
DWORD SigSize; DWORD SigSize;
const BYTE* SigPattern; const BYTE *SigPattern;
const BYTE* SigMask; const BYTE *SigMask;
} ImageCodecInfo; } ImageCodecInfo;
typedef struct BitmapData typedef struct BitmapData
@ -178,7 +178,7 @@ typedef struct BitmapData
UINT Height; UINT Height;
INT Stride; INT Stride;
PixelFormat PixelFormat; PixelFormat PixelFormat;
VOID* Scan0; VOID *Scan0;
UINT_PTR Reserved; /* undocumented: stores the lock mode */ UINT_PTR Reserved; /* undocumented: stores the lock mode */
} BitmapData; } BitmapData;
@ -186,9 +186,9 @@ typedef struct ImageItemData
{ {
UINT Size; UINT Size;
UINT Position; UINT Position;
VOID* Desc; VOID *Desc;
UINT DescSize; UINT DescSize;
VOID* Data; VOID *Data;
UINT DataSize; UINT DataSize;
UINT Cookie; UINT Cookie;
} ImageItemData; } ImageItemData;
@ -198,7 +198,7 @@ typedef struct PropertyItem
PROPID id; PROPID id;
ULONG length; ULONG length;
WORD type; WORD type;
VOID* value; VOID *value;
} PropertyItem; } PropertyItem;
#endif /* end of c typedefs */ #endif /* end of c typedefs */

View file

@ -25,9 +25,9 @@ enum DebugEventLevel
DebugEventLevelWarning DebugEventLevelWarning
}; };
typedef VOID (WINAPI *DebugEventProc)(enum DebugEventLevel, CHAR *); typedef VOID(WINAPI *DebugEventProc)(enum DebugEventLevel, CHAR *);
typedef Status (WINAPI *NotificationHookProc)(ULONG_PTR *); typedef Status(WINAPI *NotificationHookProc)(ULONG_PTR *);
typedef void (WINAPI *NotificationUnhookProc)(ULONG_PTR); typedef void(WINAPI *NotificationUnhookProc)(ULONG_PTR);
struct GdiplusStartupInput struct GdiplusStartupInput
{ {
@ -37,7 +37,8 @@ struct GdiplusStartupInput
BOOL SuppressExternalCodecs; BOOL SuppressExternalCodecs;
#ifdef __cplusplus #ifdef __cplusplus
GdiplusStartupInput(DebugEventProc debugEventCallback = NULL, GdiplusStartupInput(
DebugEventProc debugEventCallback = NULL,
BOOL suppressBackgroundThread = FALSE, BOOL suppressBackgroundThread = FALSE,
BOOL suppressExternalCodecs = FALSE) BOOL suppressExternalCodecs = FALSE)
{ {
@ -56,11 +57,13 @@ struct GdiplusStartupOutput
}; };
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C"
{
#endif #endif
Status WINAPI GdiplusStartup(ULONG_PTR *, const struct GdiplusStartupInput *, struct GdiplusStartupOutput *); Status WINAPI
void WINAPI GdiplusShutdown(ULONG_PTR); GdiplusStartup(ULONG_PTR *, const struct GdiplusStartupInput *, struct GdiplusStartupOutput *);
void WINAPI GdiplusShutdown(ULONG_PTR);
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -19,32 +19,30 @@
#ifndef _GDIPLUSLINECAPS_H #ifndef _GDIPLUSLINECAPS_H
#define _GDIPLUSLINECAPS_H #define _GDIPLUSLINECAPS_H
inline inline CustomLineCap::CustomLineCap(
CustomLineCap::CustomLineCap(const GraphicsPath *fillPath, const GraphicsPath *fillPath,
const GraphicsPath *strokePath, LineCap baseCap, REAL baseInset) const GraphicsPath *strokePath,
LineCap baseCap,
REAL baseInset)
{ {
} }
inline CustomLineCap * inline CustomLineCap *CustomLineCap::Clone(VOID)
CustomLineCap::Clone(VOID)
{ {
return NULL; return NULL;
} }
inline LineCap inline LineCap CustomLineCap::GetBaseCap(VOID)
CustomLineCap::GetBaseCap(VOID)
{ {
return LineCapFlat; return LineCapFlat;
} }
inline REAL inline REAL CustomLineCap::GetBaseInset(VOID)
CustomLineCap::GetBaseInset(VOID)
{ {
return 0; return 0;
} }
inline Status inline Status CustomLineCap::GetLastStatus(VOID)
CustomLineCap::GetLastStatus(VOID)
{ {
return Ok; return Ok;
} }
@ -55,14 +53,12 @@ CustomLineCap::GetStrokeCaps(LineCap *startCap, LineCap *endCap)
return Ok; return Ok;
} }
inline LineJoin inline LineJoin CustomLineCap::GetStrokeJoin(VOID)
CustomLineCap::GetStrokeJoin(VOID)
{ {
return LineJoinMiter; return LineJoinMiter;
} }
inline REAL inline REAL CustomLineCap::GetWidthScale(VOID)
CustomLineCap::GetWidthScale(VOID)
{ {
return 0; return 0;
} }
@ -103,10 +99,9 @@ CustomLineCap::SetWidthScale(IN REAL widthScale)
return Ok; return Ok;
} }
class AdjustableArrowCap : public CustomLineCap class AdjustableArrowCap : public CustomLineCap
{ {
public: public:
AdjustableArrowCap(REAL height, REAL width, BOOL isFilled) AdjustableArrowCap(REAL height, REAL width, BOOL isFilled)
{ {
} }
@ -131,22 +126,26 @@ public:
return FALSE; return FALSE;
} }
Status SetFillState(BOOL isFilled) Status
SetFillState(BOOL isFilled)
{ {
return Ok; return Ok;
} }
Status SetHeight(REAL height) Status
SetHeight(REAL height)
{ {
return Ok; return Ok;
} }
Status SetMiddleInset(REAL middleInset) Status
SetMiddleInset(REAL middleInset)
{ {
return Ok; return Ok;
} }
Status SetWidth(REAL width) Status
SetWidth(REAL width)
{ {
return Ok; return Ok;
} }

View file

@ -24,7 +24,7 @@ class Matrix : public GdiplusBase
friend class Pen; friend class Pen;
friend class Region; friend class Region;
public: public:
Matrix(const RectF &rect, const PointF *dstplg) Matrix(const RectF &rect, const PointF *dstplg)
{ {
status = DllExports::GdipCreateMatrix3(&rect, dstplg, &matrix); status = DllExports::GdipCreateMatrix3(&rect, dstplg, &matrix);
@ -57,14 +57,16 @@ public:
DllExports::GdipDeleteMatrix(matrix); DllExports::GdipDeleteMatrix(matrix);
} }
BOOL Equals(const Matrix* matrix) BOOL
Equals(const Matrix *matrix)
{ {
BOOL result; BOOL result;
SetStatus(DllExports::GdipIsMatrixEqual(this->matrix, matrix ? matrix->matrix : NULL, &result)); SetStatus(DllExports::GdipIsMatrixEqual(this->matrix, matrix ? matrix->matrix : NULL, &result));
return result; return result;
} }
Status GetElements(REAL *m) const Status
GetElements(REAL *m) const
{ {
return SetStatus(DllExports::GdipGetMatrixElements(matrix, m)); return SetStatus(DllExports::GdipGetMatrixElements(matrix, m));
} }
@ -93,7 +95,8 @@ public:
return result; return result;
} }
Status Multiply(const Matrix *matrix, MatrixOrder order) Status
Multiply(const Matrix *matrix, MatrixOrder order)
{ {
return SetStatus(DllExports::GdipMultiplyMatrix(this->matrix, matrix ? matrix->matrix : NULL, order)); return SetStatus(DllExports::GdipMultiplyMatrix(this->matrix, matrix ? matrix->matrix : NULL, order));
} }
@ -113,61 +116,72 @@ public:
return NotImplemented; return NotImplemented;
} }
Status Rotate(REAL angle, MatrixOrder order) Status
Rotate(REAL angle, MatrixOrder order)
{ {
return SetStatus(DllExports::GdipRotateMatrix(matrix, angle, order)); return SetStatus(DllExports::GdipRotateMatrix(matrix, angle, order));
} }
Status RotateAt(REAL angle, const PointF &center, MatrixOrder order) Status
RotateAt(REAL angle, const PointF &center, MatrixOrder order)
{ {
return NotImplemented; return NotImplemented;
} }
Status Scale(REAL scaleX, REAL scaleY, MatrixOrder order) Status
Scale(REAL scaleX, REAL scaleY, MatrixOrder order)
{ {
return SetStatus(DllExports::GdipScaleMatrix(matrix, scaleX, scaleY, order)); return SetStatus(DllExports::GdipScaleMatrix(matrix, scaleX, scaleY, order));
} }
Status SetElements(REAL m11, REAL m12, REAL m21, REAL m22, REAL dx, REAL dy) Status
SetElements(REAL m11, REAL m12, REAL m21, REAL m22, REAL dx, REAL dy)
{ {
return SetStatus(DllExports::GdipSetMatrixElements(matrix, m11, m12, m21, m22, dx, dy)); return SetStatus(DllExports::GdipSetMatrixElements(matrix, m11, m12, m21, m22, dx, dy));
} }
Status Shear(REAL shearX, REAL shearY, MatrixOrder order) Status
Shear(REAL shearX, REAL shearY, MatrixOrder order)
{ {
return SetStatus(DllExports::GdipShearMatrix(matrix, shearX, shearY, order)); return SetStatus(DllExports::GdipShearMatrix(matrix, shearX, shearY, order));
} }
Status TransformPoints(Point *pts, INT count) Status
TransformPoints(Point *pts, INT count)
{ {
return SetStatus(DllExports::GdipTransformMatrixPointsI(matrix, pts, count)); return SetStatus(DllExports::GdipTransformMatrixPointsI(matrix, pts, count));
} }
Status TransformPoints(PointF *pts, INT count) Status
TransformPoints(PointF *pts, INT count)
{ {
return SetStatus(DllExports::GdipTransformMatrixPoints(matrix, pts, count)); return SetStatus(DllExports::GdipTransformMatrixPoints(matrix, pts, count));
} }
Status TransformVectors(Point *pts, INT count) Status
TransformVectors(Point *pts, INT count)
{ {
return SetStatus(DllExports::GdipVectorTransformMatrixPointsI(matrix, pts, count)); return SetStatus(DllExports::GdipVectorTransformMatrixPointsI(matrix, pts, count));
} }
Status TransformVectors(PointF *pts, INT count) Status
TransformVectors(PointF *pts, INT count)
{ {
return SetStatus(DllExports::GdipVectorTransformMatrixPoints(matrix, pts, count)); return SetStatus(DllExports::GdipVectorTransformMatrixPoints(matrix, pts, count));
} }
Status Translate(REAL offsetX, REAL offsetY, MatrixOrder order) Status
Translate(REAL offsetX, REAL offsetY, MatrixOrder order)
{ {
return SetStatus(DllExports::GdipTranslateMatrix(matrix, offsetX, offsetY, order)); return SetStatus(DllExports::GdipTranslateMatrix(matrix, offsetX, offsetY, order));
} }
private: private:
mutable Status status; mutable Status status;
GpMatrix *matrix; GpMatrix *matrix;
Status SetStatus(Status status) const Status
SetStatus(Status status) const
{ {
if (status == Ok) if (status == Ok)
return status; return status;

View file

@ -22,11 +22,13 @@
#define WINGDIPAPI __stdcall #define WINGDIPAPI __stdcall
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C"
{
#endif #endif
void* WINGDIPAPI GdipAlloc(SIZE_T) __WINE_ALLOC_SIZE(1); void *WINGDIPAPI GdipAlloc(SIZE_T) __WINE_ALLOC_SIZE(1);
void WINGDIPAPI GdipFree(void*); void WINGDIPAPI
GdipFree(void *);
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -21,7 +21,7 @@
class Metafile : public Image class Metafile : public Image
{ {
public: public:
Metafile(HDC referenceHdc, EmfType type, const WCHAR *description) Metafile(HDC referenceHdc, EmfType type, const WCHAR *description)
{ {
} }
@ -30,7 +30,12 @@ public:
{ {
} }
Metafile(HDC referenceHdc, const RectF &frameRect, MetafileFrameUnit frameUnit, EmfType type, const WCHAR *description) Metafile(
HDC referenceHdc,
const RectF &frameRect,
MetafileFrameUnit frameUnit,
EmfType type,
const WCHAR *description)
{ {
} }
@ -38,11 +43,23 @@ public:
{ {
} }
Metafile(const WCHAR *fileName, HDC referenceHdc, const Rect &frameRect, MetafileFrameUnit frameUnit, EmfType type, const WCHAR *description) Metafile(
const WCHAR *fileName,
HDC referenceHdc,
const Rect &frameRect,
MetafileFrameUnit frameUnit,
EmfType type,
const WCHAR *description)
{ {
} }
Metafile(IStream *stream, HDC referenceHdc, const RectF &frameRect, MetafileFrameUnit frameUnit, EmfType type, const WCHAR *description) Metafile(
IStream *stream,
HDC referenceHdc,
const RectF &frameRect,
MetafileFrameUnit frameUnit,
EmfType type,
const WCHAR *description)
{ {
} }
@ -50,11 +67,23 @@ public:
{ {
} }
Metafile(IStream *stream, HDC referenceHdc, const Rect &frameRect, MetafileFrameUnit frameUnit, EmfType type, const WCHAR *description) Metafile(
IStream *stream,
HDC referenceHdc,
const Rect &frameRect,
MetafileFrameUnit frameUnit,
EmfType type,
const WCHAR *description)
{ {
} }
Metafile(const WCHAR *fileName, HDC referenceHdc, const RectF &frameRect, MetafileFrameUnit frameUnit, EmfType type, const WCHAR *description) Metafile(
const WCHAR *fileName,
HDC referenceHdc,
const RectF &frameRect,
MetafileFrameUnit frameUnit,
EmfType type,
const WCHAR *description)
{ {
} }
@ -70,11 +99,17 @@ public:
{ {
} }
Metafile(HDC referenceHdc, const Rect &frameRect, MetafileFrameUnit frameUnit, EmfType type, const WCHAR *description) Metafile(
HDC referenceHdc,
const Rect &frameRect,
MetafileFrameUnit frameUnit,
EmfType type,
const WCHAR *description)
{ {
} }
static UINT EmfToWmfBits(HENHMETAFILE hemf, UINT cbData16, LPBYTE pData16, INT iMapMode, EmfToWmfBitsFlags eFlags) static UINT
EmfToWmfBits(HENHMETAFILE hemf, UINT cbData16, LPBYTE pData16, INT iMapMode, EmfToWmfBitsFlags eFlags)
{ {
return 0; return 0;
} }
@ -89,37 +124,44 @@ public:
return NULL; return NULL;
} }
static Status GetMetafileHeader(const WCHAR *filename, MetafileHeader *header) static Status
GetMetafileHeader(const WCHAR *filename, MetafileHeader *header)
{ {
return NotImplemented; return NotImplemented;
} }
static Status GetMetafileHeader(HENHMETAFILE *hEmf, MetafileHeader *header) static Status
GetMetafileHeader(HENHMETAFILE *hEmf, MetafileHeader *header)
{ {
return NotImplemented; return NotImplemented;
} }
static Status GetMetafileHeader(HMETAFILE hWmf, const WmfPlaceableFileHeader *wmfPlaceableFileHeader, MetafileHeader *header) static Status
GetMetafileHeader(HMETAFILE hWmf, const WmfPlaceableFileHeader *wmfPlaceableFileHeader, MetafileHeader *header)
{ {
return NotImplemented; return NotImplemented;
} }
Status GetMetafileHeader(MetafileHeader *header) const Status
GetMetafileHeader(MetafileHeader *header) const
{ {
return NotImplemented; return NotImplemented;
} }
static Status GetMetafileHeader(IStream *stream, MetafileHeader *header) static Status
GetMetafileHeader(IStream *stream, MetafileHeader *header)
{ {
return NotImplemented; return NotImplemented;
} }
Status PlayRecord(EmfPlusRecordType recordType, UINT flags, UINT dataSize, const BYTE *data) Status
PlayRecord(EmfPlusRecordType recordType, UINT flags, UINT dataSize, const BYTE *data)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetDownLevelRasterizationLimit(UINT metafileRasterizationLimitDpi) Status
SetDownLevelRasterizationLimit(UINT metafileRasterizationLimitDpi)
{ {
return NotImplemented; return NotImplemented;
} }

View file

@ -65,7 +65,7 @@ typedef struct
#ifdef __cplusplus #ifdef __cplusplus
class MetafileHeader class MetafileHeader
{ {
public: public:
MetafileType Type; MetafileType Type;
UINT Size; UINT Size;
UINT Version; UINT Version;
@ -76,8 +76,7 @@ public:
INT Y; INT Y;
INT Width; INT Width;
INT Height; INT Height;
union union {
{
METAHEADER WmfHeader; METAHEADER WmfHeader;
ENHMETAHEADER3 EmfHeader; ENHMETAHEADER3 EmfHeader;
}; };
@ -85,20 +84,45 @@ public:
INT LogicalDpiX; INT LogicalDpiX;
INT LogicalDpiY; INT LogicalDpiY;
public: public:
MetafileType GetType() const { return Type; } MetafileType
GetType() const
{
return Type;
}
UINT GetMetafileSize() const { return Size; } UINT
GetMetafileSize() const
{
return Size;
}
UINT GetVersion() const { return Version; } UINT
GetVersion() const
{
return Version;
}
UINT GetEmfPlusFlags() const { return EmfPlusFlags; } UINT
GetEmfPlusFlags() const
{
return EmfPlusFlags;
}
REAL GetDpiX() const { return DpiX; } REAL
GetDpiX() const
{
return DpiX;
}
REAL GetDpiY() const { return DpiY; } REAL
GetDpiY() const
{
return DpiY;
}
VOID GetBounds (OUT Rect *r) const VOID
GetBounds(OUT Rect *r) const
{ {
r->X = X; r->X = X;
r->Y = Y; r->Y = Y;
@ -106,34 +130,62 @@ public:
r->Height = Height; r->Height = Height;
} }
BOOL IsWmf() const BOOL
IsWmf() const
{ {
return ((Type == MetafileTypeWmf) || (Type == MetafileTypeWmfPlaceable)); return ((Type == MetafileTypeWmf) || (Type == MetafileTypeWmfPlaceable));
} }
BOOL IsWmfPlaceable() const { return (Type == MetafileTypeWmfPlaceable); } BOOL
IsWmfPlaceable() const
{
return (Type == MetafileTypeWmfPlaceable);
}
BOOL IsEmf() const { return (Type == MetafileTypeEmf); } BOOL
IsEmf() const
{
return (Type == MetafileTypeEmf);
}
BOOL IsEmfOrEmfPlus() const { return (Type >= MetafileTypeEmf); } BOOL
IsEmfOrEmfPlus() const
{
return (Type >= MetafileTypeEmf);
}
BOOL IsEmfPlus() const { return (Type >= MetafileTypeEmfPlusOnly); } BOOL
IsEmfPlus() const
{
return (Type >= MetafileTypeEmfPlusOnly);
}
BOOL IsEmfPlusDual() const { return (Type == MetafileTypeEmfPlusDual); } BOOL
IsEmfPlusDual() const
{
return (Type == MetafileTypeEmfPlusDual);
}
BOOL IsEmfPlusOnly() const { return (Type == MetafileTypeEmfPlusOnly); } BOOL
IsEmfPlusOnly() const
{
return (Type == MetafileTypeEmfPlusOnly);
}
BOOL IsDisplay() const BOOL
IsDisplay() const
{ {
return IsEmfPlus() && ((EmfPlusFlags & GDIP_EMFPLUSFLAGS_DISPLAY) != 0); return IsEmfPlus() && ((EmfPlusFlags & GDIP_EMFPLUSFLAGS_DISPLAY) != 0);
} }
const METAHEADER * GetWmfHeader() const const METAHEADER *
GetWmfHeader() const
{ {
return IsWmf() ? &WmfHeader : NULL; return IsWmf() ? &WmfHeader : NULL;
} }
const ENHMETAHEADER3 * GetEmfHeader() const const ENHMETAHEADER3 *
GetEmfHeader() const
{ {
return IsEmfOrEmfPlus() ? &EmfHeader : NULL; return IsEmfOrEmfPlus() ? &EmfHeader : NULL;
} }
@ -152,8 +204,7 @@ typedef struct MetafileHeader
INT Y; INT Y;
INT Width; INT Width;
INT Height; INT Height;
union union {
{
METAHEADER WmfHeader; METAHEADER WmfHeader;
ENHMETAHEADER3 EmfHeader; ENHMETAHEADER3 EmfHeader;
} DUMMYUNIONNAME; } DUMMYUNIONNAME;

View file

@ -26,7 +26,7 @@ class GraphicsPath : public GdiplusBase
{ {
friend class Region; friend class Region;
public: public:
GraphicsPath(const Point *points, const BYTE *types, INT count, FillMode fillMode) GraphicsPath(const Point *points, const BYTE *types, INT count, FillMode fillMode)
{ {
} }
@ -39,227 +39,300 @@ public:
{ {
} }
Status AddArc(const Rect &rect, REAL startAngle, REAL sweepAngle) Status
AddArc(const Rect &rect, REAL startAngle, REAL sweepAngle)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddArc(const RectF &rect, REAL startAngle, REAL sweepAngle) Status
AddArc(const RectF &rect, REAL startAngle, REAL sweepAngle)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddArc(INT x, INT y, INT width, INT height, REAL startAngle, REAL sweepAngle) Status
AddArc(INT x, INT y, INT width, INT height, REAL startAngle, REAL sweepAngle)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddArc(REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle) Status
AddArc(REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddBezier(const Point &pt1, const Point &pt2, const Point &pt3, const Point &pt4) Status
AddBezier(const Point &pt1, const Point &pt2, const Point &pt3, const Point &pt4)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddBezier(REAL x1, REAL y1, REAL x2, REAL y2, REAL x3, REAL y3, REAL x4, REAL y4) Status
AddBezier(REAL x1, REAL y1, REAL x2, REAL y2, REAL x3, REAL y3, REAL x4, REAL y4)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddBezier(const PointF &pt1, const PointF &pt2, const PointF &pt3, const PointF &pt4) Status
AddBezier(const PointF &pt1, const PointF &pt2, const PointF &pt3, const PointF &pt4)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddBezier(INT x1, INT y1, INT x2, INT y2, INT x3, INT y3, INT x4, INT y4) Status
AddBezier(INT x1, INT y1, INT x2, INT y2, INT x3, INT y3, INT x4, INT y4)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddBeziers(const Point *points, INT count) Status
AddBeziers(const Point *points, INT count)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddBeziers(const PointF *points, INT count) Status
AddBeziers(const PointF *points, INT count)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddClosedCurve(const Point *points, INT count) Status
AddClosedCurve(const Point *points, INT count)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddClosedCurve(const Point *points, INT count, REAL tension) Status
AddClosedCurve(const Point *points, INT count, REAL tension)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddClosedCurve(const PointF *points, INT count, REAL tension) Status
AddClosedCurve(const PointF *points, INT count, REAL tension)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddClosedCurve(const PointF *points, INT count) Status
AddClosedCurve(const PointF *points, INT count)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddCurve(const Point *points, INT count) Status
AddCurve(const Point *points, INT count)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddCurve(const PointF *points, INT count, REAL tension) Status
AddCurve(const PointF *points, INT count, REAL tension)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddCurve(const PointF *points, INT count) Status
AddCurve(const PointF *points, INT count)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddCurve(const Point *points, INT count, INT offset, INT numberOfSegments, REAL tension) Status
AddCurve(const Point *points, INT count, INT offset, INT numberOfSegments, REAL tension)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddCurve(const Point *points, INT count, REAL tension) Status
AddCurve(const Point *points, INT count, REAL tension)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddCurve(const PointF *points, INT count, INT offset, INT numberOfSegments, REAL tension) Status
AddCurve(const PointF *points, INT count, INT offset, INT numberOfSegments, REAL tension)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddEllipse(const Rect &rect) Status
AddEllipse(const Rect &rect)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddEllipse(const RectF &rect) Status
AddEllipse(const RectF &rect)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddEllipse(INT x, INT y, INT width, INT height) Status
AddEllipse(INT x, INT y, INT width, INT height)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddEllipse(REAL x, REAL y, REAL width, REAL height) Status
AddEllipse(REAL x, REAL y, REAL width, REAL height)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddLine(const Point &pt1, const Point &pt2) Status
AddLine(const Point &pt1, const Point &pt2)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddLine(const PointF &pt1, const PointF &pt2) Status
AddLine(const PointF &pt1, const PointF &pt2)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddLine(REAL x1, REAL y1, REAL x2, REAL y2) Status
AddLine(REAL x1, REAL y1, REAL x2, REAL y2)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddLine(INT x1, INT y1, INT x2, INT y2) Status
AddLine(INT x1, INT y1, INT x2, INT y2)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddLines(const Point *points, INT count) Status
AddLines(const Point *points, INT count)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddLines(const PointF *points, INT count) Status
AddLines(const PointF *points, INT count)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddPath(const GraphicsPath *addingPath, BOOL connect) Status
AddPath(const GraphicsPath *addingPath, BOOL connect)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddPie(const Rect &rect, REAL startAngle, REAL sweepAngle) Status
AddPie(const Rect &rect, REAL startAngle, REAL sweepAngle)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddPie(INT x, INT y, INT width, INT height, REAL startAngle, REAL sweepAngle) Status
AddPie(INT x, INT y, INT width, INT height, REAL startAngle, REAL sweepAngle)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddPie(REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle) Status
AddPie(REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddPie(const RectF &rect, REAL startAngle, REAL sweepAngle) Status
AddPie(const RectF &rect, REAL startAngle, REAL sweepAngle)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddPolygon(const Point *points, INT count) Status
AddPolygon(const Point *points, INT count)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddPolygon(const PointF *points, INT count) Status
AddPolygon(const PointF *points, INT count)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddRectangle(const Rect &rect) Status
AddRectangle(const Rect &rect)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddRectangle(const RectF &rect) Status
AddRectangle(const RectF &rect)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddRectangles(const Rect *rects, INT count) Status
AddRectangles(const Rect *rects, INT count)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddRectangles(const RectF *rects, INT count) Status
AddRectangles(const RectF *rects, INT count)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddString(const WCHAR *string, INT length, const FontFamily *family, INT style, REAL emSize, const Rect &layoutRect, const StringFormat *format) Status
AddString(
const WCHAR *string,
INT length,
const FontFamily *family,
INT style,
REAL emSize,
const Rect &layoutRect,
const StringFormat *format)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddString(const WCHAR *string, INT length, const FontFamily *family, INT style, REAL emSize, const PointF &origin, const StringFormat *format) Status
AddString(
const WCHAR *string,
INT length,
const FontFamily *family,
INT style,
REAL emSize,
const PointF &origin,
const StringFormat *format)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddString(const WCHAR *string, INT length, const FontFamily *family, INT style, REAL emSize, const Point &origin, const StringFormat *format) Status
AddString(
const WCHAR *string,
INT length,
const FontFamily *family,
INT style,
REAL emSize,
const Point &origin,
const StringFormat *format)
{ {
return NotImplemented; return NotImplemented;
} }
Status AddString(const WCHAR *string, INT length, const FontFamily *family, INT style, REAL emSize, const RectF &layoutRect, const StringFormat *format) Status
AddString(
const WCHAR *string,
INT length,
const FontFamily *family,
INT style,
REAL emSize,
const RectF &layoutRect,
const StringFormat *format)
{ {
return NotImplemented; return NotImplemented;
} }
@ -284,17 +357,20 @@ public:
return NotImplemented; return NotImplemented;
} }
Status Flatten(const Matrix *matrix, REAL flatness) Status
Flatten(const Matrix *matrix, REAL flatness)
{ {
return NotImplemented; return NotImplemented;
} }
Status GetBounds(Rect *bounds, const Matrix *matrix, const Pen *pen) Status
GetBounds(Rect *bounds, const Matrix *matrix, const Pen *pen)
{ {
return NotImplemented; return NotImplemented;
} }
Status GetBounds(RectF *bounds, const Matrix *matrix, const Pen *pen) Status
GetBounds(RectF *bounds, const Matrix *matrix, const Pen *pen)
{ {
return NotImplemented; return NotImplemented;
} }
@ -304,7 +380,8 @@ public:
return FillModeAlternate; return FillModeAlternate;
} }
Status GetLastPoint(PointF *lastPoint) Status
GetLastPoint(PointF *lastPoint)
{ {
return NotImplemented; return NotImplemented;
} }
@ -314,22 +391,26 @@ public:
return NotImplemented; return NotImplemented;
} }
Status GetPathData(PathData *pathData) Status
GetPathData(PathData *pathData)
{ {
return NotImplemented; return NotImplemented;
} }
Status GetPathPoints(Point *points, INT count) Status
GetPathPoints(Point *points, INT count)
{ {
return NotImplemented; return NotImplemented;
} }
Status GetPathPoints(PointF *points, INT count) Status
GetPathPoints(PointF *points, INT count)
{ {
return NotImplemented; return NotImplemented;
} }
Status GetPathTypes(BYTE *types, INT count) Status
GetPathTypes(BYTE *types, INT count)
{ {
return NotImplemented; return NotImplemented;
} }
@ -339,47 +420,56 @@ public:
return 0; return 0;
} }
BOOL IsOutlineVisible(const Point &point, const Pen *pen, const Graphics *g) BOOL
IsOutlineVisible(const Point &point, const Pen *pen, const Graphics *g)
{ {
return FALSE; return FALSE;
} }
BOOL IsOutlineVisible(REAL x, REAL y, const Pen *pen, const Graphics *g) BOOL
IsOutlineVisible(REAL x, REAL y, const Pen *pen, const Graphics *g)
{ {
return FALSE; return FALSE;
} }
BOOL IsOutlineVisible(INT x, INT y, const Pen *pen, const Graphics *g) BOOL
IsOutlineVisible(INT x, INT y, const Pen *pen, const Graphics *g)
{ {
return FALSE; return FALSE;
} }
BOOL IsOutlineVisible(const PointF &point, const Pen *pen, const Graphics *g) BOOL
IsOutlineVisible(const PointF &point, const Pen *pen, const Graphics *g)
{ {
return FALSE; return FALSE;
} }
BOOL IsVisible(REAL x, REAL y, const Graphics *g) BOOL
IsVisible(REAL x, REAL y, const Graphics *g)
{ {
return FALSE; return FALSE;
} }
BOOL IsVisible(const PointF &point, const Graphics *g) BOOL
IsVisible(const PointF &point, const Graphics *g)
{ {
return FALSE; return FALSE;
} }
BOOL IsVisible(INT x, INT y, const Graphics *g) BOOL
IsVisible(INT x, INT y, const Graphics *g)
{ {
return FALSE; return FALSE;
} }
BOOL IsVisible(const Point &point, const Graphics *g) BOOL
IsVisible(const Point &point, const Graphics *g)
{ {
return NotImplemented; return NotImplemented;
} }
Status Outline(const Matrix *matrix, REAL flatness) Status
Outline(const Matrix *matrix, REAL flatness)
{ {
return NotImplemented; return NotImplemented;
} }
@ -394,7 +484,8 @@ public:
return NotImplemented; return NotImplemented;
} }
Status SetFillMode(FillMode fillmode) Status
SetFillMode(FillMode fillmode)
{ {
return NotImplemented; return NotImplemented;
} }
@ -409,39 +500,49 @@ public:
return NotImplemented; return NotImplemented;
} }
Status Transform(const Matrix *matrix) Status
Transform(const Matrix *matrix)
{ {
return NotImplemented; return NotImplemented;
} }
Status Warp(const PointF *destPoints, INT count, const RectF &srcRect, const Matrix *matrix, WarpMode warpMode, REAL flatness) Status
Warp(
const PointF *destPoints,
INT count,
const RectF &srcRect,
const Matrix *matrix,
WarpMode warpMode,
REAL flatness)
{ {
return NotImplemented; return NotImplemented;
} }
Status Widen(const Pen *pen, const Matrix *matrix, REAL flatness) Status
Widen(const Pen *pen, const Matrix *matrix, REAL flatness)
{ {
return NotImplemented; return NotImplemented;
} }
private: private:
GpPath *path; GpPath *path;
}; };
class GraphicsPathIterator : public GdiplusBase class GraphicsPathIterator : public GdiplusBase
{ {
public: public:
GraphicsPathIterator(GraphicsPath *path) GraphicsPathIterator(GraphicsPath *path)
{ {
} }
INT CopyData(PointF *points, BYTE *types, INT startIndex, INT endIndex) INT
CopyData(PointF *points, BYTE *types, INT startIndex, INT endIndex)
{ {
return 0; return 0;
} }
INT Enumerate(PointF *points, BYTE *types, INT count) INT
Enumerate(PointF *points, BYTE *types, INT count)
{ {
return 0; return 0;
} }
@ -466,27 +567,32 @@ public:
return FALSE; return FALSE;
} }
INT NextMarker(GraphicsPath *path) INT
NextMarker(GraphicsPath *path)
{ {
return 0; return 0;
} }
INT NextMarker(INT *startIndex, INT *endIndex) INT
NextMarker(INT *startIndex, INT *endIndex)
{ {
return 0; return 0;
} }
INT NextPathType(BYTE *pathType, INT *startIndex, INT *endIndex) INT
NextPathType(BYTE *pathType, INT *startIndex, INT *endIndex)
{ {
return 0; return 0;
} }
INT NextSubpath(GraphicsPath *path, BOOL *isClosed) INT
NextSubpath(GraphicsPath *path, BOOL *isClosed)
{ {
return 0; return 0;
} }
INT NextSubpath(INT *startIndex, INT *endIndex, BOOL *isClosed) INT
NextSubpath(INT *startIndex, INT *endIndex, BOOL *isClosed)
{ {
return 0; return 0;
} }
@ -496,10 +602,9 @@ public:
} }
}; };
class PathGradientBrush : public Brush class PathGradientBrush : public Brush
{ {
public: public:
PathGradientBrush(const Point *points, INT count, WrapMode wrapMode) PathGradientBrush(const Point *points, INT count, WrapMode wrapMode)
{ {
} }
@ -517,27 +622,32 @@ public:
return 0; return 0;
} }
Status GetBlend(REAL *blendFactors, REAL *blendPositions, INT count) Status
GetBlend(REAL *blendFactors, REAL *blendPositions, INT count)
{ {
return NotImplemented; return NotImplemented;
} }
Status GetCenterColor(Color *color) Status
GetCenterColor(Color *color)
{ {
return NotImplemented; return NotImplemented;
} }
Status GetCenterPoint(Point *point) Status
GetCenterPoint(Point *point)
{ {
return NotImplemented; return NotImplemented;
} }
Status GetCenterPoint(PointF *point) Status
GetCenterPoint(PointF *point)
{ {
return NotImplemented; return NotImplemented;
} }
Status GetFocusScales(REAL *xScale, REAL *yScale) Status
GetFocusScales(REAL *xScale, REAL *yScale)
{ {
return NotImplemented; return NotImplemented;
} }
@ -547,7 +657,8 @@ public:
return FALSE; return FALSE;
} }
Status GetGraphicsPath(GraphicsPath *path) Status
GetGraphicsPath(GraphicsPath *path)
{ {
return NotImplemented; return NotImplemented;
} }
@ -557,7 +668,8 @@ public:
return 0; return 0;
} }
Status GetInterpolationColors(Color *presetColors, REAL *blendPositions, INT count) Status
GetInterpolationColors(Color *presetColors, REAL *blendPositions, INT count)
{ {
return NotImplemented; return NotImplemented;
} }
@ -567,12 +679,14 @@ public:
return 0; return 0;
} }
Status GetRectangle(RectF *rect) Status
GetRectangle(RectF *rect)
{ {
return NotImplemented; return NotImplemented;
} }
Status GetRectangle(Rect *rect) Status
GetRectangle(Rect *rect)
{ {
return NotImplemented; return NotImplemented;
} }
@ -582,12 +696,14 @@ public:
return 0; return 0;
} }
Status GetSurroundColors(Color *colors, INT *count) Status
GetSurroundColors(Color *colors, INT *count)
{ {
return NotImplemented; return NotImplemented;
} }
Status GetTransform(Matrix *matrix) Status
GetTransform(Matrix *matrix)
{ {
return NotImplemented; return NotImplemented;
} }
@ -597,7 +713,8 @@ public:
return WrapModeTile; return WrapModeTile;
} }
Status MultiplyTransform(Matrix *matrix, MatrixOrder order) Status
MultiplyTransform(Matrix *matrix, MatrixOrder order)
{ {
return NotImplemented; return NotImplemented;
} }
@ -607,82 +724,98 @@ public:
return NotImplemented; return NotImplemented;
} }
Status RotateTransform(REAL angle, MatrixOrder order) Status
RotateTransform(REAL angle, MatrixOrder order)
{ {
return NotImplemented; return NotImplemented;
} }
Status ScaleTransform(REAL sx, REAL sy, MatrixOrder order) Status
ScaleTransform(REAL sx, REAL sy, MatrixOrder order)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetBlend(REAL *blendFactors, REAL *blendPositions, INT count) Status
SetBlend(REAL *blendFactors, REAL *blendPositions, INT count)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetBlendBellShape(REAL focus, REAL scale) Status
SetBlendBellShape(REAL focus, REAL scale)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetBlendTriangularShape(REAL focus, REAL scale) Status
SetBlendTriangularShape(REAL focus, REAL scale)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetCenterColor(const Color &color) Status
SetCenterColor(const Color &color)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetCenterPoint(const Point &point) Status
SetCenterPoint(const Point &point)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetCenterPoint(const PointF &point) Status
SetCenterPoint(const PointF &point)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetFocusScales(REAL xScale, REAL yScale) Status
SetFocusScales(REAL xScale, REAL yScale)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetGammaCorrection(BOOL useGammaCorrection) Status
SetGammaCorrection(BOOL useGammaCorrection)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetGraphicsPath(const GraphicsPath* path) Status
SetGraphicsPath(const GraphicsPath *path)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetInterpolationColors(const Color *presetColors, REAL *blendPositions, INT count) Status
SetInterpolationColors(const Color *presetColors, REAL *blendPositions, INT count)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetSurroundColors(const Color *colors, INT *count) Status
SetSurroundColors(const Color *colors, INT *count)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetTransform(const Matrix *matrix) Status
SetTransform(const Matrix *matrix)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetWrapMode(WrapMode wrapMode) Status
SetWrapMode(WrapMode wrapMode)
{ {
return NotImplemented; return NotImplemented;
} }
Status TranslateTransform(REAL dx, REAL dy, MatrixOrder order) Status
TranslateTransform(REAL dx, REAL dy, MatrixOrder order)
{ {
return NotImplemented; return NotImplemented;
} }

View file

@ -25,7 +25,7 @@ class Pen : public GdiplusBase
{ {
friend class Graphics; friend class Graphics;
public: public:
Pen(const Brush *brush, REAL width = 1.0f) Pen(const Brush *brush, REAL width = 1.0f)
{ {
} }
@ -34,10 +34,7 @@ public:
{ {
Unit unit = UnitWorld; Unit unit = UnitWorld;
pen = NULL; pen = NULL;
status = DllExports::GdipCreatePen1(color.GetValue(), status = DllExports::GdipCreatePen1(color.GetValue(), width, unit, &pen);
width,
unit,
&pen);
} }
Pen *Clone(VOID) Pen *Clone(VOID)
@ -57,7 +54,8 @@ public:
return NULL; return NULL;
} }
Status GetColor(Color *color) Status
GetColor(Color *color)
{ {
ARGB argb; ARGB argb;
Status status = SetStatus(DllExports::GdipGetPenColor(pen, &argb)); Status status = SetStatus(DllExports::GdipGetPenColor(pen, &argb));
@ -66,7 +64,8 @@ public:
return status; return status;
} }
Status GetCompoundArray(REAL *compoundArray, INT count) Status
GetCompoundArray(REAL *compoundArray, INT count)
{ {
return NotImplemented; // FIXME: not available: SetStatus(DllExports::GdipGetPenCompoundArray(pen, count)); return NotImplemented; // FIXME: not available: SetStatus(DllExports::GdipGetPenCompoundArray(pen, count));
} }
@ -78,12 +77,14 @@ public:
return count; return count;
} }
Status GetCustomEndCap(CustomLineCap *customCap) Status
GetCustomEndCap(CustomLineCap *customCap)
{ {
return NotImplemented; return NotImplemented;
} }
Status GetCustomStartCap(CustomLineCap *customCap) Status
GetCustomStartCap(CustomLineCap *customCap)
{ {
return NotImplemented; return NotImplemented;
} }
@ -102,7 +103,8 @@ public:
return offset; return offset;
} }
Status GetDashPattern(REAL *dashArray, INT count) Status
GetDashPattern(REAL *dashArray, INT count)
{ {
return SetStatus(DllExports::GdipGetPenDashArray(pen, dashArray, count)); return SetStatus(DllExports::GdipGetPenDashArray(pen, dashArray, count));
} }
@ -161,7 +163,8 @@ public:
return startCap; return startCap;
} }
Status GetTransform(Matrix *matrix) Status
GetTransform(Matrix *matrix)
{ {
return NotImplemented; return NotImplemented;
} }
@ -173,9 +176,11 @@ public:
return width; return width;
} }
Status MultiplyTransform(Matrix *matrix, MatrixOrder order) Status
MultiplyTransform(Matrix *matrix, MatrixOrder order)
{ {
return NotImplemented; // FIXME: not available: SetStatus(DllExports::GdipMultiplyPenTransform(pen, matrix ? matrix->matrix : NULL, order)); return NotImplemented; // FIXME: not available: SetStatus(DllExports::GdipMultiplyPenTransform(pen, matrix ?
// matrix->matrix : NULL, order));
} }
Status ResetTransform(VOID) Status ResetTransform(VOID)
@ -183,108 +188,129 @@ public:
return SetStatus(DllExports::GdipResetPenTransform(pen)); return SetStatus(DllExports::GdipResetPenTransform(pen));
} }
Status RotateTransform(REAL angle, MatrixOrder order) Status
RotateTransform(REAL angle, MatrixOrder order)
{ {
return NotImplemented; // FIXME: not available: SetStatus(DllExports::GdipRotatePenTransform(pen, angle, order)); return NotImplemented; // FIXME: not available: SetStatus(DllExports::GdipRotatePenTransform(pen, angle,
// order));
} }
Status ScaleTransform(REAL sx, REAL sy, MatrixOrder order) Status
ScaleTransform(REAL sx, REAL sy, MatrixOrder order)
{ {
return SetStatus(DllExports::GdipScalePenTransform(pen, sx, sy, order)); return SetStatus(DllExports::GdipScalePenTransform(pen, sx, sy, order));
} }
Status SetAlignment(PenAlignment penAlignment) Status
SetAlignment(PenAlignment penAlignment)
{ {
return SetStatus(DllExports::GdipSetPenMode(pen, penAlignment)); return SetStatus(DllExports::GdipSetPenMode(pen, penAlignment));
} }
Status SetBrush(const Brush *brush) Status
SetBrush(const Brush *brush)
{ {
return SetStatus(DllExports::GdipSetPenBrushFill(pen, brush ? brush->brush : NULL)); return SetStatus(DllExports::GdipSetPenBrushFill(pen, brush ? brush->brush : NULL));
} }
Status SetColor(const Color &color) Status
SetColor(const Color &color)
{ {
return SetStatus(DllExports::GdipSetPenColor(pen, color.GetValue())); return SetStatus(DllExports::GdipSetPenColor(pen, color.GetValue()));
} }
Status SetCompoundArray(const REAL *compoundArray, INT count) Status
SetCompoundArray(const REAL *compoundArray, INT count)
{ {
return SetStatus(DllExports::GdipSetPenCompoundArray(pen, compoundArray, count)); return SetStatus(DllExports::GdipSetPenCompoundArray(pen, compoundArray, count));
} }
Status SetCustomEndCap(const CustomLineCap *customCap) Status
SetCustomEndCap(const CustomLineCap *customCap)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetCustomStartCap(const CustomLineCap *customCap) Status
SetCustomStartCap(const CustomLineCap *customCap)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetDashCap(DashCap dashCap) Status
SetDashCap(DashCap dashCap)
{ {
return SetStatus(DllExports::GdipSetPenDashCap197819(pen, dashCap)); return SetStatus(DllExports::GdipSetPenDashCap197819(pen, dashCap));
} }
Status SetDashOffset(REAL dashOffset) Status
SetDashOffset(REAL dashOffset)
{ {
return SetStatus(DllExports::GdipSetPenDashOffset(pen, dashOffset)); return SetStatus(DllExports::GdipSetPenDashOffset(pen, dashOffset));
} }
Status SetDashPattern(const REAL *dashArray, INT count) Status
SetDashPattern(const REAL *dashArray, INT count)
{ {
return SetStatus(DllExports::GdipSetPenDashArray(pen, dashArray, count)); return SetStatus(DllExports::GdipSetPenDashArray(pen, dashArray, count));
} }
Status SetDashStyle(DashStyle dashStyle) Status
SetDashStyle(DashStyle dashStyle)
{ {
return SetStatus(DllExports::GdipSetPenDashStyle(pen, dashStyle)); return SetStatus(DllExports::GdipSetPenDashStyle(pen, dashStyle));
} }
Status SetEndCap(LineCap endCap) Status
SetEndCap(LineCap endCap)
{ {
return SetStatus(DllExports::GdipSetPenEndCap(pen, endCap)); return SetStatus(DllExports::GdipSetPenEndCap(pen, endCap));
} }
Status SetLineCap(LineCap startCap, LineCap endCap, DashCap dashCap) Status
SetLineCap(LineCap startCap, LineCap endCap, DashCap dashCap)
{ {
return SetStatus(DllExports::GdipSetPenLineCap197819(pen, startCap, endCap, dashCap)); return SetStatus(DllExports::GdipSetPenLineCap197819(pen, startCap, endCap, dashCap));
} }
Status SetLineJoin(LineJoin lineJoin) Status
SetLineJoin(LineJoin lineJoin)
{ {
return SetStatus(DllExports::GdipSetPenLineJoin(pen, lineJoin)); return SetStatus(DllExports::GdipSetPenLineJoin(pen, lineJoin));
} }
Status SetMiterLimit(REAL miterLimit) Status
SetMiterLimit(REAL miterLimit)
{ {
return SetStatus(DllExports::GdipSetPenMiterLimit(pen, miterLimit)); return SetStatus(DllExports::GdipSetPenMiterLimit(pen, miterLimit));
} }
Status SetStartCap(LineCap startCap) Status
SetStartCap(LineCap startCap)
{ {
return SetStatus(DllExports::GdipSetPenStartCap(pen, startCap)); return SetStatus(DllExports::GdipSetPenStartCap(pen, startCap));
} }
Status SetTransform(const Matrix *matrix) Status
SetTransform(const Matrix *matrix)
{ {
return SetStatus(DllExports::GdipSetPenTransform(pen, matrix ? matrix->matrix : NULL)); return SetStatus(DllExports::GdipSetPenTransform(pen, matrix ? matrix->matrix : NULL));
} }
Status SetWidth(REAL width) Status
SetWidth(REAL width)
{ {
return SetStatus(DllExports::GdipSetPenWidth(pen, width)); return SetStatus(DllExports::GdipSetPenWidth(pen, width));
} }
private: private:
GpPen *pen; GpPen *pen;
private: private:
mutable Status status; mutable Status status;
Status SetStatus(Status status) const Status
SetStatus(Status status) const
{ {
if (status == Ok) if (status == Ok)
return status; return status;

View file

@ -32,9 +32,9 @@ typedef INT PixelFormat;
#define PixelFormatUndefined 0 #define PixelFormatUndefined 0
#define PixelFormatDontCare 0 #define PixelFormatDontCare 0
#define PixelFormat1bppIndexed (1 | ( 1 << 8) | PixelFormatIndexed | PixelFormatGDI) #define PixelFormat1bppIndexed (1 | (1 << 8) | PixelFormatIndexed | PixelFormatGDI)
#define PixelFormat4bppIndexed (2 | ( 4 << 8) | PixelFormatIndexed | PixelFormatGDI) #define PixelFormat4bppIndexed (2 | (4 << 8) | PixelFormatIndexed | PixelFormatGDI)
#define PixelFormat8bppIndexed (3 | ( 8 << 8) | PixelFormatIndexed | PixelFormatGDI) #define PixelFormat8bppIndexed (3 | (8 << 8) | PixelFormatIndexed | PixelFormatGDI)
#define PixelFormat16bppGrayScale (4 | (16 << 8) | PixelFormatExtended) #define PixelFormat16bppGrayScale (4 | (16 << 8) | PixelFormatExtended)
#define PixelFormat16bppRGB555 (5 | (16 << 8) | PixelFormatGDI) #define PixelFormat16bppRGB555 (5 | (16 << 8) | PixelFormatGDI)
#define PixelFormat16bppRGB565 (6 | (16 << 8) | PixelFormatGDI) #define PixelFormat16bppRGB565 (6 | (16 << 8) | PixelFormatGDI)
@ -49,27 +49,32 @@ typedef INT PixelFormat;
#define PixelFormat32bppCMYK (15 | (32 << 8)) #define PixelFormat32bppCMYK (15 | (32 << 8))
#define PixelFormatMax 16 #define PixelFormatMax 16
static inline BOOL IsIndexedPixelFormat(PixelFormat format) static inline BOOL
IsIndexedPixelFormat(PixelFormat format)
{ {
return (format & PixelFormatIndexed) != 0; return (format & PixelFormatIndexed) != 0;
} }
static inline BOOL IsAlphaPixelFormat(PixelFormat format) static inline BOOL
IsAlphaPixelFormat(PixelFormat format)
{ {
return (format & PixelFormatAlpha) != 0; return (format & PixelFormatAlpha) != 0;
} }
static inline BOOL IsCanonicalPixelFormat(PixelFormat format) static inline BOOL
IsCanonicalPixelFormat(PixelFormat format)
{ {
return (format & PixelFormatCanonical) != 0; return (format & PixelFormatCanonical) != 0;
} }
static inline BOOL IsExtendedPixelFormat(PixelFormat format) static inline BOOL
IsExtendedPixelFormat(PixelFormat format)
{ {
return (format & PixelFormatExtended) != 0; return (format & PixelFormatExtended) != 0;
} }
static inline UINT GetPixelFormatSize(PixelFormat format) static inline UINT
GetPixelFormatSize(PixelFormat format)
{ {
return (format >> 8) & 0xff; return (format >> 8) & 0xff;
} }
@ -85,7 +90,7 @@ enum PaletteFlags
struct ColorPalette struct ColorPalette
{ {
public: public:
UINT Flags; UINT Flags;
UINT Count; UINT Count;
ARGB Entries[1]; ARGB Entries[1];

View file

@ -21,7 +21,7 @@
class StringFormat : public GdiplusBase class StringFormat : public GdiplusBase
{ {
public: public:
StringFormat(INT formatFlags, LANGID language) StringFormat(INT formatFlags, LANGID language)
{ {
} }
@ -90,7 +90,8 @@ public:
return 0; return 0;
} }
Status GetTabStops(INT count, REAL *firstTabOffset, REAL *tabStops) const Status
GetTabStops(INT count, REAL *firstTabOffset, REAL *tabStops) const
{ {
return NotImplemented; return NotImplemented;
} }
@ -100,42 +101,50 @@ public:
return StringTrimmingNone; return StringTrimmingNone;
} }
Status SetAlignment(StringAlignment align) Status
SetAlignment(StringAlignment align)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetDigitSubstitution(LANGID language, StringDigitSubstitute substitute) Status
SetDigitSubstitution(LANGID language, StringDigitSubstitute substitute)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetFormatFlags(INT flags) Status
SetFormatFlags(INT flags)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetHotkeyPrefix(HotkeyPrefix hotkeyPrefix) Status
SetHotkeyPrefix(HotkeyPrefix hotkeyPrefix)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetLineAlignment(StringAlignment align) Status
SetLineAlignment(StringAlignment align)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetMeasurableCharacterRanges(INT rangeCount, const CharacterRange *ranges) Status
SetMeasurableCharacterRanges(INT rangeCount, const CharacterRange *ranges)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetTabStops(REAL firstTabOffset, INT count, const REAL *tabStops) Status
SetTabStops(REAL firstTabOffset, INT count, const REAL *tabStops)
{ {
return NotImplemented; return NotImplemented;
} }
Status SetTrimming(StringTrimming trimming) Status
SetTrimming(StringTrimming trimming)
{ {
return NotImplemented; return NotImplemented;
} }

View file

@ -21,7 +21,8 @@
typedef float REAL; typedef float REAL;
enum Status{ enum Status
{
Ok = 0, Ok = 0,
GenericError = 1, GenericError = 1,
InvalidParameter = 2, InvalidParameter = 2,
@ -46,28 +47,27 @@ enum Status{
ProfileNotFound = 21 ProfileNotFound = 21
}; };
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C"
{
#endif #endif
typedef BOOL (CALLBACK * ImageAbort)(VOID *); typedef BOOL(CALLBACK *ImageAbort)(VOID *);
typedef ImageAbort DrawImageAbort; typedef ImageAbort DrawImageAbort;
typedef ImageAbort GetThumbnailImageAbort; typedef ImageAbort GetThumbnailImageAbort;
typedef struct GdiplusAbort GdiplusAbort; typedef struct GdiplusAbort GdiplusAbort;
typedef BOOL (CALLBACK * EnumerateMetafileProc)(EmfPlusRecordType,UINT,UINT,const BYTE*,VOID*); typedef BOOL(CALLBACK *EnumerateMetafileProc)(EmfPlusRecordType, UINT, UINT, const BYTE *, VOID *);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
class Point class Point
{ {
public: public:
Point() Point()
{ {
X = Y = 0; X = Y = 0;
@ -87,29 +87,32 @@ public:
Y = y; Y = y;
} }
Point operator+(IN const Point& pt) const Point
operator+(IN const Point &pt) const
{ {
return Point(X + pt.X, Y + pt.Y); return Point(X + pt.X, Y + pt.Y);
} }
Point operator-(IN const Point& pt) const Point
operator-(IN const Point &pt) const
{ {
return Point(X - pt.X, Y - pt.Y); return Point(X - pt.X, Y - pt.Y);
} }
BOOL Equals(IN const Point& pt) BOOL
Equals(IN const Point &pt)
{ {
return (X == pt.X) && (Y == pt.Y); return (X == pt.X) && (Y == pt.Y);
} }
public: public:
INT X; INT X;
INT Y; INT Y;
}; };
class PointF class PointF
{ {
public: public:
PointF() PointF()
{ {
X = Y = 0.0f; X = Y = 0.0f;
@ -129,29 +132,32 @@ public:
Y = y; Y = y;
} }
PointF operator+(IN const PointF& pt) const PointF
operator+(IN const PointF &pt) const
{ {
return PointF(X + pt.X, Y + pt.Y); return PointF(X + pt.X, Y + pt.Y);
} }
PointF operator-(IN const PointF& pt) const PointF
operator-(IN const PointF &pt) const
{ {
return PointF(X - pt.X, Y - pt.Y); return PointF(X - pt.X, Y - pt.Y);
} }
BOOL Equals(IN const PointF& pt) BOOL
Equals(IN const PointF &pt)
{ {
return (X == pt.X) && (Y == pt.Y); return (X == pt.X) && (Y == pt.Y);
} }
public: public:
REAL X; REAL X;
REAL Y; REAL Y;
}; };
class PathData class PathData
{ {
public: public:
PathData() PathData()
{ {
Count = 0; Count = 0;
@ -172,20 +178,21 @@ public:
} }
} }
private: private:
PathData(const PathData &); PathData(const PathData &);
PathData& operator=(const PathData &); PathData &
operator=(const PathData &);
public: public:
INT Count; INT Count;
PointF* Points; PointF *Points;
BYTE* Types; BYTE *Types;
}; };
/* FIXME: missing the methods. */ /* FIXME: missing the methods. */
class RectF class RectF
{ {
public: public:
REAL X; REAL X;
REAL Y; REAL Y;
REAL Width; REAL Width;
@ -195,7 +202,7 @@ public:
/* FIXME: missing the methods. */ /* FIXME: missing the methods. */
class Rect class Rect
{ {
public: public:
INT X; INT X;
INT Y; INT Y;
INT Width; INT Width;
@ -204,7 +211,7 @@ public:
class CharacterRange class CharacterRange
{ {
public: public:
CharacterRange() CharacterRange()
{ {
First = Length = 0; First = Length = 0;
@ -216,13 +223,15 @@ public:
Length = length; Length = length;
} }
CharacterRange& operator=(const CharacterRange& rhs) CharacterRange &
operator=(const CharacterRange &rhs)
{ {
First = rhs.First; First = rhs.First;
Length = rhs.Length; Length = rhs.Length;
return *this; return *this;
} }
public:
public:
INT First; INT First;
INT Length; INT Length;
}; };
@ -230,7 +239,7 @@ public:
/* FIXME: missing the methods. */ /* FIXME: missing the methods. */
class SizeF class SizeF
{ {
public: public:
REAL Width; REAL Width;
REAL Height; REAL Height;
}; };
@ -252,8 +261,8 @@ typedef struct PointF
typedef struct PathData typedef struct PathData
{ {
INT Count; INT Count;
PointF* Points; PointF *Points;
BYTE* Types; BYTE *Types;
} PathData; } PathData;
typedef struct RectF typedef struct RectF