gdiplus: Added smoothing modes.
This commit is contained in:
parent
68a3d94722
commit
53e17d2993
|
@ -368,7 +368,7 @@
|
|||
@ stub GdipGetRegionScansCount
|
||||
@ stub GdipGetRegionScansI
|
||||
@ stub GdipGetRenderingOrigin
|
||||
@ stub GdipGetSmoothingMode
|
||||
@ stdcall GdipGetSmoothingMode(ptr ptr)
|
||||
@ stub GdipGetSolidFillColor
|
||||
@ stub GdipGetStringFormatAlign
|
||||
@ stub GdipGetStringFormatDigitSubstitution
|
||||
|
@ -562,7 +562,7 @@
|
|||
@ stub GdipSetPixelOffsetMode
|
||||
@ stub GdipSetPropertyItem
|
||||
@ stub GdipSetRenderingOrigin
|
||||
@ stub GdipSetSmoothingMode
|
||||
@ stdcall GdipSetSmoothingMode(ptr long)
|
||||
@ stub GdipSetSolidFillColor
|
||||
@ stub GdipSetStringFormatAlign
|
||||
@ stub GdipSetStringFormatDigitSubstitution
|
||||
|
|
|
@ -54,6 +54,7 @@ struct GpPen{
|
|||
struct GpGraphics{
|
||||
HDC hdc;
|
||||
HWND hwnd;
|
||||
SmoothingMode smoothing;
|
||||
};
|
||||
|
||||
struct GpBrush{
|
||||
|
|
|
@ -542,6 +542,7 @@ GpStatus WINGDIPAPI GdipCreateFromHDC(HDC hdc, GpGraphics **graphics)
|
|||
|
||||
(*graphics)->hdc = hdc;
|
||||
(*graphics)->hwnd = NULL;
|
||||
(*graphics)->smoothing = SmoothingModeDefault;
|
||||
|
||||
return Ok;
|
||||
}
|
||||
|
@ -796,3 +797,24 @@ GpStatus WINGDIPAPI GdipFillPie(GpGraphics *graphics, GpBrush *brush, REAL x,
|
|||
return draw_pie(graphics, brush->gdibrush, GetStockObject(NULL_PEN), x, y,
|
||||
width, height, startAngle, sweepAngle);
|
||||
}
|
||||
|
||||
/* FIXME: Smoothing mode is not used anywhere except the getter/setter. */
|
||||
GpStatus WINGDIPAPI GdipGetSmoothingMode(GpGraphics *graphics, SmoothingMode *mode)
|
||||
{
|
||||
if(!graphics || !mode)
|
||||
return InvalidParameter;
|
||||
|
||||
*mode = graphics->smoothing;
|
||||
|
||||
return Ok;
|
||||
}
|
||||
|
||||
GpStatus WINGDIPAPI GdipSetSmoothingMode(GpGraphics *graphics, SmoothingMode mode)
|
||||
{
|
||||
if(!graphics)
|
||||
return InvalidParameter;
|
||||
|
||||
graphics->smoothing = mode;
|
||||
|
||||
return Ok;
|
||||
}
|
||||
|
|
|
@ -81,6 +81,24 @@ enum LineJoin
|
|||
LineJoinMiterClipped = 3
|
||||
};
|
||||
|
||||
enum QualityMode
|
||||
{
|
||||
QualityModeInvalid = -1,
|
||||
QualityModeDefault = 0,
|
||||
QualityModeLow = 1,
|
||||
QualityModeHigh = 2
|
||||
};
|
||||
|
||||
enum SmoothingMode
|
||||
{
|
||||
SmoothingModeInvalid = QualityModeInvalid,
|
||||
SmoothingModeDefault = QualityModeDefault,
|
||||
SmoothingModeHighSpeed = QualityModeLow,
|
||||
SmoothingModeHighQuality = QualityModeHigh,
|
||||
SmoothingModeNone,
|
||||
SmoothingModeAntiAlias
|
||||
};
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
typedef enum Unit Unit;
|
||||
|
@ -89,6 +107,8 @@ typedef enum FillMode FillMode;
|
|||
typedef enum LineCap LineCap;
|
||||
typedef enum PathPointType PathPointType;
|
||||
typedef enum LineJoin LineJoin;
|
||||
typedef enum QualityMode QualityMode;
|
||||
typedef enum SmoothingMode SmoothingMode;
|
||||
|
||||
#endif /* end of c typedefs */
|
||||
|
||||
|
|
|
@ -45,6 +45,8 @@ 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 GdipGetSmoothingMode(GpGraphics*,SmoothingMode*);
|
||||
GpStatus WINGDIPAPI GdipSetSmoothingMode(GpGraphics*,SmoothingMode);
|
||||
|
||||
GpStatus WINGDIPAPI GdipCreateSolidFill(ARGB,GpSolidFill**);
|
||||
GpStatus WINGDIPAPI GdipGetBrushType(GpBrush*,GpBrushType*);
|
||||
|
|
Loading…
Reference in New Issue