gdiplus: Implement GdipSaveGraphics and GdipRestoreGraphics.
This commit is contained in:
parent
a06c2570e5
commit
1ef13941f6
|
@ -3322,15 +3322,7 @@ GpStatus WINGDIPAPI GdipResetWorldTransform(GpGraphics *graphics)
|
|||
|
||||
GpStatus WINGDIPAPI GdipRestoreGraphics(GpGraphics *graphics, GraphicsState state)
|
||||
{
|
||||
static int calls;
|
||||
|
||||
if(!graphics)
|
||||
return InvalidParameter;
|
||||
|
||||
if(!(calls++))
|
||||
FIXME("graphics state not implemented\n");
|
||||
|
||||
return Ok;
|
||||
return GdipEndContainer(graphics, state);
|
||||
}
|
||||
|
||||
GpStatus WINGDIPAPI GdipRotateWorldTransform(GpGraphics *graphics, REAL angle,
|
||||
|
@ -3349,16 +3341,7 @@ GpStatus WINGDIPAPI GdipRotateWorldTransform(GpGraphics *graphics, REAL angle,
|
|||
|
||||
GpStatus WINGDIPAPI GdipSaveGraphics(GpGraphics *graphics, GraphicsState *state)
|
||||
{
|
||||
static int calls;
|
||||
|
||||
if(!graphics || !state)
|
||||
return InvalidParameter;
|
||||
|
||||
if(!(calls++))
|
||||
FIXME("graphics state not implemented\n");
|
||||
|
||||
*state = 0xdeadbeef;
|
||||
return Ok;
|
||||
return GdipBeginContainer2(graphics, state);
|
||||
}
|
||||
|
||||
GpStatus WINGDIPAPI GdipBeginContainer2(GpGraphics *graphics,
|
||||
|
|
|
@ -137,7 +137,6 @@ static void test_save_restore(void)
|
|||
stat = GdipRestoreGraphics(graphics1, state_a);
|
||||
expect(Ok, stat);
|
||||
GdipGetInterpolationMode(graphics1, &mode);
|
||||
todo_wine
|
||||
expect(InterpolationModeBilinear, mode);
|
||||
GdipDeleteGraphics(graphics1);
|
||||
|
||||
|
@ -154,11 +153,9 @@ static void test_save_restore(void)
|
|||
expect(Ok, stat);
|
||||
GdipRestoreGraphics(graphics1, state_b);
|
||||
GdipGetInterpolationMode(graphics1, &mode);
|
||||
todo_wine
|
||||
expect(InterpolationModeBicubic, mode);
|
||||
GdipRestoreGraphics(graphics1, state_a);
|
||||
GdipGetInterpolationMode(graphics1, &mode);
|
||||
todo_wine
|
||||
expect(InterpolationModeBilinear, mode);
|
||||
GdipDeleteGraphics(graphics1);
|
||||
|
||||
|
@ -176,15 +173,12 @@ static void test_save_restore(void)
|
|||
GdipSetInterpolationMode(graphics1, InterpolationModeHighQualityBilinear);
|
||||
GdipRestoreGraphics(graphics1, state_b);
|
||||
GdipGetInterpolationMode(graphics1, &mode);
|
||||
todo_wine
|
||||
expect(InterpolationModeBicubic, mode);
|
||||
GdipRestoreGraphics(graphics1, state_c);
|
||||
GdipGetInterpolationMode(graphics1, &mode);
|
||||
todo_wine
|
||||
expect(InterpolationModeBicubic, mode);
|
||||
GdipRestoreGraphics(graphics1, state_a);
|
||||
GdipGetInterpolationMode(graphics1, &mode);
|
||||
todo_wine
|
||||
expect(InterpolationModeBilinear, mode);
|
||||
GdipDeleteGraphics(graphics1);
|
||||
|
||||
|
@ -204,11 +198,9 @@ static void test_save_restore(void)
|
|||
GdipSetInterpolationMode(graphics2, InterpolationModeNearestNeighbor);
|
||||
GdipRestoreGraphics(graphics1, state_a);
|
||||
GdipGetInterpolationMode(graphics1, &mode);
|
||||
todo_wine
|
||||
expect(InterpolationModeBilinear, mode);
|
||||
GdipRestoreGraphics(graphics2, state_b);
|
||||
GdipGetInterpolationMode(graphics2, &mode);
|
||||
todo_wine
|
||||
expect(InterpolationModeBicubic, mode);
|
||||
GdipDeleteGraphics(graphics1);
|
||||
GdipDeleteGraphics(graphics2);
|
||||
|
|
Loading…
Reference in New Issue