Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
f9b0dac9
Commit
f9b0dac9
authored
Jul 11, 2007
by
Evan Stade
Committed by
Alexandre Julliard
Jul 12, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Added GdipGetPathWorldBounds test.
parent
37d91b04
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
0 deletions
+60
-0
graphicspath.c
dlls/gdiplus/tests/graphicspath.c
+60
-0
No files found.
dlls/gdiplus/tests/graphicspath.c
View file @
f9b0dac9
...
...
@@ -24,6 +24,7 @@
#include <math.h>
#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got)
#define expectf(expected, got) ok(fabs(expected - got) < 2.0, "Expected %.2f, got %.2f\n", expected, got)
#define POINT_TYPE_MAX_LEN (75)
static
void
stringify_point_type
(
PathPointType
type
,
char
*
name
)
...
...
@@ -254,6 +255,64 @@ static void test_arc(void)
ok_path
(
path
,
arc_path
,
sizeof
(
arc_path
)
/
sizeof
(
path_test_t
),
FALSE
);
}
static
void
test_worldbounds
(
void
)
{
GpStatus
status
;
GpPath
*
path
;
GpPen
*
pen
;
GpMatrix
*
matrix
;
GpRectF
bounds
;
GpPointF
line2_points
[
10
];
int
i
;
for
(
i
=
0
;
i
<
10
;
i
++
){
line2_points
[
i
].
X
=
200
.
0
+
i
*
50
.
0
*
(
i
%
2
);
line2_points
[
i
].
Y
=
200
.
0
+
i
*
50
.
0
*
!
(
i
%
2
);
}
GdipCreatePen1
((
ARGB
)
0xdeadbeef
,
20
.
0
,
UnitWorld
,
&
pen
);
GdipSetPenEndCap
(
pen
,
LineCapSquareAnchor
);
GdipCreateMatrix2
(
1
.
5
,
0
.
0
,
1
.
0
,
1
.
2
,
10
.
4
,
10
.
2
,
&
matrix
);
GdipCreatePath
(
FillModeAlternate
,
&
path
);
GdipAddPathArc
(
path
,
100
.
0
,
100
.
0
,
500
.
0
,
700
.
0
,
0
.
0
,
100
.
0
);
GdipAddPathLine2
(
path
,
&
(
line2_points
[
0
]),
10
);
status
=
GdipGetPathWorldBounds
(
path
,
&
bounds
,
NULL
,
NULL
);
expect
(
Ok
,
status
);
GdipDeletePath
(
path
);
expectf
(
200
.
0
,
bounds
.
X
);
expectf
(
200
.
0
,
bounds
.
Y
);
expectf
(
450
.
0
,
bounds
.
Width
);
expectf
(
600
.
0
,
bounds
.
Height
);
GdipCreatePath
(
FillModeAlternate
,
&
path
);
GdipAddPathArc
(
path
,
100
.
0
,
100
.
0
,
500
.
0
,
700
.
0
,
0
.
0
,
100
.
0
);
GdipAddPathLine2
(
path
,
&
(
line2_points
[
0
]),
10
);
status
=
GdipGetPathWorldBounds
(
path
,
&
bounds
,
matrix
,
NULL
);
expect
(
Ok
,
status
);
GdipDeletePath
(
path
);
expectf
(
510
.
4
,
bounds
.
X
);
expectf
(
250
.
2
,
bounds
.
Y
);
expectf
(
1275
.
0
,
bounds
.
Width
);
expectf
(
720
.
0
,
bounds
.
Height
);
GdipCreatePath
(
FillModeAlternate
,
&
path
);
GdipAddPathArc
(
path
,
100
.
0
,
100
.
0
,
500
.
0
,
700
.
0
,
0
.
0
,
100
.
0
);
GdipAddPathLine2
(
path
,
&
(
line2_points
[
0
]),
10
);
status
=
GdipGetPathWorldBounds
(
path
,
&
bounds
,
NULL
,
pen
);
todo_wine
expect
(
Ok
,
status
);
GdipDeletePath
(
path
);
todo_wine
{
expectf
(
100
.
0
,
bounds
.
X
);
expectf
(
100
.
0
,
bounds
.
Y
);
expectf
(
650
.
0
,
bounds
.
Width
);
expectf
(
800
.
0
,
bounds
.
Height
);
}
}
START_TEST
(
graphicspath
)
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
...
@@ -269,6 +328,7 @@ START_TEST(graphicspath)
test_constructor_destructor
();
test_line2
();
test_arc
();
test_worldbounds
();
GdiplusShutdown
(
gdiplusToken
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment