Commit a87ce7ab authored by Evan Stade's avatar Evan Stade Committed by Alexandre Julliard

gdiplus: Added interpolation mode.

parent 60cad235
......@@ -283,7 +283,7 @@
@ stub GdipGetImageType
@ stub GdipGetImageVerticalResolution
@ stub GdipGetImageWidth
@ stub GdipGetInterpolationMode
@ stdcall GdipGetInterpolationMode(ptr ptr)
@ stub GdipGetLineBlend
@ stub GdipGetLineBlendCount
@ stub GdipGetLineColors
......@@ -513,7 +513,7 @@
@ stub GdipSetImageAttributesWrapMode
@ stub GdipSetImagePalette
@ stub GdipSetInfinite
@ stub GdipSetInterpolationMode
@ stdcall GdipSetInterpolationMode(ptr long)
@ stub GdipSetLineBlend
@ stub GdipSetLineColors
@ stub GdipSetLineGammaCorrection
......
......@@ -56,6 +56,7 @@ struct GpGraphics{
HWND hwnd;
SmoothingMode smoothing;
CompositingQuality compqual;
InterpolationMode interpolation;
};
struct GpBrush{
......
......@@ -544,6 +544,7 @@ GpStatus WINGDIPAPI GdipCreateFromHDC(HDC hdc, GpGraphics **graphics)
(*graphics)->hwnd = NULL;
(*graphics)->smoothing = SmoothingModeDefault;
(*graphics)->compqual = CompositingQualityDefault;
(*graphics)->interpolation = InterpolationModeDefault;
return Ok;
}
......@@ -811,6 +812,18 @@ GpStatus WINGDIPAPI GdipGetCompositingQuality(GpGraphics *graphics,
return Ok;
}
/* FIXME: Interpolation mode is not used anywhere except the getter/setter. */
GpStatus WINGDIPAPI GdipGetInterpolationMode(GpGraphics *graphics,
InterpolationMode *mode)
{
if(!graphics || !mode)
return InvalidParameter;
*mode = graphics->interpolation;
return Ok;
}
/* FIXME: Smoothing mode is not used anywhere except the getter/setter. */
GpStatus WINGDIPAPI GdipGetSmoothingMode(GpGraphics *graphics, SmoothingMode *mode)
{
......@@ -833,6 +846,17 @@ GpStatus WINGDIPAPI GdipSetCompositingQuality(GpGraphics *graphics,
return Ok;
}
GpStatus WINGDIPAPI GdipSetInterpolationMode(GpGraphics *graphics,
InterpolationMode mode)
{
if(!graphics)
return InvalidParameter;
graphics->interpolation = mode;
return Ok;
}
GpStatus WINGDIPAPI GdipSetSmoothingMode(GpGraphics *graphics, SmoothingMode mode)
{
if(!graphics)
......
......@@ -109,6 +109,19 @@ enum CompositingQuality
CompositingQualityAssumeLinear
};
enum InterpolationMode
{
InterpolationModeInvalid = QualityModeInvalid,
InterpolationModeDefault = QualityModeDefault,
InterpolationModeLowQuality = QualityModeLow,
InterpolationModeHighQuality = QualityModeHigh,
InterpolationModeBilinear,
InterpolationModeBicubic,
InterpolationModeNearestNeighbor,
InterpolationModeHighQualityBilinear,
InterpolationModeHighQualityBicubic
};
#ifndef __cplusplus
typedef enum Unit Unit;
......@@ -120,6 +133,7 @@ typedef enum LineJoin LineJoin;
typedef enum QualityMode QualityMode;
typedef enum SmoothingMode SmoothingMode;
typedef enum CompositingQuality CompositingQuality;
typedef enum InterpolationMode InterpolationMode;
#endif /* end of c typedefs */
......
......@@ -46,8 +46,10 @@ 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 GdipGetInterpolationMode(GpGraphics*,InterpolationMode*);
GpStatus WINGDIPAPI GdipGetSmoothingMode(GpGraphics*,SmoothingMode*);
GpStatus WINGDIPAPI GdipSetCompositingQuality(GpGraphics*,CompositingQuality);
GpStatus WINGDIPAPI GdipSetInterpolationMode(GpGraphics*,InterpolationMode);
GpStatus WINGDIPAPI GdipSetSmoothingMode(GpGraphics*,SmoothingMode);
GpStatus WINGDIPAPI GdipCreateSolidFill(ARGB,GpSolidFill**);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment