gdiplus: Implemented GdipFillRectangles/GdipFillRectanglesI.

This commit is contained in:
Nikolay Sivov 2008-04-29 00:10:15 +04:00 committed by Alexandre Julliard
parent fc2dc8bc2a
commit 7ce48b0346
3 changed files with 48 additions and 2 deletions

View File

@ -228,8 +228,8 @@
@ stdcall GdipFillPolygonI(ptr ptr ptr long long)
@ stdcall GdipFillRectangle(ptr ptr long long long long)
@ stdcall GdipFillRectangleI(ptr ptr long long long long)
@ stub GdipFillRectangles
@ stub GdipFillRectanglesI
@ stdcall GdipFillRectangles(ptr ptr long)
@ stdcall GdipFillRectanglesI(ptr ptr long)
@ stub GdipFillRegion
@ stdcall GdipFindFirstImageItem(ptr ptr)
@ stub GdipFindNextImageItem

View File

@ -1922,6 +1922,50 @@ GpStatus WINGDIPAPI GdipFillRectangleI(GpGraphics *graphics, GpBrush *brush,
return Ok;
}
GpStatus WINGDIPAPI GdipFillRectangles(GpGraphics *graphics, GpBrush *brush, GDIPCONST GpRectF *rects,
INT count)
{
GpStatus ret;
INT i;
if(!rects)
return InvalidParameter;
for(i = 0; i < count; i++){
ret = GdipFillRectangle(graphics, brush, rects[i].X, rects[i].Y, rects[i].Width, rects[i].Height);
if(ret != Ok) return ret;
}
return Ok;
}
GpStatus WINGDIPAPI GdipFillRectanglesI(GpGraphics *graphics, GpBrush *brush, GDIPCONST GpRect *rects,
INT count)
{
GpRectF *rectsF;
GpStatus ret;
INT i;
if(!rects || count <= 0)
return InvalidParameter;
rectsF = GdipAlloc(sizeof(GpRectF)*count);
if(!rectsF)
return OutOfMemory;
for(i = 0; i < count; i++){
rectsF[i].X = (REAL)rects[i].X;
rectsF[i].Y = (REAL)rects[i].Y;
rectsF[i].X = (REAL)rects[i].Width;
rectsF[i].Height = (REAL)rects[i].Height;
}
ret = GdipFillRectangles(graphics,brush,rectsF,count);
GdipFree(rectsF);
return ret;
}
/* FIXME: Compositing mode is not used anywhere except the getter/setter. */
GpStatus WINGDIPAPI GdipGetCompositingMode(GpGraphics *graphics,
CompositingMode *mode)

View File

@ -119,6 +119,8 @@ GpStatus WINGDIPAPI GdipFillPolygon2(GpGraphics*,GpBrush*,GDIPCONST GpPointF*,IN
GpStatus WINGDIPAPI GdipFillPolygon2I(GpGraphics*,GpBrush*,GDIPCONST GpPoint*,INT);
GpStatus WINGDIPAPI GdipFillRectangle(GpGraphics*,GpBrush*,REAL,REAL,REAL,REAL);
GpStatus WINGDIPAPI GdipFillRectangleI(GpGraphics*,GpBrush*,INT,INT,INT,INT);
GpStatus WINGDIPAPI GdipFillRectangles(GpGraphics*,GpBrush*,GDIPCONST GpRectF*,INT);
GpStatus WINGDIPAPI GdipFillRectanglesI(GpGraphics*,GpBrush*,GDIPCONST GpRect*,INT);
GpStatus WINGDIPAPI GdipGetCompositingMode(GpGraphics*,CompositingMode*);
GpStatus WINGDIPAPI GdipGetCompositingQuality(GpGraphics*,CompositingQuality*);
GpStatus WINGDIPAPI GdipGetImageDimension(GpImage*,REAL*,REAL*);