Author: cwittich Date: Sun Jan 3 11:54:14 2010 New Revision: 44905 URL: http://svn.reactos.org/svn/reactos?rev=44905&view=rev Log: sync gdiplus with wine 1.1.35
Modified: trunk/reactos/dll/win32/gdiplus/gdiplus_private.h trunk/reactos/dll/win32/gdiplus/graphics.c trunk/reactos/dll/win32/gdiplus/image.c trunk/reactos/dll/win32/gdiplus/region.c trunk/reactos/include/psdk/gdiplusenums.h trunk/reactos/include/psdk/gdiplusflat.h trunk/reactos/include/psdk/gdiplusimaging.h Modified: trunk/reactos/dll/win32/gdiplus/gdiplus_private.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/gdiplus_private.h?rev=44905&r1=44904&r2=44905&view=diff ============================================================================== --- trunk/reactos/dll/win32/gdiplus/gdiplus_private.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/gdiplus/gdiplus_private.h [iso-8859-1] Sun Jan 3 11:54:14 2010 @@ -213,6 +213,10 @@ ImageType type; GUID format; UINT flags; + UINT palette_flags; + UINT palette_count; + UINT palette_size; + ARGB *palette_entries; }; struct GpMetafile{ Modified: trunk/reactos/dll/win32/gdiplus/graphics.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/graphics.c?rev=44905&r1=44904&r2=44905&view=diff ============================================================================== --- trunk/reactos/dll/win32/gdiplus/graphics.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/gdiplus/graphics.c [iso-8859-1] Sun Jan 3 11:54:14 2010 @@ -1256,6 +1256,10 @@ (*metafile)->image.type = ImageTypeMetafile; memcpy(&(*metafile)->image.format, &ImageFormatWMF, sizeof(GUID)); + (*metafile)->image.palette_flags = 0; + (*metafile)->image.palette_count = 0; + (*metafile)->image.palette_size = 0; + (*metafile)->image.palette_entries = NULL; (*metafile)->bounds.X = ((REAL) placeable->BoundingBox.Left) / ((REAL) placeable->Inch); (*metafile)->bounds.Y = ((REAL) placeable->BoundingBox.Right) / ((REAL) placeable->Inch); (*metafile)->bounds.Width = ((REAL) (placeable->BoundingBox.Right @@ -4157,6 +4161,7 @@ /* free everything except root node and header */ delete_element(®ion->node); memcpy(region, clip, sizeof(GpRegion)); + GdipFree(clip); return Ok; } Modified: trunk/reactos/dll/win32/gdiplus/image.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/image.c?rev=44905&r1=44904&r2=44905&view=diff ============================================================================== --- trunk/reactos/dll/win32/gdiplus/image.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/gdiplus/image.c [iso-8859-1] Sun Jan 3 11:54:14 2010 @@ -607,17 +607,73 @@ GpStatus WINGDIPAPI GdipCloneBitmapArea(REAL x, REAL y, REAL width, REAL height, PixelFormat format, GpBitmap* srcBitmap, GpBitmap** dstBitmap) { - FIXME("(%f,%f,%f,%f,%i,%p,%p): stub\n", x, y, width, height, format, srcBitmap, dstBitmap); - - return NotImplemented; + BitmapData lockeddata_src, lockeddata_dst; + int i; + UINT row_size; + Rect area; + GpStatus stat; + + TRACE("(%f,%f,%f,%f,%i,%p,%p)\n", x, y, width, height, format, srcBitmap, dstBitmap); + + if (!srcBitmap || !dstBitmap || srcBitmap->image.type != ImageTypeBitmap || + x < 0 || y < 0 || + x + width > srcBitmap->width || y + height > srcBitmap->height) + { + TRACE("<-- InvalidParameter\n"); + return InvalidParameter; + } + + if (format == PixelFormatDontCare) + format = srcBitmap->format; + + area.X = roundr(x); + area.Y = roundr(y); + area.Width = roundr(width); + area.Height = roundr(height); + + stat = GdipBitmapLockBits(srcBitmap, &area, ImageLockModeRead, format, + &lockeddata_src); + if (stat != Ok) return stat; + + stat = GdipCreateBitmapFromScan0(lockeddata_src.Width, lockeddata_src.Height, + 0, lockeddata_src.PixelFormat, NULL, dstBitmap); + if (stat == Ok) + { + stat = GdipBitmapLockBits(*dstBitmap, NULL, ImageLockModeWrite, + lockeddata_src.PixelFormat, &lockeddata_dst); + + if (stat == Ok) + { + /* copy the image data */ + row_size = (lockeddata_src.Width * PIXELFORMATBPP(lockeddata_src.PixelFormat) +7)/8; + for (i=0; i<lockeddata_src.Height; i++) + memcpy((BYTE*)lockeddata_dst.Scan0+lockeddata_dst.Stride*i, + (BYTE*)lockeddata_src.Scan0+lockeddata_src.Stride*i, + row_size); + + GdipBitmapUnlockBits(*dstBitmap, &lockeddata_dst); + } + + if (stat != Ok) + GdipDisposeImage((GpImage*)*dstBitmap); + } + + GdipBitmapUnlockBits(srcBitmap, &lockeddata_src); + + if (stat != Ok) + { + *dstBitmap = NULL; + } + + return stat; } GpStatus WINGDIPAPI GdipCloneBitmapAreaI(INT x, INT y, INT width, INT height, PixelFormat format, GpBitmap* srcBitmap, GpBitmap** dstBitmap) { - FIXME("(%i,%i,%i,%i,%i,%p,%p): stub\n", x, y, width, height, format, srcBitmap, dstBitmap); - - return NotImplemented; + TRACE("(%i,%i,%i,%i,%i,%p,%p)\n", x, y, width, height, format, srcBitmap, dstBitmap); + + return GdipCloneBitmapArea(x, y, width, height, format, srcBitmap, dstBitmap); } GpStatus WINGDIPAPI GdipCloneImage(GpImage *image, GpImage **cloneImage) @@ -690,12 +746,14 @@ GdipBitmapUnlockBits((GpBitmap*)*cloneImage, &lockeddata_dst); } - GdipBitmapUnlockBits(bitmap, &lockeddata_src); + if (stat != Ok) + GdipDisposeImage(*cloneImage); } + + GdipBitmapUnlockBits(bitmap, &lockeddata_src); if (stat != Ok) { - GdipDisposeImage(*cloneImage); *cloneImage = NULL; } else memcpy(&(*cloneImage)->format, &image->format, sizeof(GUID)); @@ -1076,6 +1134,44 @@ return Ok; } +static void generate_halftone_palette(ARGB *entries, UINT count) +{ + static const BYTE halftone_values[6]={0x00,0x33,0x66,0x99,0xcc,0xff}; + UINT i; + + for (i=0; i<8 && i<count; i++) + { + entries[i] = 0xff000000; + if (i&1) entries[i] |= 0x800000; + if (i&2) entries[i] |= 0x8000; + if (i&4) entries[i] |= 0x80; + } + + if (8 < count) + entries[i] = 0xffc0c0c0; + + for (i=9; i<16 && i<count; i++) + { + entries[i] = 0xff000000; + if (i&1) entries[i] |= 0xff0000; + if (i&2) entries[i] |= 0xff00; + if (i&4) entries[i] |= 0xff; + } + + for (i=16; i<40 && i<count; i++) + { + entries[i] = 0; + } + + for (i=40; i<256 && i<count; i++) + { + entries[i] = 0xff000000; + entries[i] |= halftone_values[(i-40)%6]; + entries[i] |= halftone_values[((i-40)/6)%6] << 8; + entries[i] |= halftone_values[((i-40)/36)%6] << 16; + } +} + GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride, PixelFormat format, BYTE* scan0, GpBitmap** bitmap) { @@ -1143,6 +1239,10 @@ (*bitmap)->image.type = ImageTypeBitmap; memcpy(&(*bitmap)->image.format, &ImageFormatMemoryBMP, sizeof(GUID)); (*bitmap)->image.flags = ImageFlagsNone; + (*bitmap)->image.palette_flags = 0; + (*bitmap)->image.palette_count = 0; + (*bitmap)->image.palette_size = 0; + (*bitmap)->image.palette_entries = NULL; (*bitmap)->width = width; (*bitmap)->height = height; (*bitmap)->format = format; @@ -1152,6 +1252,36 @@ (*bitmap)->bits = bits; (*bitmap)->stride = dib_stride; + if (format == PixelFormat1bppIndexed || + format == PixelFormat4bppIndexed || + format == PixelFormat8bppIndexed) + { + (*bitmap)->image.palette_size = (*bitmap)->image.palette_count = 1 << PIXELFORMATBPP(format); + (*bitmap)->image.palette_entries = GdipAlloc(sizeof(ARGB) * ((*bitmap)->image.palette_size)); + + if (!(*bitmap)->image.palette_entries) + { + GdipDisposeImage(&(*bitmap)->image); + *bitmap = NULL; + return OutOfMemory; + } + + if (format == PixelFormat1bppIndexed) + { + (*bitmap)->image.palette_flags = PaletteFlagsGrayScale; + (*bitmap)->image.palette_entries[0] = 0xff000000; + (*bitmap)->image.palette_entries[1] = 0xffffffff; + } + else + { + if (format == PixelFormat8bppIndexed) + (*bitmap)->image.palette_flags = PaletteFlagsHalftone; + + generate_halftone_palette((*bitmap)->image.palette_entries, + (*bitmap)->image.palette_count); + } + } + return Ok; } @@ -1260,6 +1390,7 @@ GdipFree(((GpBitmap*)image)->bitmapbits); DeleteDC(((GpBitmap*)image)->hdc); } + GdipFree(image->palette_entries); GdipFree(image); return Ok; @@ -1402,12 +1533,19 @@ GpStatus WINGDIPAPI GdipGetImagePaletteSize(GpImage *image, INT *size) { - FIXME("%p %p\n", image, size); + TRACE("%p %p\n", image, size); if(!image || !size) return InvalidParameter; - return NotImplemented; + if (image->palette_count == 0) + *size = sizeof(ColorPalette); + else + *size = sizeof(UINT)*2 + sizeof(ARGB)*image->palette_count; + + TRACE("<-- %u\n", *size); + + return Ok; } /* FIXME: test this function for non-bitmap types */ @@ -1833,6 +1971,10 @@ (*image)->type = ImageTypeMetafile; (*image)->picture = pic; (*image)->flags = ImageFlagsNone; + (*image)->palette_flags = 0; + (*image)->palette_count = 0; + (*image)->palette_size = 0; + (*image)->palette_entries = NULL; return Ok; } @@ -2168,15 +2310,22 @@ */ GpStatus WINGDIPAPI GdipGetImagePalette(GpImage *image, ColorPalette *palette, INT size) { - static int calls = 0; - - if(!image) - return InvalidParameter; - - if(!(calls++)) - FIXME("not implemented\n"); - - return NotImplemented; + TRACE("(%p,%p,%i)\n", image, palette, size); + + if (!image || !palette) + return InvalidParameter; + + if (size < (sizeof(UINT)*2+sizeof(ARGB)*image->palette_count)) + { + TRACE("<-- InsufficientBuffer\n"); + return InsufficientBuffer; + } + + palette->Flags = image->palette_flags; + palette->Count = image->palette_count; + memcpy(palette->Entries, image->palette_entries, sizeof(ARGB)*image->palette_count); + + return Ok; } /***************************************************************************** @@ -2185,15 +2334,28 @@ GpStatus WINGDIPAPI GdipSetImagePalette(GpImage *image, GDIPCONST ColorPalette *palette) { - static int calls; - - if(!image || !palette) - return InvalidParameter; - - if(!(calls++)) - FIXME("not implemented\n"); - - return NotImplemented; + TRACE("(%p,%p)\n", image, palette); + + if(!image || !palette || palette->Count > 256) + return InvalidParameter; + + if (palette->Count > image->palette_size) + { + ARGB *new_palette; + + new_palette = GdipAlloc(sizeof(ARGB) * palette->Count); + if (!new_palette) return OutOfMemory; + + GdipFree(image->palette_entries); + image->palette_entries = new_palette; + image->palette_size = palette->Count; + } + + image->palette_flags = palette->Flags; + image->palette_count = palette->Count; + memcpy(image->palette_entries, palette->Entries, sizeof(ARGB)*palette->Count); + + return Ok; } /************************************************************************* @@ -2497,7 +2659,8 @@ BITMAP bm; GpStatus retval; PixelFormat format; - BYTE* bits; + BitmapData lockeddata; + INT y; TRACE("%p %p %p\n", hbm, hpal, bitmap); @@ -2538,16 +2701,75 @@ return InvalidParameter; } - if (bm.bmBits) - bits = (BYTE*)bm.bmBits + (bm.bmHeight - 1) * bm.bmWidthBytes; - else - { - FIXME("can only get image data from DIB sections\n"); - bits = NULL; - } - - retval = GdipCreateBitmapFromScan0(bm.bmWidth, bm.bmHeight, -bm.bmWidthBytes, - format, bits, bitmap); + retval = GdipCreateBitmapFromScan0(bm.bmWidth, bm.bmHeight, 0, + format, NULL, bitmap); + + if (retval == Ok) + { + retval = GdipBitmapLockBits(*bitmap, NULL, ImageLockModeWrite, + format, &lockeddata); + if (retval == Ok) + { + if (bm.bmBits) + { + for (y=0; y<bm.bmHeight; y++) + { + memcpy((BYTE*)lockeddata.Scan0+lockeddata.Stride*y, + (BYTE*)bm.bmBits+bm.bmWidthBytes*(bm.bmHeight-1-y), + bm.bmWidthBytes); + } + } + else + { + HDC hdc; + HBITMAP oldhbm; + BITMAPINFO *pbmi; + INT src_height, dst_stride; + BYTE *dst_bits; + + hdc = CreateCompatibleDC(NULL); + oldhbm = SelectObject(hdc, hbm); + + pbmi = GdipAlloc(sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD)); + + if (pbmi) + { + pbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + pbmi->bmiHeader.biBitCount = 0; + + GetDIBits(hdc, hbm, 0, 0, NULL, pbmi, DIB_RGB_COLORS); + + src_height = abs(pbmi->bmiHeader.biHeight); + + if (pbmi->bmiHeader.biHeight > 0) + { + dst_bits = (BYTE*)lockeddata.Scan0+lockeddata.Stride*(src_height-1); + dst_stride = -lockeddata.Stride; + } + else + { + dst_bits = lockeddata.Scan0; + dst_stride = lockeddata.Stride; + } + + for (y=0; y<src_height; y++) + { + GetDIBits(hdc, hbm, y, 1, dst_bits+dst_stride*y, + pbmi, DIB_RGB_COLORS); + } + + GdipFree(pbmi); + } + else + retval = OutOfMemory; + + SelectObject(hdc, oldhbm); + DeleteDC(hdc); + } + + GdipBitmapUnlockBits(*bitmap, &lockeddata); + } + } return retval; } Modified: trunk/reactos/dll/win32/gdiplus/region.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/region.c?rev=44905&r1=44904&r2=44905&view=diff ============================================================================== --- trunk/reactos/dll/win32/gdiplus/region.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/gdiplus/region.c [iso-8859-1] Sun Jan 3 11:54:14 2010 @@ -249,6 +249,7 @@ if(mode == CombineModeReplace){ delete_element(®ion->node); memcpy(region, path_region, sizeof(GpRegion)); + GdipFree(path_region); return Ok; } @@ -295,6 +296,7 @@ if(mode == CombineModeReplace){ delete_element(®ion->node); memcpy(region, rect_region, sizeof(GpRegion)); + GdipFree(rect_region); return Ok; } Modified: trunk/reactos/include/psdk/gdiplusenums.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/gdiplusenums.h?rev=44905&r1=44904&r2=44905&view=diff ============================================================================== --- trunk/reactos/include/psdk/gdiplusenums.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/gdiplusenums.h [iso-8859-1] Sun Jan 3 11:54:14 2010 @@ -289,6 +289,13 @@ HotkeyPrefixNone = 0, HotkeyPrefixShow = 1, HotkeyPrefixHide = 2 +}; + +enum PaletteFlags +{ + PaletteFlagsHasAlpha = 1, + PaletteFlagsGrayScale = 2, + PaletteFlagsHalftone = 4 }; enum ImageCodecFlags @@ -455,6 +462,7 @@ typedef enum StringFormatFlags StringFormatFlags; typedef enum HotkeyPrefix HotkeyPrefix; typedef enum PenAlignment GpPenAlignment; +typedef enum PaletteFlags PaletteFlags; typedef enum ImageCodecFlags ImageCodecFlags; typedef enum CombineMode CombineMode; typedef enum FlushIntention FlushIntention; Modified: trunk/reactos/include/psdk/gdiplusflat.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/gdiplusflat.h?rev=44905&r1=44904&r2=44905&view=diff ============================================================================== --- trunk/reactos/include/psdk/gdiplusflat.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/gdiplusflat.h [iso-8859-1] Sun Jan 3 11:54:14 2010 @@ -45,6 +45,7 @@ GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap*,GDIPCONST GpRect*,UINT, PixelFormat,BitmapData*); GpStatus WINGDIPAPI GdipBitmapSetPixel(GpBitmap*,INT,INT,ARGB); +GpStatus WINGDIPAPI GdipBitmapSetResolution(GpBitmap*,REAL,REAL); GpStatus WINGDIPAPI GdipBitmapUnlockBits(GpBitmap*,BitmapData*); GpStatus WINGDIPAPI GdipCloneBitmapArea(REAL,REAL,REAL,REAL,PixelFormat,GpBitmap*,GpBitmap**); GpStatus WINGDIPAPI GdipCloneBitmapAreaI(INT,INT,INT,INT,PixelFormat,GpBitmap*,GpBitmap**); @@ -62,11 +63,18 @@ GpStatus WINGDIPAPI GdipCreateHBITMAPFromBitmap(GpBitmap*,HBITMAP*,ARGB); GpStatus WINGDIPAPI GdipCreateHICONFromBitmap(GpBitmap*,HICON*); GpStatus WINGDIPAPI GdipDeleteEffect(CGpEffect*); +GpStatus WINGDIPAPI GdipSetEffectParameters(CGpEffect*,const VOID*,const UINT); /* Brush */ GpStatus WINGDIPAPI GdipCloneBrush(GpBrush*,GpBrush**); GpStatus WINGDIPAPI GdipDeleteBrush(GpBrush*); GpStatus WINGDIPAPI GdipGetBrushType(GpBrush*,GpBrushType*); + +/* CachedBitmap */ +GpStatus WINGDIPAPI GdipCreateCachedBitmap(GpBitmap*,GpGraphics*, + GpCachedBitmap**); +GpStatus WINGDIPAPI GdipDeleteCachedBitmap(GpCachedBitmap*); +GpStatus WINGDIPAPI GdipDrawCachedBitmap(GpGraphics*,GpCachedBitmap*,INT,INT); /* CustomLineCap */ GpStatus WINGDIPAPI GdipCloneCustomLineCap(GpCustomLineCap*,GpCustomLineCap**); @@ -74,12 +82,16 @@ GpCustomLineCap**); GpStatus WINGDIPAPI GdipDeleteCustomLineCap(GpCustomLineCap*); GpStatus WINGDIPAPI GdipGetCustomLineCapBaseCap(GpCustomLineCap*,GpLineCap*); +GpStatus WINGDIPAPI GdipSetCustomLineCapBaseCap(GpCustomLineCap*,GpLineCap); GpStatus WINGDIPAPI GdipGetCustomLineCapBaseInset(GpCustomLineCap*,REAL*); +GpStatus WINGDIPAPI GdipSetCustomLineCapBaseInset(GpCustomLineCap*,REAL); GpStatus WINGDIPAPI GdipSetCustomLineCapStrokeCaps(GpCustomLineCap*,GpLineCap, GpLineCap); GpStatus WINGDIPAPI GdipGetCustomLineCapStrokeJoin(GpCustomLineCap*,GpLineJoin*); GpStatus WINGDIPAPI GdipSetCustomLineCapStrokeJoin(GpCustomLineCap*,GpLineJoin); GpStatus WINGDIPAPI GdipGetCustomLineCapWidthScale(GpCustomLineCap*,REAL*); +GpStatus WINGDIPAPI GdipSetCustomLineCapWidthScale(GpCustomLineCap*,REAL); +GpStatus WINGDIPAPI GdipSetCustomLineCapBaseInset(GpCustomLineCap*,REAL); /* Font */ GpStatus WINGDIPAPI GdipCloneFont(GpFont*,GpFont**); @@ -104,6 +116,8 @@ GpStatus WINGDIPAPI GdipNewPrivateFontCollection(GpFontCollection**); GpStatus WINGDIPAPI GdipDeletePrivateFontCollection(GpFontCollection**); GpStatus WINGDIPAPI GdipPrivateAddFontFile(GpFontCollection*, GDIPCONST WCHAR*); +GpStatus WINGDIPAPI GdipPrivateAddMemoryFont(GpFontCollection*, + GDIPCONST void*,INT); GpStatus WINGDIPAPI GdipGetFontCollectionFamilyCount(GpFontCollection*, INT*); GpStatus WINGDIPAPI GdipGetFontCollectionFamilyList(GpFontCollection*, INT, GpFontFamily*[], INT*); @@ -134,6 +148,7 @@ GpStatus WINGDIPAPI GdipCreateFromHDC2(HDC,HANDLE,GpGraphics**); GpStatus WINGDIPAPI GdipCreateFromHWND(HWND,GpGraphics**); GpStatus WINGDIPAPI GdipCreateFromHWNDICM(HWND,GpGraphics**); +HPALETTE WINGDIPAPI GdipCreateHalftonePalette(void); GpStatus WINGDIPAPI GdipDeleteGraphics(GpGraphics *); GpStatus WINGDIPAPI GdipDrawArc(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipDrawArcI(GpGraphics*,GpPen*,INT,INT,INT,INT,REAL,REAL); @@ -151,6 +166,8 @@ 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 GdipDrawDriverString(GpGraphics*,GDIPCONST UINT16*,INT, + GDIPCONST GpFont*,GDIPCONST GpBrush*,GDIPCONST PointF*,INT,GDIPCONST GpMatrix*); GpStatus WINGDIPAPI GdipDrawEllipse(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipDrawEllipseI(GpGraphics*,GpPen*,INT,INT,INT,INT); GpStatus WINGDIPAPI GdipDrawImage(GpGraphics*,GpImage*,REAL,REAL); @@ -217,6 +234,8 @@ GpStatus WINGDIPAPI GdipGetDC(GpGraphics*,HDC*); GpStatus WINGDIPAPI GdipGetDpiX(GpGraphics*,REAL*); GpStatus WINGDIPAPI GdipGetDpiY(GpGraphics*,REAL*); +GpStatus WINGDIPAPI GdipGetImageDecoders(UINT,UINT,ImageCodecInfo*); +GpStatus WINGDIPAPI GdipGetImageDecodersSize(UINT*,UINT*); GpStatus WINGDIPAPI GdipGetImageGraphicsContext(GpImage*,GpGraphics**); GpStatus WINGDIPAPI GdipGetInterpolationMode(GpGraphics*,InterpolationMode*); GpStatus WINGDIPAPI GdipGetNearestColor(GpGraphics*,ARGB*); @@ -238,9 +257,17 @@ GpStatus WINGDIPAPI GdipMeasureCharacterRanges(GpGraphics*, GDIPCONST WCHAR*, INT, GDIPCONST GpFont*, GDIPCONST RectF*, GDIPCONST GpStringFormat*, INT, GpRegion**); +GpStatus WINGDIPAPI GdipMeasureDriverString(GpGraphics*,GDIPCONST UINT16*,INT, + GDIPCONST GpFont*,GDIPCONST PointF*,INT,GDIPCONST GpMatrix*,RectF*); GpStatus WINGDIPAPI GdipMeasureString(GpGraphics*,GDIPCONST WCHAR*,INT, GDIPCONST GpFont*,GDIPCONST RectF*,GDIPCONST GpStringFormat*,RectF*,INT*,INT*); GpStatus WINGDIPAPI GdipMultiplyWorldTransform(GpGraphics*,GDIPCONST GpMatrix*,GpMatrixOrder); +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 GdipRecordMetafileI(HDC,EmfType,GDIPCONST GpRect*, + MetafileFrameUnit,GDIPCONST WCHAR*,GpMetafile**); GpStatus WINGDIPAPI GdipReleaseDC(GpGraphics*,HDC); GpStatus WINGDIPAPI GdipResetClip(GpGraphics*); GpStatus WINGDIPAPI GdipResetWorldTransform(GpGraphics*); @@ -249,6 +276,7 @@ GpStatus WINGDIPAPI GdipSaveGraphics(GpGraphics*,GraphicsState*); GpStatus WINGDIPAPI GdipScaleWorldTransform(GpGraphics*,REAL,REAL,GpMatrixOrder); GpStatus WINGDIPAPI GdipSetClipHrgn(GpGraphics*,HRGN,CombineMode); +GpStatus WINGDIPAPI GdipSetClipGraphics(GpGraphics*,GpGraphics*,CombineMode); GpStatus WINGDIPAPI GdipSetClipPath(GpGraphics*,GpPath*,CombineMode); GpStatus WINGDIPAPI GdipSetClipRect(GpGraphics*,REAL,REAL,REAL,REAL,CombineMode); GpStatus WINGDIPAPI GdipSetClipRectI(GpGraphics*,INT,INT,INT,INT,CombineMode); @@ -259,6 +287,7 @@ GpStatus WINGDIPAPI GdipSetPageScale(GpGraphics*,REAL); GpStatus WINGDIPAPI GdipSetPageUnit(GpGraphics*,GpUnit); GpStatus WINGDIPAPI GdipSetPixelOffsetMode(GpGraphics*,PixelOffsetMode); +GpStatus WINGDIPAPI GdipSetRenderingOrigin(GpGraphics*,INT,INT); GpStatus WINGDIPAPI GdipSetSmoothingMode(GpGraphics*,SmoothingMode); GpStatus WINGDIPAPI GdipSetTextContrast(GpGraphics*,UINT); GpStatus WINGDIPAPI GdipSetTextRenderingHint(GpGraphics*,TextRenderingHint); @@ -336,6 +365,15 @@ GpStatus WINGDIPAPI GdipSetPathMarker(GpPath*); GpStatus WINGDIPAPI GdipStartPathFigure(GpPath*); GpStatus WINGDIPAPI GdipTransformPath(GpPath*,GpMatrix*); +GpStatus WINGDIPAPI GdipWarpPath(GpPath*,GpMatrix*,GDIPCONST GpPointF*,INT,REAL, + REAL,REAL,REAL,WarpMode,REAL); +GpStatus WINGDIPAPI GdipWidenPath(GpPath*,GpPen*,GpMatrix*,REAL); + +/* HatchBrush */ +GpStatus WINGDIPAPI GdipCreateHatchBrush(HatchStyle,ARGB,ARGB,GpHatch**); +GpStatus WINGDIPAPI GdipGetHatchBackgroundColor(GpHatch*,ARGB*); +GpStatus WINGDIPAPI GdipGetHatchForegroundColor(GpHatch*,ARGB*); +GpStatus WINGDIPAPI GdipGetHatchStyle(GpHatch*,HatchStyle*); /* Image */ GpStatus WINGDIPAPI GdipCloneImage(GpImage*, GpImage**); @@ -352,6 +390,7 @@ GpStatus WINGDIPAPI GdipGetImageHorizontalResolution(GpImage*,REAL*); GpStatus WINGDIPAPI GdipGetImageItemData(GpImage*,ImageItemData*); GpStatus WINGDIPAPI GdipGetImagePalette(GpImage*,ColorPalette*,INT); +GpStatus WINGDIPAPI GdipGetImagePaletteSize(GpImage*,INT*); GpStatus WINGDIPAPI GdipGetImagePixelFormat(GpImage*,PixelFormat*); GpStatus WINGDIPAPI GdipGetImageRawFormat(GpImage*,GUID*); GpStatus WINGDIPAPI GdipGetImageThumbnail(GpImage*,UINT,UINT,GpImage**,GetThumbnailImageAbort,VOID*); @@ -363,6 +402,7 @@ GpStatus WINGDIPAPI GdipGetPropertyItem(GpImage*,PROPID,UINT,PropertyItem*); GpStatus WINGDIPAPI GdipGetPropertyItemSize(GpImage*,PROPID,UINT*); GpStatus WINGDIPAPI GdipGetPropertySize(GpImage*,UINT*,UINT*); +GpStatus WINGDIPAPI GdipImageForceValidation(GpImage*); GpStatus WINGDIPAPI GdipImageGetFrameCount(GpImage*,GDIPCONST GUID*,UINT*); GpStatus WINGDIPAPI GdipImageGetFrameDimensionsCount(GpImage*,UINT*); GpStatus WINGDIPAPI GdipImageGetFrameDimensionsList(GpImage*,GUID*,UINT); @@ -382,11 +422,27 @@ /* ImageAttributes */ GpStatus WINGDIPAPI GdipCreateImageAttributes(GpImageAttributes**); GpStatus WINGDIPAPI GdipDisposeImageAttributes(GpImageAttributes*); +GpStatus WINGDIPAPI GdipSetImageAttributesCachedBackground(GpImageAttributes*, + BOOL); GpStatus WINGDIPAPI GdipSetImageAttributesColorKeys(GpImageAttributes*, ColorAdjustType,BOOL,ARGB,ARGB); GpStatus WINGDIPAPI GdipSetImageAttributesColorMatrix(GpImageAttributes*, ColorAdjustType,BOOL,GDIPCONST ColorMatrix*,GDIPCONST ColorMatrix*, ColorMatrixFlags); +GpStatus WINGDIPAPI GdipSetImageAttributesGamma(GpImageAttributes*, + ColorAdjustType,BOOL,REAL); +GpStatus WINGDIPAPI GdipSetImageAttributesNoOp(GpImageAttributes*, + ColorAdjustType,BOOL); +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 GdipSetImageAttributesThreshold(GpImageAttributes*, + ColorAdjustType,BOOL,REAL); +GpStatus WINGDIPAPI GdipSetImageAttributesToIdentity(GpImageAttributes*, + ColorAdjustType); GpStatus WINGDIPAPI GdipSetImageAttributesWrapMode(GpImageAttributes*,WrapMode, ARGB,BOOL); @@ -412,11 +468,22 @@ GDIPCONST REAL*,INT); GpStatus WINGDIPAPI GdipGetLineBlend(GpLineGradient*,REAL*,REAL*,INT); GpStatus WINGDIPAPI GdipGetLineBlendCount(GpLineGradient*,INT*); +GpStatus WINGDIPAPI GdipSetLinePresetBlend(GpLineGradient*,GDIPCONST ARGB*, + GDIPCONST REAL*,INT); +GpStatus WINGDIPAPI GdipGetLinePresetBlend(GpLineGradient*,ARGB*,REAL*,INT); +GpStatus WINGDIPAPI GdipGetLinePresetBlendCount(GpLineGradient*,INT*); +GpStatus WINGDIPAPI GdipResetLineTransform(GpLineGradient*); +GpStatus WINGDIPAPI GdipRotateLineTransform(GpLineGradient*,REAL,GpMatrixOrder); +GpStatus WINGDIPAPI GdipScaleLineTransform(GpLineGradient*,REAL,REAL, + GpMatrixOrder); GpStatus WINGDIPAPI GdipSetLineColors(GpLineGradient*,ARGB,ARGB); GpStatus WINGDIPAPI GdipSetLineGammaCorrection(GpLineGradient*,BOOL); GpStatus WINGDIPAPI GdipSetLineSigmaBlend(GpLineGradient*,REAL,REAL); +GpStatus WINGDIPAPI GdipSetLineTransform(GpLineGradient*,GDIPCONST GpMatrix*); GpStatus WINGDIPAPI GdipSetLineLinearBlend(GpLineGradient*,REAL,REAL); GpStatus WINGDIPAPI GdipSetLineWrapMode(GpLineGradient*,GpWrapMode); +GpStatus WINGDIPAPI GdipTranslateLineTransform(GpLineGradient*,REAL,REAL, + GpMatrixOrder); /* Matrix */ GpStatus WINGDIPAPI GdipCloneMatrix(GpMatrix*,GpMatrix**); @@ -462,6 +529,10 @@ GpStatus WINGDIPAPI GdipGetMetafileHeaderFromStream(IStream*,MetafileHeader*); GpStatus WINGDIPAPI GdipGetMetafileHeaderFromWmf(HMETAFILE,GDIPCONST WmfPlaceableFileHeader*,MetafileHeader*); +/* Notification */ +GpStatus WINAPI GdiplusNotificationHook(ULONG_PTR*); +void WINAPI GdiplusNotificationUnhook(ULONG_PTR); + /* PathGradientBrush */ GpStatus WINGDIPAPI GdipCreatePathGradient(GDIPCONST GpPointF*,INT,GpWrapMode,GpPathGradient**); GpStatus WINGDIPAPI GdipCreatePathGradientI(GDIPCONST GpPoint*,INT,GpWrapMode,GpPathGradient**); @@ -475,6 +546,8 @@ GpStatus WINGDIPAPI GdipGetPathGradientFocusScales(GpPathGradient*,REAL*,REAL*); GpStatus WINGDIPAPI GdipGetPathGradientGammaCorrection(GpPathGradient*,BOOL*); GpStatus WINGDIPAPI GdipGetPathGradientPointCount(GpPathGradient*,INT*); +GpStatus WINGDIPAPI GdipSetPathGradientPresetBlend(GpPathGradient*, + GDIPCONST ARGB*,GDIPCONST REAL*,INT); GpStatus WINGDIPAPI GdipGetPathGradientRect(GpPathGradient*,GpRectF*); GpStatus WINGDIPAPI GdipGetPathGradientRectI(GpPathGradient*,GpRect*); GpStatus WINGDIPAPI GdipGetPathGradientSurroundColorsWithCount(GpPathGradient*, @@ -522,6 +595,8 @@ GpStatus WINGDIPAPI GdipGetPenDashOffset(GpPen*,REAL*); GpStatus WINGDIPAPI GdipGetPenDashStyle(GpPen*,GpDashStyle*); GpStatus WINGDIPAPI GdipGetPenMode(GpPen*,GpPenAlignment*); +GpStatus WINGDIPAPI GdipResetPenTransform(GpPen*); +GpStatus WINGDIPAPI GdipScalePenTransform(GpPen*,REAL,REAL,GpMatrixOrder); GpStatus WINGDIPAPI GdipSetPenBrushFill(GpPen*,GpBrush*); GpStatus WINGDIPAPI GdipSetPenColor(GpPen*,ARGB); GpStatus WINGDIPAPI GdipSetPenCompoundArray(GpPen*,GDIPCONST REAL*,INT); @@ -620,9 +695,15 @@ INT,INT,INT,INT,GpTexture**); GpStatus WINGDIPAPI GdipGetTextureTransform(GpTexture*,GpMatrix*); GpStatus WINGDIPAPI GdipGetTextureWrapMode(GpTexture*, GpWrapMode*); +GpStatus WINGDIPAPI GdipMultiplyTextureTransform(GpTexture*, + GDIPCONST GpMatrix*,GpMatrixOrder); GpStatus WINGDIPAPI GdipResetTextureTransform(GpTexture*); +GpStatus WINGDIPAPI GdipRotateTextureTransform(GpTexture*,REAL,GpMatrixOrder); +GpStatus WINGDIPAPI GdipScaleTextureTransform(GpTexture*,REAL,REAL,GpMatrixOrder); GpStatus WINGDIPAPI GdipSetTextureTransform(GpTexture *,GDIPCONST GpMatrix*); GpStatus WINGDIPAPI GdipSetTextureWrapMode(GpTexture*, GpWrapMode); +GpStatus WINGDIPAPI GdipTranslateTextureTransform(GpTexture*,REAL,REAL, + GpMatrixOrder); /* Without wrapper methods */ GpStatus WINGDIPAPI GdipCreateStreamOnFile(GDIPCONST WCHAR*,UINT,IStream**); Modified: trunk/reactos/include/psdk/gdiplusimaging.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/gdiplusimaging.h?rev=44905&r1=44904&r2=44905&view=diff ============================================================================== --- trunk/reactos/include/psdk/gdiplusimaging.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/gdiplusimaging.h [iso-8859-1] Sun Jan 3 11:54:14 2010 @@ -30,6 +30,10 @@ DEFINE_GUID(ImageFormatTIFF, 0xb96b3cb1, 0x728, 0x11d3, 0x9d, 0x7b, 0, 0, 0xf8, 0x1e, 0xf3, 0x2e); DEFINE_GUID(ImageFormatEXIF, 0xb96b3cb2, 0x728, 0x11d3, 0x9d, 0x7b, 0, 0, 0xf8, 0x1e, 0xf3, 0x2e); DEFINE_GUID(ImageFormatIcon, 0xb96b3cb5, 0x728, 0x11d3, 0x9d, 0x7b, 0, 0, 0xf8, 0x1e, 0xf3, 0x2e); + +DEFINE_GUID(FrameDimensionTime, 0x6aedbd6d, 0x3fb5, 0x418a, 0x83, 0xa6, 0x7f, 0x45, 0x22, 0x9d, 0xc8, 0x72); +DEFINE_GUID(FrameDimensionPage, 0x7462dc86, 0x6180, 0x4c7e, 0x8e, 0x3f, 0xee, 0x73, 0x33, 0xa7, 0xa4, 0x83); +DEFINE_GUID(FrameDimensionResolution, 0x84236f7b, 0x3bd3, 0x428f, 0x8d, 0xab, 0x4e, 0xa1, 0x43, 0x9c, 0xa3, 0x15); enum ImageLockMode {