diff --git a/reactos/dll/win32/gdiplus/font.c b/reactos/dll/win32/gdiplus/font.c index 220409b7a05..22fd3936949 100644 --- a/reactos/dll/win32/gdiplus/font.c +++ b/reactos/dll/win32/gdiplus/font.c @@ -195,6 +195,7 @@ GpStatus WINGDIPAPI GdipCreateFontFromLogfontW(HDC hdc, (*font)->lfw.lfHeight = -textmet.tmHeight; (*font)->lfw.lfWeight = textmet.tmWeight; + (*font)->lfw.lfCharSet = textmet.tmCharSet; (*font)->height = 1; /* FIXME: need NEWTEXTMETRIC.ntmSizeEM here */ (*font)->line_spacing = textmet.tmAscent + textmet.tmDescent + textmet.tmExternalLeading; diff --git a/reactos/dll/win32/gdiplus/gdiplus.spec b/reactos/dll/win32/gdiplus/gdiplus.spec index b3d21039ea5..d380d74c4c8 100644 --- a/reactos/dll/win32/gdiplus/gdiplus.spec +++ b/reactos/dll/win32/gdiplus/gdiplus.spec @@ -10,8 +10,8 @@ @ stdcall GdipAddPathClosedCurveI(ptr ptr long) @ stdcall GdipAddPathCurve2(ptr ptr long long) @ stdcall GdipAddPathCurve2I(ptr ptr long long) -@ stub GdipAddPathCurve3 -@ stub GdipAddPathCurve3I +@ stdcall GdipAddPathCurve3(ptr ptr long long long long) +@ stdcall GdipAddPathCurve3I(ptr ptr long long long long) @ stdcall GdipAddPathCurve(ptr ptr long) @ stdcall GdipAddPathCurveI(ptr ptr long) @ stdcall GdipAddPathEllipse(ptr long long long long) @@ -320,7 +320,7 @@ @ stdcall GdipGetMetafileHeaderFromMetafile(ptr ptr) @ stub GdipGetMetafileHeaderFromStream @ stub GdipGetMetafileHeaderFromWmf -@ stub GdipGetNearestColor +@ stdcall GdipGetNearestColor(ptr ptr) @ stdcall GdipGetPageScale(ptr ptr) @ stdcall GdipGetPageUnit(ptr ptr) @ stdcall GdipGetPathData(ptr ptr) diff --git a/reactos/dll/win32/gdiplus/graphics.c b/reactos/dll/win32/gdiplus/graphics.c index 786af958ea5..35db94f9ba2 100644 --- a/reactos/dll/win32/gdiplus/graphics.c +++ b/reactos/dll/win32/gdiplus/graphics.c @@ -2456,6 +2456,19 @@ GpStatus WINGDIPAPI GdipGetInterpolationMode(GpGraphics *graphics, return Ok; } +GpStatus WINGDIPAPI GdipGetNearestColor(GpGraphics *graphics, ARGB* argb) +{ + if(!graphics || !argb) + return InvalidParameter; + + if(graphics->busy) + return ObjectBusy; + + FIXME("(%p, %p): stub\n", graphics, argb); + + return NotImplemented; +} + GpStatus WINGDIPAPI GdipGetPageScale(GpGraphics *graphics, REAL *scale) { TRACE("(%p, %p)\n", graphics, scale); diff --git a/reactos/dll/win32/gdiplus/graphicspath.c b/reactos/dll/win32/gdiplus/graphicspath.c index e8f8fb98fa7..874550fb3b1 100644 --- a/reactos/dll/win32/gdiplus/graphicspath.c +++ b/reactos/dll/win32/gdiplus/graphicspath.c @@ -524,6 +524,28 @@ GpStatus WINGDIPAPI GdipAddPathCurve2I(GpPath *path, GDIPCONST GpPoint *points, return stat; } +GpStatus WINGDIPAPI GdipAddPathCurve3(GpPath *path, GDIPCONST GpPointF *points, + INT count, INT offset, INT nseg, REAL tension) +{ + TRACE("(%p, %p, %d, %d, %d, %.2f)\n", path, points, count, offset, nseg, tension); + + if(!path || !points || offset + 1 >= count || count - offset < nseg + 1) + return InvalidParameter; + + return GdipAddPathCurve2(path, &points[offset], nseg + 1, tension); +} + +GpStatus WINGDIPAPI GdipAddPathCurve3I(GpPath *path, GDIPCONST GpPoint *points, + INT count, INT offset, INT nseg, REAL tension) +{ + TRACE("(%p, %p, %d, %d, %d, %.2f)\n", path, points, count, offset, nseg, tension); + + if(!path || !points || offset + 1 >= count || count - offset < nseg + 1) + return InvalidParameter; + + return GdipAddPathCurve2I(path, &points[offset], nseg + 1, tension); +} + GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath *path, REAL x, REAL y, REAL width, REAL height) { diff --git a/reactos/dll/win32/gdiplus/pen.c b/reactos/dll/win32/gdiplus/pen.c index f41185a6887..b2d6dab1dea 100644 --- a/reactos/dll/win32/gdiplus/pen.c +++ b/reactos/dll/win32/gdiplus/pen.c @@ -412,7 +412,7 @@ GpStatus WINGDIPAPI GdipSetPenColor(GpPen *pen, ARGB argb) GpStatus WINGDIPAPI GdipSetPenCompoundArray(GpPen *pen, GDIPCONST REAL *dash, INT count) { - FIXME("(%p, %p, %i): stub", pen, dash, count); + FIXME("(%p, %p, %i): stub\n", pen, dash, count); if (!pen || !dash || count < 2 || count%2 == 1) return InvalidParameter; diff --git a/reactos/dll/win32/gdiplus/region.c b/reactos/dll/win32/gdiplus/region.c index d28292c9eea..4d694f4ae86 100644 --- a/reactos/dll/win32/gdiplus/region.c +++ b/reactos/dll/win32/gdiplus/region.c @@ -360,6 +360,7 @@ GpStatus WINGDIPAPI GdipCombineRegionRegion(GpRegion *region1, delete_element(®ion1->node); memcpy(region1, reg2copy, sizeof(GpRegion)); + GdipFree(reg2copy); return Ok; } diff --git a/reactos/include/psdk/gdiplusflat.h b/reactos/include/psdk/gdiplusflat.h index 1f93258fe29..1a39dee4055 100644 --- a/reactos/include/psdk/gdiplusflat.h +++ b/reactos/include/psdk/gdiplusflat.h @@ -196,6 +196,7 @@ GpStatus WINGDIPAPI GdipGetDpiX(GpGraphics*,REAL*); GpStatus WINGDIPAPI GdipGetDpiY(GpGraphics*,REAL*); GpStatus WINGDIPAPI GdipGetImageGraphicsContext(GpImage*,GpGraphics**); GpStatus WINGDIPAPI GdipGetInterpolationMode(GpGraphics*,InterpolationMode*); +GpStatus WINGDIPAPI GdipGetNearestColor(GpGraphics*,ARGB*); GpStatus WINGDIPAPI GdipGetPageScale(GpGraphics*,REAL*); GpStatus WINGDIPAPI GdipGetPageUnit(GpGraphics*,GpUnit*); GpStatus WINGDIPAPI GdipGetPixelOffsetMode(GpGraphics*,PixelOffsetMode*); @@ -255,6 +256,8 @@ GpStatus WINGDIPAPI GdipAddPathCurve(GpPath*,GDIPCONST GpPointF*,INT); GpStatus WINGDIPAPI GdipAddPathCurveI(GpPath*,GDIPCONST GpPoint*,INT); GpStatus WINGDIPAPI GdipAddPathCurve2(GpPath*,GDIPCONST GpPointF*,INT,REAL); GpStatus WINGDIPAPI GdipAddPathCurve2I(GpPath*,GDIPCONST GpPoint*,INT,REAL); +GpStatus WINGDIPAPI GdipAddPathCurve3(GpPath*,GDIPCONST GpPointF*,INT,INT,INT,REAL); +GpStatus WINGDIPAPI GdipAddPathCurve3I(GpPath*,GDIPCONST GpPoint*,INT,INT,INT,REAL); GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath*,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipAddPathEllipseI(GpPath*,INT,INT,INT,INT); GpStatus WINGDIPAPI GdipAddPathLine(GpPath*,REAL,REAL,REAL,REAL);