- Sync gdiplus with Wine head

svn path=/trunk/; revision=38123
This commit is contained in:
Stefan Ginsberg 2008-12-16 18:41:07 +00:00
parent 327684fd1c
commit 587db429a4
7 changed files with 44 additions and 4 deletions

View file

@ -195,6 +195,7 @@ GpStatus WINGDIPAPI GdipCreateFontFromLogfontW(HDC hdc,
(*font)->lfw.lfHeight = -textmet.tmHeight; (*font)->lfw.lfHeight = -textmet.tmHeight;
(*font)->lfw.lfWeight = textmet.tmWeight; (*font)->lfw.lfWeight = textmet.tmWeight;
(*font)->lfw.lfCharSet = textmet.tmCharSet;
(*font)->height = 1; /* FIXME: need NEWTEXTMETRIC.ntmSizeEM here */ (*font)->height = 1; /* FIXME: need NEWTEXTMETRIC.ntmSizeEM here */
(*font)->line_spacing = textmet.tmAscent + textmet.tmDescent + textmet.tmExternalLeading; (*font)->line_spacing = textmet.tmAscent + textmet.tmDescent + textmet.tmExternalLeading;

View file

@ -10,8 +10,8 @@
@ stdcall GdipAddPathClosedCurveI(ptr ptr long) @ stdcall GdipAddPathClosedCurveI(ptr ptr long)
@ stdcall GdipAddPathCurve2(ptr ptr long long) @ stdcall GdipAddPathCurve2(ptr ptr long long)
@ stdcall GdipAddPathCurve2I(ptr ptr long long) @ stdcall GdipAddPathCurve2I(ptr ptr long long)
@ stub GdipAddPathCurve3 @ stdcall GdipAddPathCurve3(ptr ptr long long long long)
@ stub GdipAddPathCurve3I @ stdcall GdipAddPathCurve3I(ptr ptr long long long long)
@ stdcall GdipAddPathCurve(ptr ptr long) @ stdcall GdipAddPathCurve(ptr ptr long)
@ stdcall GdipAddPathCurveI(ptr ptr long) @ stdcall GdipAddPathCurveI(ptr ptr long)
@ stdcall GdipAddPathEllipse(ptr long long long long) @ stdcall GdipAddPathEllipse(ptr long long long long)
@ -320,7 +320,7 @@
@ stdcall GdipGetMetafileHeaderFromMetafile(ptr ptr) @ stdcall GdipGetMetafileHeaderFromMetafile(ptr ptr)
@ stub GdipGetMetafileHeaderFromStream @ stub GdipGetMetafileHeaderFromStream
@ stub GdipGetMetafileHeaderFromWmf @ stub GdipGetMetafileHeaderFromWmf
@ stub GdipGetNearestColor @ stdcall GdipGetNearestColor(ptr ptr)
@ stdcall GdipGetPageScale(ptr ptr) @ stdcall GdipGetPageScale(ptr ptr)
@ stdcall GdipGetPageUnit(ptr ptr) @ stdcall GdipGetPageUnit(ptr ptr)
@ stdcall GdipGetPathData(ptr ptr) @ stdcall GdipGetPathData(ptr ptr)

View file

@ -2456,6 +2456,19 @@ GpStatus WINGDIPAPI GdipGetInterpolationMode(GpGraphics *graphics,
return Ok; 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) GpStatus WINGDIPAPI GdipGetPageScale(GpGraphics *graphics, REAL *scale)
{ {
TRACE("(%p, %p)\n", graphics, scale); TRACE("(%p, %p)\n", graphics, scale);

View file

@ -524,6 +524,28 @@ GpStatus WINGDIPAPI GdipAddPathCurve2I(GpPath *path, GDIPCONST GpPoint *points,
return stat; 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, GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath *path, REAL x, REAL y, REAL width,
REAL height) REAL height)
{ {

View file

@ -412,7 +412,7 @@ GpStatus WINGDIPAPI GdipSetPenColor(GpPen *pen, ARGB argb)
GpStatus WINGDIPAPI GdipSetPenCompoundArray(GpPen *pen, GDIPCONST REAL *dash, GpStatus WINGDIPAPI GdipSetPenCompoundArray(GpPen *pen, GDIPCONST REAL *dash,
INT count) 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) if (!pen || !dash || count < 2 || count%2 == 1)
return InvalidParameter; return InvalidParameter;

View file

@ -360,6 +360,7 @@ GpStatus WINGDIPAPI GdipCombineRegionRegion(GpRegion *region1,
delete_element(&region1->node); delete_element(&region1->node);
memcpy(region1, reg2copy, sizeof(GpRegion)); memcpy(region1, reg2copy, sizeof(GpRegion));
GdipFree(reg2copy);
return Ok; return Ok;
} }

View file

@ -196,6 +196,7 @@ GpStatus WINGDIPAPI GdipGetDpiX(GpGraphics*,REAL*);
GpStatus WINGDIPAPI GdipGetDpiY(GpGraphics*,REAL*); GpStatus WINGDIPAPI GdipGetDpiY(GpGraphics*,REAL*);
GpStatus WINGDIPAPI GdipGetImageGraphicsContext(GpImage*,GpGraphics**); GpStatus WINGDIPAPI GdipGetImageGraphicsContext(GpImage*,GpGraphics**);
GpStatus WINGDIPAPI GdipGetInterpolationMode(GpGraphics*,InterpolationMode*); GpStatus WINGDIPAPI GdipGetInterpolationMode(GpGraphics*,InterpolationMode*);
GpStatus WINGDIPAPI GdipGetNearestColor(GpGraphics*,ARGB*);
GpStatus WINGDIPAPI GdipGetPageScale(GpGraphics*,REAL*); GpStatus WINGDIPAPI GdipGetPageScale(GpGraphics*,REAL*);
GpStatus WINGDIPAPI GdipGetPageUnit(GpGraphics*,GpUnit*); GpStatus WINGDIPAPI GdipGetPageUnit(GpGraphics*,GpUnit*);
GpStatus WINGDIPAPI GdipGetPixelOffsetMode(GpGraphics*,PixelOffsetMode*); 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 GdipAddPathCurveI(GpPath*,GDIPCONST GpPoint*,INT);
GpStatus WINGDIPAPI GdipAddPathCurve2(GpPath*,GDIPCONST GpPointF*,INT,REAL); GpStatus WINGDIPAPI GdipAddPathCurve2(GpPath*,GDIPCONST GpPointF*,INT,REAL);
GpStatus WINGDIPAPI GdipAddPathCurve2I(GpPath*,GDIPCONST GpPoint*,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 GdipAddPathEllipse(GpPath*,REAL,REAL,REAL,REAL);
GpStatus WINGDIPAPI GdipAddPathEllipseI(GpPath*,INT,INT,INT,INT); GpStatus WINGDIPAPI GdipAddPathEllipseI(GpPath*,INT,INT,INT,INT);
GpStatus WINGDIPAPI GdipAddPathLine(GpPath*,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipAddPathLine(GpPath*,REAL,REAL,REAL,REAL);