Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
e664c2bd
Commit
e664c2bd
authored
Oct 08, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Oct 08, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Add a font transformation test.
parent
4cb3bcdb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
70 additions
and
0 deletions
+70
-0
font.c
dlls/gdiplus/tests/font.c
+70
-0
No files found.
dlls/gdiplus/tests/font.c
View file @
e664c2bd
...
...
@@ -804,6 +804,75 @@ todo_wine
DeleteDC
(
hdc
);
}
static
void
test_font_transform
(
void
)
{
GpStatus
status
;
HDC
hdc
;
LOGFONT
lf
;
GpFont
*
font
;
GpGraphics
*
graphics
;
GpMatrix
*
matrix
;
hdc
=
CreateCompatibleDC
(
0
);
status
=
GdipCreateFromHDC
(
hdc
,
&
graphics
);
expect
(
Ok
,
status
);
memset
(
&
lf
,
0
,
sizeof
(
lf
));
lstrcpy
(
lf
.
lfFaceName
,
"Tahoma"
);
lf
.
lfHeight
=
-
100
;
lf
.
lfWidth
=
100
;
status
=
GdipCreateFontFromLogfontA
(
hdc
,
&
lf
,
&
font
);
expect
(
Ok
,
status
);
/* identity matrix */
status
=
GdipCreateMatrix
(
&
matrix
);
expect
(
Ok
,
status
);
status
=
GdipSetWorldTransform
(
graphics
,
matrix
);
expect
(
Ok
,
status
);
status
=
GdipGetLogFontA
(
font
,
graphics
,
&
lf
);
expect
(
Ok
,
status
);
expect
(
-
100
,
lf
.
lfHeight
);
expect
(
0
,
lf
.
lfWidth
);
/* scale matrix */
status
=
GdipScaleMatrix
(
matrix
,
2
.
0
,
3
.
0
,
MatrixOrderAppend
);
expect
(
Ok
,
status
);
status
=
GdipSetWorldTransform
(
graphics
,
matrix
);
expect
(
Ok
,
status
);
status
=
GdipGetLogFontA
(
font
,
graphics
,
&
lf
);
expect
(
Ok
,
status
);
todo_wine
expect
(
-
300
,
lf
.
lfHeight
);
expect
(
0
,
lf
.
lfWidth
);
/* scale + ratate matrix */
status
=
GdipRotateMatrix
(
matrix
,
45
.
0
,
MatrixOrderAppend
);
expect
(
Ok
,
status
);
status
=
GdipSetWorldTransform
(
graphics
,
matrix
);
expect
(
Ok
,
status
);
status
=
GdipGetLogFontA
(
font
,
graphics
,
&
lf
);
expect
(
Ok
,
status
);
todo_wine
expect
(
-
300
,
lf
.
lfHeight
);
expect
(
0
,
lf
.
lfWidth
);
/* scale + ratate + shear matrix */
status
=
GdipShearMatrix
(
matrix
,
4
.
0
,
5
.
0
,
MatrixOrderAppend
);
expect
(
Ok
,
status
);
status
=
GdipSetWorldTransform
(
graphics
,
matrix
);
expect
(
Ok
,
status
);
status
=
GdipGetLogFontA
(
font
,
graphics
,
&
lf
);
expect
(
Ok
,
status
);
todo_wine
expect
(
1032
,
lf
.
lfHeight
);
expect
(
0
,
lf
.
lfWidth
);
GdipDeleteMatrix
(
matrix
);
GdipDeleteFont
(
font
);
GdipDeleteGraphics
(
graphics
);
DeleteDC
(
hdc
);
}
START_TEST
(
font
)
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
...
@@ -816,6 +885,7 @@ START_TEST(font)
GdiplusStartup
(
&
gdiplusToken
,
&
gdiplusStartupInput
,
NULL
);
test_font_transform
();
test_font_substitution
();
test_font_metrics
();
test_createfont
();
...
...
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