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 @@ ...@@ -352,7 +352,7 @@
@ stub GdipGetPenTransform @ stub GdipGetPenTransform
@ stub GdipGetPenUnit @ stub GdipGetPenUnit
@ stub GdipGetPenWidth @ stub GdipGetPenWidth
@ stub GdipGetPixelOffsetMode @ stdcall GdipGetPixelOffsetMode(ptr ptr)
@ stdcall GdipGetPointCount(ptr ptr) @ stdcall GdipGetPointCount(ptr ptr)
@ stub GdipGetPropertyCount @ stub GdipGetPropertyCount
@ stub GdipGetPropertyIdList @ stub GdipGetPropertyIdList
...@@ -559,7 +559,7 @@ ...@@ -559,7 +559,7 @@
@ stub GdipSetPenTransform @ stub GdipSetPenTransform
@ stub GdipSetPenUnit @ stub GdipSetPenUnit
@ stub GdipSetPenWidth @ stub GdipSetPenWidth
@ stub GdipSetPixelOffsetMode @ stdcall GdipSetPixelOffsetMode(ptr long)
@ stub GdipSetPropertyItem @ stub GdipSetPropertyItem
@ stub GdipSetRenderingOrigin @ stub GdipSetRenderingOrigin
@ stdcall GdipSetSmoothingMode(ptr long) @ stdcall GdipSetSmoothingMode(ptr long)
......
...@@ -57,6 +57,7 @@ struct GpGraphics{ ...@@ -57,6 +57,7 @@ struct GpGraphics{
SmoothingMode smoothing; SmoothingMode smoothing;
CompositingQuality compqual; CompositingQuality compqual;
InterpolationMode interpolation; InterpolationMode interpolation;
PixelOffsetMode pixeloffset;
}; };
struct GpBrush{ struct GpBrush{
......
...@@ -545,6 +545,7 @@ GpStatus WINGDIPAPI GdipCreateFromHDC(HDC hdc, GpGraphics **graphics) ...@@ -545,6 +545,7 @@ GpStatus WINGDIPAPI GdipCreateFromHDC(HDC hdc, GpGraphics **graphics)
(*graphics)->smoothing = SmoothingModeDefault; (*graphics)->smoothing = SmoothingModeDefault;
(*graphics)->compqual = CompositingQualityDefault; (*graphics)->compqual = CompositingQualityDefault;
(*graphics)->interpolation = InterpolationModeDefault; (*graphics)->interpolation = InterpolationModeDefault;
(*graphics)->pixeloffset = PixelOffsetModeDefault;
return Ok; return Ok;
} }
...@@ -824,6 +825,18 @@ GpStatus WINGDIPAPI GdipGetInterpolationMode(GpGraphics *graphics, ...@@ -824,6 +825,18 @@ GpStatus WINGDIPAPI GdipGetInterpolationMode(GpGraphics *graphics,
return Ok; 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. */ /* FIXME: Smoothing mode is not used anywhere except the getter/setter. */
GpStatus WINGDIPAPI GdipGetSmoothingMode(GpGraphics *graphics, SmoothingMode *mode) GpStatus WINGDIPAPI GdipGetSmoothingMode(GpGraphics *graphics, SmoothingMode *mode)
{ {
...@@ -857,6 +870,17 @@ GpStatus WINGDIPAPI GdipSetInterpolationMode(GpGraphics *graphics, ...@@ -857,6 +870,17 @@ GpStatus WINGDIPAPI GdipSetInterpolationMode(GpGraphics *graphics,
return Ok; 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) GpStatus WINGDIPAPI GdipSetSmoothingMode(GpGraphics *graphics, SmoothingMode mode)
{ {
if(!graphics) if(!graphics)
......
...@@ -122,6 +122,16 @@ enum InterpolationMode ...@@ -122,6 +122,16 @@ enum InterpolationMode
InterpolationModeHighQualityBicubic InterpolationModeHighQualityBicubic
}; };
enum PixelOffsetMode
{
PixelOffsetModeInvalid = QualityModeInvalid,
PixelOffsetModeDefault = QualityModeDefault,
PixelOffsetModeHighSpeed = QualityModeLow,
PixelOffsetModeHighQuality = QualityModeHigh,
PixelOffsetModeNone,
PixelOffsetModeHalf
};
#ifndef __cplusplus #ifndef __cplusplus
typedef enum Unit Unit; typedef enum Unit Unit;
...@@ -134,6 +144,7 @@ typedef enum QualityMode QualityMode; ...@@ -134,6 +144,7 @@ typedef enum QualityMode QualityMode;
typedef enum SmoothingMode SmoothingMode; typedef enum SmoothingMode SmoothingMode;
typedef enum CompositingQuality CompositingQuality; typedef enum CompositingQuality CompositingQuality;
typedef enum InterpolationMode InterpolationMode; typedef enum InterpolationMode InterpolationMode;
typedef enum PixelOffsetMode PixelOffsetMode;
#endif /* end of c typedefs */ #endif /* end of c typedefs */
......
...@@ -47,9 +47,11 @@ GpStatus WINGDIPAPI GdipDrawRectangleI(GpGraphics*,GpPen*,INT,INT,INT,INT); ...@@ -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 GdipFillPie(GpGraphics*,GpBrush*,REAL,REAL,REAL,REAL,REAL,REAL);
GpStatus WINGDIPAPI GdipGetCompositingQuality(GpGraphics*,CompositingQuality*); GpStatus WINGDIPAPI GdipGetCompositingQuality(GpGraphics*,CompositingQuality*);
GpStatus WINGDIPAPI GdipGetInterpolationMode(GpGraphics*,InterpolationMode*); GpStatus WINGDIPAPI GdipGetInterpolationMode(GpGraphics*,InterpolationMode*);
GpStatus WINGDIPAPI GdipGetPixelOffsetMode(GpGraphics*,PixelOffsetMode*);
GpStatus WINGDIPAPI GdipGetSmoothingMode(GpGraphics*,SmoothingMode*); GpStatus WINGDIPAPI GdipGetSmoothingMode(GpGraphics*,SmoothingMode*);
GpStatus WINGDIPAPI GdipSetCompositingQuality(GpGraphics*,CompositingQuality); GpStatus WINGDIPAPI GdipSetCompositingQuality(GpGraphics*,CompositingQuality);
GpStatus WINGDIPAPI GdipSetInterpolationMode(GpGraphics*,InterpolationMode); GpStatus WINGDIPAPI GdipSetInterpolationMode(GpGraphics*,InterpolationMode);
GpStatus WINGDIPAPI GdipSetPixelOffsetMode(GpGraphics*,PixelOffsetMode);
GpStatus WINGDIPAPI GdipSetSmoothingMode(GpGraphics*,SmoothingMode); GpStatus WINGDIPAPI GdipSetSmoothingMode(GpGraphics*,SmoothingMode);
GpStatus WINGDIPAPI GdipCreateSolidFill(ARGB,GpSolidFill**); 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