Status GetEncoderParameterList(const CLSID *clsidEncoder, UINT size, EncoderParameters *buffer)
{
- return SetStatus(DllExports::GdipGetEncoderParameterList(image, clsidEncoder, size, buffer));
+ return NotImplemented; // FIXME: not available: SetStatus(DllExports::GdipGetEncoderParameterList(image, clsidEncoder, size, buffer));
}
UINT GetEncoderParameterListSize(const CLSID *clsidEncoder)
{
- UINT size;
- SetStatus(DllExports::GdipGetEncoderParameterListSize(image, clsidEncoder, &size));
- return size;
+ return 0; // FIXME: not available:
+// UINT size;
+// SetStatus(DllExports::GdipGetEncoderParameterListSize(image, clsidEncoder, &size));
+// return size;
}
UINT GetFlags(VOID)
Status GetPhysicalDimension(SizeF *size)
{
- return SetStatus(DllExports::GdipGetImagePhysicalDimension(image, &(size->Width), &(size->Height)));
+ return SetStatus(DllExports::GdipGetImageDimension(image, &size->Width, &size->Height));
}
PixelFormat GetPixelFormat(VOID)
Status GetRawFormat(GUID *format)
{
- return SetStatus(DllExports::GdipGetRawFormat(image, format));
+ return SetStatus(DllExports::GdipGetImageRawFormat(image, format));
}
Image *GetThumbnailImage(UINT thumbWidth, UINT thumbHeight, GetThumbnailImageAbort callback, VOID *callbackData)
Status SaveAdd(const EncoderParameters* encoderParams)
{
- return SetStatus(DllExports::GdipSaveAdd(image, encoderParams));
+ return NotImplemented; // FIXME: not available: SetStatus(DllExports::GdipSaveAdd(image, encoderParams));
}
Status SaveAdd(Image *newImage, const EncoderParameters *encoderParams)
{
- return SetStatus(DllExports::GdipSaveAddImage(image, newImage->image, encoderParams));
+ return NotImplemented; // FIXME: not available: SetStatus(DllExports::GdipSaveAddImage(image, newImage->image, encoderParams));
}
Status SelectActiveFrame(const GUID *dimensionID, UINT frameIndex)
class Bitmap : public Image
{
+ friend class CachedBitmap;
+
public:
- Bitmap(IDirectDrawSurface7 *surface)
- {
- status = DllExports::GdipCreateBitmapFromDirectDrawSurface(surface, &bitmap);
- }
+// Bitmap(IDirectDrawSurface7 *surface) // <-- FIXME: compiler does not like this
+// {
+// status = DllExports::GdipCreateBitmapFromDirectDrawSurface(surface, &bitmap);
+// }
Bitmap(INT width, INT height, Graphics *target)
{
return new Bitmap(gdiBitmapInfo, gdiBitmapData);
}
- static Bitmap *FromDirectDrawSurface7(IDirectDrawSurface7 *surface)
- {
- return new Bitmap(surface);
- }
+// static Bitmap *FromDirectDrawSurface7(IDirectDrawSurface7 *surface) // <-- FIXME: compiler does not like this
+// {
+// return new Bitmap(surface);
+// }
static Bitmap *FromFile(const WCHAR *filename, BOOL useEmbeddedColorManagement)
{
Status GetHICON(HICON *hicon)
{
- return SetStatus(DllExports::GdipCreateHICONFromBitmap(bitmap, hbmReturn));
+ return SetStatus(DllExports::GdipCreateHICONFromBitmap(bitmap, hicon));
}
Status GetPixel(INT x, INT y, Color *color)
public:
CachedBitmap(Bitmap *bitmap, Graphics *graphics)
{
- status = DllExports::GdipCreateCachedBitmap(bitmap, graphics, &cachedBitmap);
+ status = DllExports::GdipCreateCachedBitmap(bitmap->bitmap, graphics->graphics, &cachedBitmap);
}
Status GetLastStatus(VOID)
};
-class Font : public GdiplusBase
+class FontCollection : public GdiplusBase
{
-public:
friend class FontFamily;
- friend class FontCollection;
- friend class Graphics;
-
- Font(const FontFamily *family, REAL emSize, INT style, Unit unit)
- {
- status = DllExports::GdipCreateFont(family->fontFamily, emSize, style. unit, &font);
- }
- Font(HDC hdc, const HFONT hfont)
- {
- }
-
- Font(HDC hdc, const LOGFONTA *logfont)
- {
- status = DllExports::GdipCreateFontFromLogfontA(hdc, logfont, &font);
- }
-
- Font(HDC hdc, const LOGFONTW *logfont)
- {
- status = DllExports::GdipCreateFontFromLogfontW(hdc, logfont, &font);
- }
-
- Font(const WCHAR *familyName, REAL emSize, INT style, Unit unit, const FontCollection *fontCollection)
- {
- }
-
- Font(HDC hdc)
- {
- status = DllExports::GdipCreateFontFromDC(hdc, &font);
- }
-
- Font *Clone(VOID) const
- {
- Font *cloneFont = new Font();
- cloneFont->status = DllExports::GdipCloneFont(font, &(cloneFont->font));
- return cloneFont;
- }
-
- Status GetFamily(FontFamily* family) const
- {
- return SetStatus(DllExports::GdipGetFamily(font, &(family->fontFamily)));
- }
-
- REAL GetHeight(const Graphics* graphics) const
- {
- REAL height;
- SetStatus(DllExports::GdipGetFontHeight(font, graphics->graphics, &height));
- return height;
- }
-
- REAL GetHeight(REAL dpi) const
- {
- REAL height;
- SetStatus(DllExports::GdipGetFontHeightGivenDPI(font, dpi, &height));
- return height;
- }
-
- Status GetLastStatus(VOID) const
- {
- return status;
- }
-
- Status GetLogFontA(const Graphics *g, LOGFONTA *logfontA) const
- {
- return SetStatus(DllExports::GdipGetLogFontA(font, g->graphics, logfontA));
- }
-
- Status GetLogFontW(const Graphics *g, LOGFONTW *logfontW) const
- {
- return SetStatus(DllExports::GdipGetLogFontW(font, g->graphics, logfontW));
- }
-
- REAL GetSize(VOID) const
- {
- REAL size;
- SetStatus(DllExports::GdipGetFontSize(font, &size));
- return size;
- }
-
- INT GetStyle(VOID) const
- {
- INT style;
- SetStatus(DllExports::GdipGetFontStyle(font, &style));
- return style;
- }
-
- Unit GetUnit(VOID) const
- {
- Unit unit;
- SetStatus(DllExports::GdipGetFontUnit(font, &unit);
- return unit;
- }
-
- BOOL IsAvailable(VOID) const
- {
- return FALSE;
- }
-
-private:
- mutable Status status;
- GpFont *font;
-
- Status SetStatus(Status status) const
- {
- if (status == Ok)
- return status;
- this->status = status;
- return status;
- }
-};
-
-
-class FontCollection : public GdiplusBase
-{
public:
FontCollection(VOID)
{
{
return NotImplemented;
}
+
+private:
+ GpFontCollection *fontCollection;
};
class FontFamily : public GdiplusBase
{
+ friend class Font;
+
public:
FontFamily(VOID)
{
FontFamily(const WCHAR *name, const FontCollection *fontCollection)
{
- status = DllExports::GdipCreateFontFamilyFromName(name, fontCollection, &fontFamily);
+ status = DllExports::GdipCreateFontFamilyFromName(name, fontCollection->fontCollection, &fontFamily);
}
FontFamily *Clone(VOID)
};
+class Font : public GdiplusBase
+{
+public:
+ friend class FontFamily;
+ friend class FontCollection;
+ friend class Graphics;
+
+ Font(const FontFamily *family, REAL emSize, INT style, Unit unit)
+ {
+ status = DllExports::GdipCreateFont(family->fontFamily, emSize, style, unit, &font);
+ }
+
+ Font(HDC hdc, const HFONT hfont)
+ {
+ }
+
+ Font(HDC hdc, const LOGFONTA *logfont)
+ {
+ status = DllExports::GdipCreateFontFromLogfontA(hdc, logfont, &font);
+ }
+
+ Font(HDC hdc, const LOGFONTW *logfont)
+ {
+ status = DllExports::GdipCreateFontFromLogfontW(hdc, logfont, &font);
+ }
+
+ Font(const WCHAR *familyName, REAL emSize, INT style, Unit unit, const FontCollection *fontCollection)
+ {
+ }
+
+ Font(HDC hdc)
+ {
+ status = DllExports::GdipCreateFontFromDC(hdc, &font);
+ }
+
+ Font *Clone(VOID) const
+ {
+ Font *cloneFont = new Font();
+ cloneFont->status = DllExports::GdipCloneFont(font, &(cloneFont->font));
+ return cloneFont;
+ }
+
+ Status GetFamily(FontFamily* family) const
+ {
+ return SetStatus(DllExports::GdipGetFamily(font, &(family->fontFamily)));
+ }
+
+ REAL GetHeight(const Graphics* graphics) const
+ {
+ REAL height;
+ SetStatus(DllExports::GdipGetFontHeight(font, graphics->graphics, &height));
+ return height;
+ }
+
+ REAL GetHeight(REAL dpi) const
+ {
+ REAL height;
+ SetStatus(DllExports::GdipGetFontHeightGivenDPI(font, dpi, &height));
+ return height;
+ }
+
+ Status GetLastStatus(VOID) const
+ {
+ return status;
+ }
+
+ Status GetLogFontA(const Graphics *g, LOGFONTA *logfontA) const
+ {
+ return SetStatus(DllExports::GdipGetLogFontA(font, g->graphics, logfontA));
+ }
+
+ Status GetLogFontW(const Graphics *g, LOGFONTW *logfontW) const
+ {
+ return SetStatus(DllExports::GdipGetLogFontW(font, g->graphics, logfontW));
+ }
+
+ REAL GetSize(VOID) const
+ {
+ REAL size;
+ SetStatus(DllExports::GdipGetFontSize(font, &size));
+ return size;
+ }
+
+ INT GetStyle(VOID) const
+ {
+ INT style;
+ SetStatus(DllExports::GdipGetFontStyle(font, &style));
+ return style;
+ }
+
+ Unit GetUnit(VOID) const
+ {
+ Unit unit;
+ SetStatus(DllExports::GdipGetFontUnit(font, &unit));
+ return unit;
+ }
+
+ BOOL IsAvailable(VOID) const
+ {
+ return FALSE;
+ }
+
+protected:
+ Font()
+ {
+ }
+
+private:
+ mutable Status status;
+ GpFont *font;
+
+ Status SetStatus(Status status) const
+ {
+ if (status == Ok)
+ return status;
+ this->status = status;
+ return status;
+ }
+};
+
+
class Region : public GdiplusBase
{
public:
Region(const RectF &rect)
{
- status = DllExports::GdipCreateRegionRectF(&rect, ®ion);
+ status = DllExports::GdipCreateRegionRect(&rect, ®ion);
}
Region *Clone(VOID)
{
- region *cloneRegion = new Region();
- cloneRegion->status = DllExports::GdipCloneRegion(region, &cloneRegion);
+ Region *cloneRegion = new Region();
+ cloneRegion->status = DllExports::GdipCloneRegion(region, &cloneRegion->region);
return cloneRegion;
}
Status GetData(BYTE *buffer, UINT bufferSize, UINT *sizeFilled) const
{
- return SetStatus(DllExports::GdipGetRegionData(region, budder, bufferSize, sizeFilled));
+ return SetStatus(DllExports::GdipGetRegionData(region, buffer, bufferSize, sizeFilled));
}
UINT GetDataSize(VOID) const
BOOL IsVisible(const PointF &point, const Graphics *g) const
{
BOOL result;
- SetStatus(DllExports::GdipIsVisibleRegionPoint(region, point.x, point.y, g->graphics, &result));
+ SetStatus(DllExports::GdipIsVisibleRegionPoint(region, point.X, point.Y, g->graphics, &result));
return result;
}
BOOL IsVisible(const RectF &rect, const Graphics *g) const
{
BOOL result;
- SetStatus(DllExports::GdipIsVisibleRegionRect(region, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, g->graphics, &result));
+ SetStatus(DllExports::GdipIsVisibleRegionRect(region, rect.X, rect.Y, rect.Width, rect.Height, g->graphics, &result));
return result;
}
BOOL IsVisible(const Rect &rect, const Graphics *g) const
{
BOOL result;
- SetStatus(DllExports::GdipIsVisibleRegionRectI(region, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, g->graphics, &result));
+ SetStatus(DllExports::GdipIsVisibleRegionRectI(region, rect.X, rect.Y, rect.Width, rect.Height, g->graphics, &result));
return result;
}
BOOL IsVisible(const Point &point, const Graphics *g) const
{
BOOL result;
- SetStatus(DllExports::GdipIsVisibleRegionPointI(region, point.x, point.y, g->graphics, &result));
+ SetStatus(DllExports::GdipIsVisibleRegionPointI(region, point.X, point.Y, g->graphics, &result));
return result;
}