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
b3dfe973
Commit
b3dfe973
authored
Mar 28, 2011
by
Vincent Povirk
Committed by
Alexandre Julliard
Mar 29, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Add test for GdipSetTextRenderingHint and make it pass.
parent
204253b6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
1 deletion
+50
-1
graphics.c
dlls/gdiplus/graphics.c
+1
-1
graphics.c
dlls/gdiplus/tests/graphics.c
+49
-0
No files found.
dlls/gdiplus/graphics.c
View file @
b3dfe973
...
...
@@ -5023,7 +5023,7 @@ GpStatus WINGDIPAPI GdipSetTextRenderingHint(GpGraphics *graphics,
{
TRACE
(
"(%p, %d)
\n
"
,
graphics
,
hint
);
if
(
!
graphics
)
if
(
!
graphics
||
hint
>
TextRenderingHintClearTypeGridFit
)
return
InvalidParameter
;
if
(
graphics
->
busy
)
...
...
dlls/gdiplus/tests/graphics.c
View file @
b3dfe973
...
...
@@ -3113,6 +3113,54 @@ static void test_get_set_interpolation(void)
ReleaseDC
(
hwnd
,
hdc
);
}
static
void
test_get_set_textrenderinghint
(
void
)
{
GpGraphics
*
graphics
;
HDC
hdc
=
GetDC
(
hwnd
);
GpStatus
status
;
TextRenderingHint
hint
;
ok
(
hdc
!=
NULL
,
"Expected HDC to be initialized
\n
"
);
status
=
GdipCreateFromHDC
(
hdc
,
&
graphics
);
expect
(
Ok
,
status
);
ok
(
graphics
!=
NULL
,
"Expected graphics to be initialized
\n
"
);
status
=
GdipGetTextRenderingHint
(
NULL
,
&
hint
);
expect
(
InvalidParameter
,
status
);
status
=
GdipGetTextRenderingHint
(
graphics
,
NULL
);
expect
(
InvalidParameter
,
status
);
status
=
GdipSetTextRenderingHint
(
NULL
,
TextRenderingHintAntiAlias
);
expect
(
InvalidParameter
,
status
);
/* out of range */
status
=
GdipSetTextRenderingHint
(
graphics
,
TextRenderingHintClearTypeGridFit
+
1
);
expect
(
InvalidParameter
,
status
);
status
=
GdipGetTextRenderingHint
(
graphics
,
&
hint
);
expect
(
Ok
,
status
);
expect
(
TextRenderingHintSystemDefault
,
hint
);
status
=
GdipSetTextRenderingHint
(
graphics
,
TextRenderingHintSystemDefault
);
expect
(
Ok
,
status
);
status
=
GdipGetTextRenderingHint
(
graphics
,
&
hint
);
expect
(
Ok
,
status
);
expect
(
TextRenderingHintSystemDefault
,
hint
);
status
=
GdipSetTextRenderingHint
(
graphics
,
TextRenderingHintAntiAliasGridFit
);
expect
(
Ok
,
status
);
status
=
GdipGetTextRenderingHint
(
graphics
,
&
hint
);
expect
(
Ok
,
status
);
expect
(
TextRenderingHintAntiAliasGridFit
,
hint
);
GdipDeleteGraphics
(
graphics
);
ReleaseDC
(
hwnd
,
hdc
);
}
START_TEST
(
graphics
)
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
...
@@ -3172,6 +3220,7 @@ START_TEST(graphics)
test_fromMemoryBitmap
();
test_string_functions
();
test_get_set_interpolation
();
test_get_set_textrenderinghint
();
GdiplusShutdown
(
gdiplusToken
);
DestroyWindow
(
hwnd
);
...
...
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