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
acc4623f
Commit
acc4623f
authored
Aug 21, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Aug 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Use set_rect_empty() helper to make the code slightly more compact and readable.
parent
10c84dfe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
15 deletions
+9
-15
graphics.c
dlls/gdiplus/tests/graphics.c
+9
-15
No files found.
dlls/gdiplus/tests/graphics.c
View file @
acc4623f
...
...
@@ -3445,7 +3445,7 @@ static void test_GdipMeasureString(void)
GpFontFamily
*
family
;
GpFont
*
font
;
GpStringFormat
*
format
;
RectF
bounds
,
rc
,
empty_rc
=
{
0
.
0
,
0
.
0
,
0
.
0
,
0
.
0
}
;
RectF
bounds
,
rc
;
REAL
base_cx
=
0
,
base_cy
=
0
,
height
;
INT
chars
,
lines
;
LOGFONTW
lf
;
...
...
@@ -3492,8 +3492,8 @@ static void test_GdipMeasureString(void)
height
=
font_size
*
font_to_pixel_scale
;
rc
=
empty_rc
;
bounds
=
empty_rc
;
set_rect_empty
(
&
rc
)
;
set_rect_empty
(
&
bounds
)
;
status
=
GdipMeasureString
(
graphics
,
string
,
-
1
,
font
,
&
rc
,
format
,
&
bounds
,
&
chars
,
&
lines
);
expect
(
Ok
,
status
);
...
...
@@ -3516,7 +3516,7 @@ static void test_GdipMeasureString(void)
rc
=
bounds
;
rc
.
X
=
50
.
0
;
rc
.
Y
=
50
.
0
;
bounds
=
empty_rc
;
set_rect_empty
(
&
bounds
)
;
status
=
GdipMeasureString
(
graphics
,
string
,
-
1
,
font
,
&
rc
,
format
,
&
bounds
,
&
chars
,
&
lines
);
expect
(
Ok
,
status
);
expectf
(
50
.
0
,
bounds
.
X
);
...
...
@@ -3574,8 +3574,8 @@ static void test_GdipMeasureString(void)
height
/=
td
[
i
].
page_scale
;
/*trace("%u: %.1f font units = %f units with %.1f dpi, page_scale %.1f\n", i, font_size, height, td[i].res_y, td[i].page_scale);*/
rc
=
empty_rc
;
bounds
=
empty_rc
;
set_rect_empty
(
&
rc
)
;
set_rect_empty
(
&
bounds
)
;
status
=
GdipMeasureString
(
graphics
,
string
,
-
1
,
font
,
&
rc
,
format
,
&
bounds
,
&
chars
,
&
lines
);
expect
(
Ok
,
status
);
...
...
@@ -3598,7 +3598,7 @@ static void test_GdipMeasureString(void)
rc
=
bounds
;
rc
.
X
=
50
.
0
;
rc
.
Y
=
50
.
0
;
bounds
=
empty_rc
;
set_rect_empty
(
&
bounds
)
;
status
=
GdipMeasureString
(
graphics
,
string
,
-
1
,
font
,
&
rc
,
format
,
&
bounds
,
&
chars
,
&
lines
);
expect
(
Ok
,
status
);
expectf
(
50
.
0
,
bounds
.
X
);
...
...
@@ -3749,14 +3749,8 @@ static void test_font_height_scaling(void)
status
=
GdipSetPageUnit
(
graphics
,
gfx_unit
);
expect
(
Ok
,
status
);
rect
.
X
=
0
.
0
;
rect
.
Y
=
0
.
0
;
rect
.
Width
=
0
;
rect
.
Height
=
0
;
bounds
.
X
=
0
.
0
;
bounds
.
Y
=
0
.
0
;
bounds
.
Width
=
0
;
bounds
.
Height
=
0
;
set_rect_empty
(
&
rect
);
set_rect_empty
(
&
bounds
);
status
=
GdipMeasureString
(
graphics
,
string
,
-
1
,
font
,
&
rect
,
format
,
&
bounds
,
NULL
,
NULL
);
expect
(
Ok
,
status
);
...
...
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