gdiplus: Added interpolation mode.

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

View File

@ -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

View File

@ -56,6 +56,7 @@ struct GpGraphics{
HWND hwnd;
SmoothingMode smoothing;
CompositingQuality compqual;
InterpolationMode interpolation;
};
struct GpBrush{

View File

@ -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)

View File

@ -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 */

View File

@ -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**);