gdiplus: Added pixel offset mode.

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

View File

@ -352,7 +352,7 @@
@ stub GdipGetPenTransform
@ stub GdipGetPenUnit
@ stub GdipGetPenWidth
@ stub GdipGetPixelOffsetMode
@ stdcall GdipGetPixelOffsetMode(ptr ptr)
@ stdcall GdipGetPointCount(ptr ptr)
@ stub GdipGetPropertyCount
@ stub GdipGetPropertyIdList
@ -559,7 +559,7 @@
@ stub GdipSetPenTransform
@ stub GdipSetPenUnit
@ stub GdipSetPenWidth
@ stub GdipSetPixelOffsetMode
@ stdcall GdipSetPixelOffsetMode(ptr long)
@ stub GdipSetPropertyItem
@ stub GdipSetRenderingOrigin
@ stdcall GdipSetSmoothingMode(ptr long)

View File

@ -57,6 +57,7 @@ struct GpGraphics{
SmoothingMode smoothing;
CompositingQuality compqual;
InterpolationMode interpolation;
PixelOffsetMode pixeloffset;
};
struct GpBrush{

View File

@ -545,6 +545,7 @@ GpStatus WINGDIPAPI GdipCreateFromHDC(HDC hdc, GpGraphics **graphics)
(*graphics)->smoothing = SmoothingModeDefault;
(*graphics)->compqual = CompositingQualityDefault;
(*graphics)->interpolation = InterpolationModeDefault;
(*graphics)->pixeloffset = PixelOffsetModeDefault;
return Ok;
}
@ -824,6 +825,18 @@ GpStatus WINGDIPAPI GdipGetInterpolationMode(GpGraphics *graphics,
return Ok;
}
/* FIXME: Pixel offset mode is not used anywhere except the getter/setter. */
GpStatus WINGDIPAPI GdipGetPixelOffsetMode(GpGraphics *graphics, PixelOffsetMode
*mode)
{
if(!graphics || !mode)
return InvalidParameter;
*mode = graphics->pixeloffset;
return Ok;
}
/* FIXME: Smoothing mode is not used anywhere except the getter/setter. */
GpStatus WINGDIPAPI GdipGetSmoothingMode(GpGraphics *graphics, SmoothingMode *mode)
{
@ -857,6 +870,17 @@ GpStatus WINGDIPAPI GdipSetInterpolationMode(GpGraphics *graphics,
return Ok;
}
GpStatus WINGDIPAPI GdipSetPixelOffsetMode(GpGraphics *graphics, PixelOffsetMode
mode)
{
if(!graphics)
return InvalidParameter;
graphics->pixeloffset = mode;
return Ok;
}
GpStatus WINGDIPAPI GdipSetSmoothingMode(GpGraphics *graphics, SmoothingMode mode)
{
if(!graphics)

View File

@ -122,6 +122,16 @@ enum InterpolationMode
InterpolationModeHighQualityBicubic
};
enum PixelOffsetMode
{
PixelOffsetModeInvalid = QualityModeInvalid,
PixelOffsetModeDefault = QualityModeDefault,
PixelOffsetModeHighSpeed = QualityModeLow,
PixelOffsetModeHighQuality = QualityModeHigh,
PixelOffsetModeNone,
PixelOffsetModeHalf
};
#ifndef __cplusplus
typedef enum Unit Unit;
@ -134,6 +144,7 @@ typedef enum QualityMode QualityMode;
typedef enum SmoothingMode SmoothingMode;
typedef enum CompositingQuality CompositingQuality;
typedef enum InterpolationMode InterpolationMode;
typedef enum PixelOffsetMode PixelOffsetMode;
#endif /* end of c typedefs */

View File

@ -47,9 +47,11 @@ 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 GdipGetPixelOffsetMode(GpGraphics*,PixelOffsetMode*);
GpStatus WINGDIPAPI GdipGetSmoothingMode(GpGraphics*,SmoothingMode*);
GpStatus WINGDIPAPI GdipSetCompositingQuality(GpGraphics*,CompositingQuality);
GpStatus WINGDIPAPI GdipSetInterpolationMode(GpGraphics*,InterpolationMode);
GpStatus WINGDIPAPI GdipSetPixelOffsetMode(GpGraphics*,PixelOffsetMode);
GpStatus WINGDIPAPI GdipSetSmoothingMode(GpGraphics*,SmoothingMode);
GpStatus WINGDIPAPI GdipCreateSolidFill(ARGB,GpSolidFill**);