gdiplus: Implement GdipGetPenTransform.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Alistair Leslie-Hughes 2016-01-31 21:55:31 +11:00 committed by Alexandre Julliard
parent 98d5c4a90f
commit b8449062eb
3 changed files with 7 additions and 8 deletions

View File

@ -197,6 +197,7 @@ struct GpPen{
REAL offset; /* dash offset */ REAL offset; /* dash offset */
GpBrush *brush; GpBrush *brush;
GpPenAlignment align; GpPenAlignment align;
GpMatrix transform;
}; };
struct GpGraphics{ struct GpGraphics{

View File

@ -171,6 +171,7 @@ GpStatus WINGDIPAPI GdipCreatePen2(GpBrush *brush, REAL width, GpUnit unit,
gp_pen->offset = 0.0; gp_pen->offset = 0.0;
gp_pen->customstart = NULL; gp_pen->customstart = NULL;
gp_pen->customend = NULL; gp_pen->customend = NULL;
GdipSetMatrixElements(&gp_pen->transform, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0);
if(!((gp_pen->unit == UnitWorld) || (gp_pen->unit == UnitPixel))) { if(!((gp_pen->unit == UnitWorld) || (gp_pen->unit == UnitPixel))) {
FIXME("UnitWorld, UnitPixel only supported units\n"); FIXME("UnitWorld, UnitPixel only supported units\n");
@ -448,17 +449,14 @@ GpStatus WINGDIPAPI GdipSetPenTransform(GpPen *pen, GpMatrix *matrix)
GpStatus WINGDIPAPI GdipGetPenTransform(GpPen *pen, GpMatrix *matrix) GpStatus WINGDIPAPI GdipGetPenTransform(GpPen *pen, GpMatrix *matrix)
{ {
static int calls;
TRACE("(%p,%p)\n", pen, matrix); TRACE("(%p,%p)\n", pen, matrix);
if(!pen || !matrix) if(!pen || !matrix)
return InvalidParameter; return InvalidParameter;
if(!(calls++)) *matrix = pen->transform;
FIXME("not implemented\n");
return NotImplemented; return Ok;
} }
GpStatus WINGDIPAPI GdipTranslatePenTransform(GpPen *pen, REAL dx, REAL dy, GpMatrixOrder order) GpStatus WINGDIPAPI GdipTranslatePenTransform(GpPen *pen, REAL dx, REAL dy, GpMatrixOrder order)

View File

@ -380,7 +380,7 @@ static void test_transform(void)
expect(Ok, status); expect(Ok, status);
status = GdipGetPenTransform(pen, matrix); status = GdipGetPenTransform(pen, matrix);
todo_wine expect(Ok, status); expect(Ok, status);
status = GdipGetMatrixElements(matrix, values); status = GdipGetMatrixElements(matrix, values);
expect(Ok, status); expect(Ok, status);
@ -398,7 +398,7 @@ static void test_transform(void)
GdipDeleteMatrix(matrix2); GdipDeleteMatrix(matrix2);
status = GdipGetPenTransform(pen, matrix); status = GdipGetPenTransform(pen, matrix);
todo_wine expect(Ok, status); expect(Ok, status);
status = GdipGetMatrixElements(matrix, values); status = GdipGetMatrixElements(matrix, values);
expect(Ok, status); expect(Ok, status);
todo_wine { todo_wine {
@ -413,7 +413,7 @@ todo_wine {
todo_wine expect(Ok, status); todo_wine expect(Ok, status);
status = GdipGetPenTransform(pen, matrix); status = GdipGetPenTransform(pen, matrix);
todo_wine expect(Ok, status); expect(Ok, status);
status = GdipGetMatrixElements(matrix, values); status = GdipGetMatrixElements(matrix, values);
expect(Ok, status); expect(Ok, status);