gdiplus: Added compositing quality.

This commit is contained in:
Evan Stade 2007-07-13 17:51:25 -07:00 committed by Alexandre Julliard
parent 53e17d2993
commit 60cad23522
5 changed files with 40 additions and 2 deletions

View File

@ -235,7 +235,7 @@
@ stub GdipGetClipBounds
@ stub GdipGetClipBoundsI
@ stub GdipGetCompositingMode
@ stub GdipGetCompositingQuality
@ stdcall GdipGetCompositingQuality(ptr ptr)
@ stub GdipGetCustomLineCapBaseCap
@ stub GdipGetCustomLineCapBaseInset
@ stub GdipGetCustomLineCapStrokeCaps
@ -493,7 +493,7 @@
@ stub GdipSetClipRectI
@ stub GdipSetClipRegion
@ stub GdipSetCompositingMode
@ stub GdipSetCompositingQuality
@ stdcall GdipSetCompositingQuality(ptr long)
@ stub GdipSetCustomLineCapBaseCap
@ stub GdipSetCustomLineCapBaseInset
@ stub GdipSetCustomLineCapStrokeCaps

View File

@ -55,6 +55,7 @@ struct GpGraphics{
HDC hdc;
HWND hwnd;
SmoothingMode smoothing;
CompositingQuality compqual;
};
struct GpBrush{

View File

@ -543,6 +543,7 @@ GpStatus WINGDIPAPI GdipCreateFromHDC(HDC hdc, GpGraphics **graphics)
(*graphics)->hdc = hdc;
(*graphics)->hwnd = NULL;
(*graphics)->smoothing = SmoothingModeDefault;
(*graphics)->compqual = CompositingQualityDefault;
return Ok;
}
@ -798,6 +799,18 @@ GpStatus WINGDIPAPI GdipFillPie(GpGraphics *graphics, GpBrush *brush, REAL x,
width, height, startAngle, sweepAngle);
}
/* FIXME: Compositing quality is not used anywhere except the getter/setter. */
GpStatus WINGDIPAPI GdipGetCompositingQuality(GpGraphics *graphics,
CompositingQuality *quality)
{
if(!graphics || !quality)
return InvalidParameter;
*quality = graphics->compqual;
return Ok;
}
/* FIXME: Smoothing mode is not used anywhere except the getter/setter. */
GpStatus WINGDIPAPI GdipGetSmoothingMode(GpGraphics *graphics, SmoothingMode *mode)
{
@ -809,6 +822,17 @@ GpStatus WINGDIPAPI GdipGetSmoothingMode(GpGraphics *graphics, SmoothingMode *mo
return Ok;
}
GpStatus WINGDIPAPI GdipSetCompositingQuality(GpGraphics *graphics,
CompositingQuality quality)
{
if(!graphics)
return InvalidParameter;
graphics->compqual = quality;
return Ok;
}
GpStatus WINGDIPAPI GdipSetSmoothingMode(GpGraphics *graphics, SmoothingMode mode)
{
if(!graphics)

View File

@ -99,6 +99,16 @@ enum SmoothingMode
SmoothingModeAntiAlias
};
enum CompositingQuality
{
CompositingQualityInvalid = QualityModeInvalid,
CompositingQualityDefault = QualityModeDefault,
CompositingQualityHighSpeed = QualityModeLow,
CompositingQualityHighQuality = QualityModeHigh,
CompositingQualityGammaCorrected,
CompositingQualityAssumeLinear
};
#ifndef __cplusplus
typedef enum Unit Unit;
@ -109,6 +119,7 @@ typedef enum PathPointType PathPointType;
typedef enum LineJoin LineJoin;
typedef enum QualityMode QualityMode;
typedef enum SmoothingMode SmoothingMode;
typedef enum CompositingQuality CompositingQuality;
#endif /* end of c typedefs */

View File

@ -45,7 +45,9 @@ GpStatus WINGDIPAPI GdipDrawPath(GpGraphics*,GpPen*,GpPath*);
GpStatus WINGDIPAPI GdipDrawPie(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL,REAL,REAL);
GpStatus WINGDIPAPI GdipDrawRectangleI(GpGraphics*,GpPen*,INT,INT,INT,INT);
GpStatus WINGDIPAPI GdipFillPie(GpGraphics*,GpBrush*,REAL,REAL,REAL,REAL,REAL,REAL);
GpStatus WINGDIPAPI GdipGetCompositingQuality(GpGraphics*,CompositingQuality*);
GpStatus WINGDIPAPI GdipGetSmoothingMode(GpGraphics*,SmoothingMode*);
GpStatus WINGDIPAPI GdipSetCompositingQuality(GpGraphics*,CompositingQuality);
GpStatus WINGDIPAPI GdipSetSmoothingMode(GpGraphics*,SmoothingMode);
GpStatus WINGDIPAPI GdipCreateSolidFill(ARGB,GpSolidFill**);