mirror of
https://github.com/reactos/reactos.git
synced 2025-01-07 06:45:24 +00:00
- Sync gdiplus Winetest too
svn path=/trunk/; revision=38124
This commit is contained in:
parent
587db429a4
commit
a99a144adb
4 changed files with 45 additions and 4 deletions
|
@ -134,7 +134,7 @@ static void test_logfont(void)
|
|||
expect(0, lfw2.lfItalic);
|
||||
expect(0, lfw2.lfUnderline);
|
||||
expect(0, lfw2.lfStrikeOut);
|
||||
expect(0, lfw2.lfCharSet);
|
||||
expect(GetTextCharset(hdc), lfw2.lfCharSet);
|
||||
expect(0, lfw2.lfOutPrecision);
|
||||
expect(0, lfw2.lfClipPrecision);
|
||||
expect(0, lfw2.lfQuality);
|
||||
|
@ -164,7 +164,7 @@ static void test_logfont(void)
|
|||
expect(TRUE, lfw2.lfItalic);
|
||||
expect(TRUE, lfw2.lfUnderline);
|
||||
expect(TRUE, lfw2.lfStrikeOut);
|
||||
expect(0, lfw2.lfCharSet);
|
||||
expect(GetTextCharset(hdc), lfw2.lfCharSet);
|
||||
expect(0, lfw2.lfOutPrecision);
|
||||
expect(0, lfw2.lfClipPrecision);
|
||||
expect(0, lfw2.lfQuality);
|
||||
|
|
|
@ -485,6 +485,7 @@ static void test_Get_Release_DC(void)
|
|||
GpRegion *clip;
|
||||
INT i;
|
||||
BOOL res;
|
||||
ARGB color = 0x00000000;
|
||||
|
||||
pt[0].X = 10;
|
||||
pt[0].Y = 10;
|
||||
|
@ -658,6 +659,8 @@ static void test_Get_Release_DC(void)
|
|||
expect(ObjectBusy, status); status = Ok;
|
||||
status = GdipGetInterpolationMode(graphics, &intmode);
|
||||
expect(ObjectBusy, status); status = Ok;
|
||||
status = GdipGetNearestColor(graphics, &color);
|
||||
expect(ObjectBusy, status); status = Ok;
|
||||
status = GdipGetPageScale(graphics, &r);
|
||||
expect(ObjectBusy, status); status = Ok;
|
||||
status = GdipGetPageUnit(graphics, &unit);
|
||||
|
@ -743,7 +746,6 @@ static void test_Get_Release_DC(void)
|
|||
GdipDeleteBrush((GpBrush*)brush);
|
||||
GdipDeleteRegion(region);
|
||||
GdipDeleteMatrix(m);
|
||||
GdipDeleteRegion(region);
|
||||
|
||||
ReleaseDC(0, hdc);
|
||||
}
|
||||
|
|
|
@ -726,6 +726,15 @@ static path_test_t addcurve_path2[] = {
|
|||
{23.3, 13.3, PathPointTypeBezier, 0, 0}, /*10*/
|
||||
{30.0, 10.0, PathPointTypeBezier, 0, 0} /*11*/
|
||||
};
|
||||
static path_test_t addcurve_path3[] = {
|
||||
{10.0, 10.0, PathPointTypeStart, 0, 0}, /*0*/
|
||||
{13.3, 16.7, PathPointTypeBezier, 0, 1}, /*1*/
|
||||
{3.3, 20.0, PathPointTypeBezier, 0, 0}, /*2*/
|
||||
{10.0, 20.0, PathPointTypeBezier, 0, 0}, /*3*/
|
||||
{16.7, 20.0, PathPointTypeBezier, 0, 0}, /*4*/
|
||||
{23.3, 13.3, PathPointTypeBezier, 0, 0}, /*5*/
|
||||
{30.0, 10.0, PathPointTypeBezier, 0, 0} /*6*/
|
||||
};
|
||||
static void test_addcurve(void)
|
||||
{
|
||||
GpStatus status;
|
||||
|
@ -765,6 +774,37 @@ static void test_addcurve(void)
|
|||
status = GdipAddPathCurve2(path, points, 4, 1.0);
|
||||
expect(Ok, status);
|
||||
ok_path(path, addcurve_path2, sizeof(addcurve_path2)/sizeof(path_test_t), FALSE);
|
||||
|
||||
/* NULL args */
|
||||
GdipResetPath(path);
|
||||
status = GdipAddPathCurve3(NULL, NULL, 0, 0, 0, 0.0);
|
||||
expect(InvalidParameter, status);
|
||||
status = GdipAddPathCurve3(path, NULL, 0, 0, 0, 0.0);
|
||||
expect(InvalidParameter, status);
|
||||
/* wrong count, offset.. */
|
||||
status = GdipAddPathCurve3(path, points, 0, 0, 0, 0.0);
|
||||
expect(InvalidParameter, status);
|
||||
status = GdipAddPathCurve3(path, points, 4, 0, 0, 0.0);
|
||||
expect(InvalidParameter, status);
|
||||
status = GdipAddPathCurve3(path, points, 4, 0, 4, 0.0);
|
||||
expect(InvalidParameter, status);
|
||||
status = GdipAddPathCurve3(path, points, 4, 1, 3, 0.0);
|
||||
expect(InvalidParameter, status);
|
||||
status = GdipAddPathCurve3(path, points, 4, 1, 0, 0.0);
|
||||
expect(InvalidParameter, status);
|
||||
status = GdipAddPathCurve3(path, points, 4, 3, 1, 0.0);
|
||||
expect(InvalidParameter, status);
|
||||
|
||||
/* use all points */
|
||||
status = GdipAddPathCurve3(path, points, 4, 0, 3, 1.0);
|
||||
expect(Ok, status);
|
||||
ok_path(path, addcurve_path, sizeof(addcurve_path)/sizeof(path_test_t), FALSE);
|
||||
GdipResetPath(path);
|
||||
|
||||
status = GdipAddPathCurve3(path, points, 4, 1, 2, 1.0);
|
||||
expect(Ok, status);
|
||||
ok_path(path, addcurve_path3, sizeof(addcurve_path3)/sizeof(path_test_t), FALSE);
|
||||
|
||||
GdipDeletePath(path);
|
||||
}
|
||||
|
||||
|
|
|
@ -670,7 +670,6 @@ static void test_combinereplace(void)
|
|||
expect_magic((DWORD*)(buf + 2));
|
||||
expect_dword(buf + 3, 0);
|
||||
expect_dword(buf + 4, RGNDATA_INFINITE_RECT);
|
||||
GdipDeletePath(path);
|
||||
GdipDeleteRegion(region2);
|
||||
|
||||
/* more complex case : replace with a combined region */
|
||||
|
|
Loading…
Reference in a new issue