gdiplus: Added smoothing modes.
This commit is contained in:
parent
68a3d94722
commit
53e17d2993
|
@ -368,7 +368,7 @@
|
||||||
@ stub GdipGetRegionScansCount
|
@ stub GdipGetRegionScansCount
|
||||||
@ stub GdipGetRegionScansI
|
@ stub GdipGetRegionScansI
|
||||||
@ stub GdipGetRenderingOrigin
|
@ stub GdipGetRenderingOrigin
|
||||||
@ stub GdipGetSmoothingMode
|
@ stdcall GdipGetSmoothingMode(ptr ptr)
|
||||||
@ stub GdipGetSolidFillColor
|
@ stub GdipGetSolidFillColor
|
||||||
@ stub GdipGetStringFormatAlign
|
@ stub GdipGetStringFormatAlign
|
||||||
@ stub GdipGetStringFormatDigitSubstitution
|
@ stub GdipGetStringFormatDigitSubstitution
|
||||||
|
@ -562,7 +562,7 @@
|
||||||
@ stub GdipSetPixelOffsetMode
|
@ stub GdipSetPixelOffsetMode
|
||||||
@ stub GdipSetPropertyItem
|
@ stub GdipSetPropertyItem
|
||||||
@ stub GdipSetRenderingOrigin
|
@ stub GdipSetRenderingOrigin
|
||||||
@ stub GdipSetSmoothingMode
|
@ stdcall GdipSetSmoothingMode(ptr long)
|
||||||
@ stub GdipSetSolidFillColor
|
@ stub GdipSetSolidFillColor
|
||||||
@ stub GdipSetStringFormatAlign
|
@ stub GdipSetStringFormatAlign
|
||||||
@ stub GdipSetStringFormatDigitSubstitution
|
@ stub GdipSetStringFormatDigitSubstitution
|
||||||
|
|
|
@ -54,6 +54,7 @@ struct GpPen{
|
||||||
struct GpGraphics{
|
struct GpGraphics{
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
HWND hwnd;
|
HWND hwnd;
|
||||||
|
SmoothingMode smoothing;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GpBrush{
|
struct GpBrush{
|
||||||
|
|
|
@ -542,6 +542,7 @@ GpStatus WINGDIPAPI GdipCreateFromHDC(HDC hdc, GpGraphics **graphics)
|
||||||
|
|
||||||
(*graphics)->hdc = hdc;
|
(*graphics)->hdc = hdc;
|
||||||
(*graphics)->hwnd = NULL;
|
(*graphics)->hwnd = NULL;
|
||||||
|
(*graphics)->smoothing = SmoothingModeDefault;
|
||||||
|
|
||||||
return Ok;
|
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,
|
return draw_pie(graphics, brush->gdibrush, GetStockObject(NULL_PEN), x, y,
|
||||||
width, height, startAngle, sweepAngle);
|
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
|
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
|
#ifndef __cplusplus
|
||||||
|
|
||||||
typedef enum Unit Unit;
|
typedef enum Unit Unit;
|
||||||
|
@ -89,6 +107,8 @@ typedef enum FillMode FillMode;
|
||||||
typedef enum LineCap LineCap;
|
typedef enum LineCap LineCap;
|
||||||
typedef enum PathPointType PathPointType;
|
typedef enum PathPointType PathPointType;
|
||||||
typedef enum LineJoin LineJoin;
|
typedef enum LineJoin LineJoin;
|
||||||
|
typedef enum QualityMode QualityMode;
|
||||||
|
typedef enum SmoothingMode SmoothingMode;
|
||||||
|
|
||||||
#endif /* end of c typedefs */
|
#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 GdipDrawPie(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL,REAL,REAL);
|
||||||
GpStatus WINGDIPAPI GdipDrawRectangleI(GpGraphics*,GpPen*,INT,INT,INT,INT);
|
GpStatus WINGDIPAPI GdipDrawRectangleI(GpGraphics*,GpPen*,INT,INT,INT,INT);
|
||||||
GpStatus WINGDIPAPI GdipFillPie(GpGraphics*,GpBrush*,REAL,REAL,REAL,REAL,REAL,REAL);
|
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 GdipCreateSolidFill(ARGB,GpSolidFill**);
|
||||||
GpStatus WINGDIPAPI GdipGetBrushType(GpBrush*,GpBrushType*);
|
GpStatus WINGDIPAPI GdipGetBrushType(GpBrush*,GpBrushType*);
|
||||||
|
|
Loading…
Reference in New Issue