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
608a936a
Commit
608a936a
authored
Oct 11, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Oct 11, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Clarify where extra Y margin added by GdipMeasureString comes from.
parent
3803134f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
16 deletions
+18
-16
font.c
dlls/gdiplus/tests/font.c
+18
-16
No files found.
dlls/gdiplus/tests/font.c
View file @
608a936a
...
...
@@ -824,7 +824,7 @@ static void test_font_transform(void)
GpMatrix
*
matrix
;
GpStringFormat
*
format
,
*
typographic
;
PointF
pos
[
1
]
=
{
{
0
,
0
}
};
REAL
height
;
REAL
height
,
margin_y
;
RectF
bounds
,
rect
;
hdc
=
CreateCompatibleDC
(
0
);
...
...
@@ -846,6 +846,8 @@ static void test_font_transform(void)
status
=
GdipCreateFontFromLogfontA
(
hdc
,
&
lf
,
&
font
);
expect
(
Ok
,
status
);
margin_y
=
100
.
0
/
8
.
0
;
/* identity matrix */
status
=
GdipCreateMatrix
(
&
matrix
);
expect
(
Ok
,
status
);
...
...
@@ -865,7 +867,7 @@ static void test_font_transform(void)
expectf
(
0
.
0
,
bounds
.
X
);
expectf
(
0
.
0
,
bounds
.
Y
);
todo_wine
expectf
(
133
.
203125
,
bounds
.
Height
);
expectf
(
height
+
margin_y
,
bounds
.
Height
);
set_rect_empty
(
&
rect
);
set_rect_empty
(
&
bounds
);
status
=
GdipMeasureString
(
graphics
,
string
,
-
1
,
font
,
&
rect
,
typographic
,
&
bounds
,
NULL
,
NULL
);
...
...
@@ -873,7 +875,7 @@ todo_wine
expectf
(
0
.
0
,
bounds
.
X
);
expectf
(
0
.
0
,
bounds
.
Y
);
todo_wine
expectf
(
120
.
703125
,
bounds
.
Height
);
expectf
(
height
,
bounds
.
Height
);
set_rect_empty
(
&
bounds
);
status
=
GdipMeasureDriverString
(
graphics
,
(
const
UINT16
*
)
string
,
-
1
,
font
,
pos
,
DriverStringOptionsCmapLookup
,
NULL
,
&
bounds
);
...
...
@@ -882,7 +884,7 @@ todo_wine
todo_wine
expectf_
(
-
100
.
0
,
bounds
.
Y
,
0
.
05
);
todo_wine
expectf
(
120
.
703125
,
bounds
.
Height
);
expectf
(
height
,
bounds
.
Height
);
/* scale matrix */
status
=
GdipScaleMatrix
(
matrix
,
2
.
0
,
3
.
0
,
MatrixOrderAppend
);
...
...
@@ -904,7 +906,7 @@ todo_wine
expectf
(
0
.
0
,
bounds
.
X
);
expectf
(
0
.
0
,
bounds
.
Y
);
todo_wine
expectf
(
133
.
203125
,
bounds
.
Height
);
expectf
(
height
+
margin_y
,
bounds
.
Height
);
set_rect_empty
(
&
rect
);
set_rect_empty
(
&
bounds
);
status
=
GdipMeasureString
(
graphics
,
string
,
-
1
,
font
,
&
rect
,
typographic
,
&
bounds
,
NULL
,
NULL
);
...
...
@@ -912,7 +914,7 @@ todo_wine
expectf
(
0
.
0
,
bounds
.
X
);
expectf
(
0
.
0
,
bounds
.
Y
);
todo_wine
expectf
(
120
.
703125
,
bounds
.
Height
);
expectf
(
height
,
bounds
.
Height
);
set_rect_empty
(
&
bounds
);
status
=
GdipMeasureDriverString
(
graphics
,
(
const
UINT16
*
)
string
,
-
1
,
font
,
pos
,
DriverStringOptionsCmapLookup
,
NULL
,
&
bounds
);
...
...
@@ -921,7 +923,7 @@ todo_wine
todo_wine
expectf_
(
-
100
.
0
,
bounds
.
Y
,
0
.
05
);
todo_wine
expectf
(
120
.
703125
,
bounds
.
Height
);
expectf
(
height
,
bounds
.
Height
);
/* scale + ratate matrix */
status
=
GdipRotateMatrix
(
matrix
,
45
.
0
,
MatrixOrderAppend
);
...
...
@@ -943,7 +945,7 @@ todo_wine
expectf
(
0
.
0
,
bounds
.
X
);
expectf
(
0
.
0
,
bounds
.
Y
);
todo_wine
expectf
(
133
.
203125
,
bounds
.
Height
);
expectf
(
height
+
margin_y
,
bounds
.
Height
);
set_rect_empty
(
&
rect
);
set_rect_empty
(
&
bounds
);
status
=
GdipMeasureString
(
graphics
,
string
,
-
1
,
font
,
&
rect
,
typographic
,
&
bounds
,
NULL
,
NULL
);
...
...
@@ -951,7 +953,7 @@ todo_wine
expectf
(
0
.
0
,
bounds
.
X
);
expectf
(
0
.
0
,
bounds
.
Y
);
todo_wine
expectf
(
120
.
703125
,
bounds
.
Height
);
expectf
(
height
,
bounds
.
Height
);
set_rect_empty
(
&
bounds
);
status
=
GdipMeasureDriverString
(
graphics
,
(
const
UINT16
*
)
string
,
-
1
,
font
,
pos
,
DriverStringOptionsCmapLookup
,
NULL
,
&
bounds
);
...
...
@@ -960,7 +962,7 @@ todo_wine
todo_wine
expectf_
(
-
100
.
0
,
bounds
.
Y
,
0
.
05
);
todo_wine
expectf
(
120
.
703125
,
bounds
.
Height
);
expectf
(
height
,
bounds
.
Height
);
/* scale + ratate + shear matrix */
status
=
GdipShearMatrix
(
matrix
,
4
.
0
,
5
.
0
,
MatrixOrderAppend
);
...
...
@@ -982,7 +984,7 @@ todo_wine
expectf
(
0
.
0
,
bounds
.
X
);
expectf
(
0
.
0
,
bounds
.
Y
);
todo_wine
expectf
(
133
.
203125
,
bounds
.
Height
);
expectf
(
height
+
margin_y
,
bounds
.
Height
);
set_rect_empty
(
&
rect
);
set_rect_empty
(
&
bounds
);
status
=
GdipMeasureString
(
graphics
,
string
,
-
1
,
font
,
&
rect
,
typographic
,
&
bounds
,
NULL
,
NULL
);
...
...
@@ -990,7 +992,7 @@ todo_wine
expectf
(
0
.
0
,
bounds
.
X
);
expectf
(
0
.
0
,
bounds
.
Y
);
todo_wine
expectf
(
120
.
703125
,
bounds
.
Height
);
expectf
(
height
,
bounds
.
Height
);
set_rect_empty
(
&
bounds
);
status
=
GdipMeasureDriverString
(
graphics
,
(
const
UINT16
*
)
string
,
-
1
,
font
,
pos
,
DriverStringOptionsCmapLookup
,
NULL
,
&
bounds
);
...
...
@@ -999,7 +1001,7 @@ todo_wine
todo_wine
expectf_
(
-
100
.
0
,
bounds
.
Y
,
0
.
05
);
todo_wine
expectf
(
120
.
703125
,
bounds
.
Height
);
expectf
(
height
,
bounds
.
Height
);
/* scale + ratate + shear + translate matrix */
status
=
GdipTranslateMatrix
(
matrix
,
10
.
0
,
20
.
0
,
MatrixOrderAppend
);
...
...
@@ -1021,7 +1023,7 @@ todo_wine
expectf
(
0
.
0
,
bounds
.
X
);
expectf
(
0
.
0
,
bounds
.
Y
);
todo_wine
expectf
(
133
.
203125
,
bounds
.
Height
);
expectf
(
height
+
margin_y
,
bounds
.
Height
);
set_rect_empty
(
&
rect
);
set_rect_empty
(
&
bounds
);
status
=
GdipMeasureString
(
graphics
,
string
,
-
1
,
font
,
&
rect
,
typographic
,
&
bounds
,
NULL
,
NULL
);
...
...
@@ -1029,7 +1031,7 @@ todo_wine
expectf
(
0
.
0
,
bounds
.
X
);
expectf
(
0
.
0
,
bounds
.
Y
);
todo_wine
expectf
(
120
.
703125
,
bounds
.
Height
);
expectf
(
height
,
bounds
.
Height
);
set_rect_empty
(
&
bounds
);
status
=
GdipMeasureDriverString
(
graphics
,
(
const
UINT16
*
)
string
,
-
1
,
font
,
pos
,
DriverStringOptionsCmapLookup
,
NULL
,
&
bounds
);
...
...
@@ -1038,7 +1040,7 @@ todo_wine
todo_wine
expectf_
(
-
100
.
0
,
bounds
.
Y
,
0
.
05
);
todo_wine
expectf
(
120
.
703125
,
bounds
.
Height
);
expectf
(
height
,
bounds
.
Height
);
GdipDeleteMatrix
(
matrix
);
GdipDeleteFont
(
font
);
...
...
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