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

gdiplus: Added pixel offset mode.

parent a87ce7ab
......@@ -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)
......
......@@ -57,6 +57,7 @@ struct GpGraphics{
SmoothingMode smoothing;
CompositingQuality compqual;
InterpolationMode interpolation;
PixelOffsetMode pixeloffset;
};
struct GpBrush{
......
......@@ -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)
......
......@@ -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 */
......
......@@ -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**);
......
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