Commit e52a20f5 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

gdiplus: Implement GdipMultiplyPenTransform().

parent 96f6e262
......@@ -496,17 +496,12 @@ GpStatus WINGDIPAPI GdipRotatePenTransform(GpPen *pen, REAL angle, GpMatrixOrder
GpStatus WINGDIPAPI GdipMultiplyPenTransform(GpPen *pen, GDIPCONST GpMatrix *matrix,
GpMatrixOrder order)
{
static int calls;
TRACE("(%p,%p,%u)\n", pen, matrix, order);
if(!pen)
return InvalidParameter;
if(!(calls++))
FIXME("not implemented\n");
return NotImplemented;
return GdipMultiplyMatrix(&pen->transform, matrix, order);
}
GpStatus WINGDIPAPI GdipSetPenBrushFill(GpPen *pen, GpBrush *brush)
......
......@@ -553,6 +553,41 @@ static void test_transform(void)
expectf(1.0, values[4]);
expectf(-2.0, values[5]);
/* Multiply */
status = GdipResetPenTransform(pen);
expect(Ok, status);
status = GdipSetMatrixElements(matrix, 2.0, 1.0, 1.0, 4.0, 1.0, 2.0);
expect(Ok, status);
status = GdipMultiplyPenTransform(NULL, matrix, MatrixOrderPrepend);
expect(InvalidParameter, status);
status = GdipMultiplyPenTransform(pen, matrix, MatrixOrderPrepend);
expect(Ok, status);
get_pen_transform(pen, values);
expectf(2.0, values[0]);
expectf(1.0, values[1]);
expectf(1.0, values[2]);
expectf(4.0, values[3]);
expectf(1.0, values[4]);
expectf(2.0, values[5]);
status = GdipScalePenTransform(pen, 2.0, -10.0, MatrixOrderAppend);
expect(Ok, status);
status = GdipMultiplyPenTransform(pen, matrix, MatrixOrderAppend);
expect(Ok, status);
get_pen_transform(pen, values);
expectf(-2.0, values[0]);
expectf(-36.0, values[1]);
expectf(-36.0, values[2]);
expectf(-158.0, values[3]);
expectf(-15.0, values[4]);
expectf(-76.0, values[5]);
GdipDeletePen(pen);
GdipDeleteMatrix(matrix);
......
......@@ -629,6 +629,7 @@ GpStatus WINGDIPAPI GdipGetPenDashOffset(GpPen*,REAL*);
GpStatus WINGDIPAPI GdipGetPenDashStyle(GpPen*,GpDashStyle*);
GpStatus WINGDIPAPI GdipGetPenMode(GpPen*,GpPenAlignment*);
GpStatus WINGDIPAPI GdipGetPenTransform(GpPen *, GpMatrix *);
GpStatus WINGDIPAPI GdipMultiplyPenTransform(GpPen *,GDIPCONST GpMatrix *,GpMatrixOrder);
GpStatus WINGDIPAPI GdipResetPenTransform(GpPen*);
GpStatus WINGDIPAPI GdipScalePenTransform(GpPen*,REAL,REAL,GpMatrixOrder);
GpStatus WINGDIPAPI GdipSetPenBrushFill(GpPen*,GpBrush*);
......
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