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
0f919e36
Commit
0f919e36
authored
Mar 30, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
Mar 31, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Add tests for GdipDrawString.
parent
d49fe171
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
68 additions
and
0 deletions
+68
-0
graphics.c
dlls/gdiplus/tests/graphics.c
+68
-0
No files found.
dlls/gdiplus/tests/graphics.c
View file @
0f919e36
...
@@ -2400,6 +2400,73 @@ static void test_GdipGetNearestColor(void)
...
@@ -2400,6 +2400,73 @@ static void test_GdipGetNearestColor(void)
ReleaseDC
(
hwnd
,
hdc
);
ReleaseDC
(
hwnd
,
hdc
);
}
}
static
void
test_string_functions
(
void
)
{
GpStatus
status
;
GpGraphics
*
graphics
;
GpFontFamily
*
family
;
GpFont
*
font
;
RectF
rc
;
GpBrush
*
brush
;
ARGB
color
=
0xff000000
;
HDC
hdc
=
GetDC
(
hwnd
);
const
WCHAR
fontname
[]
=
{
'C'
,
'o'
,
'u'
,
'r'
,
'i'
,
'e'
,
'r'
,
' '
,
'N'
,
'e'
,
'w'
,
0
};
const
WCHAR
fontname2
[]
=
{
'C'
,
'o'
,
'u'
,
'r'
,
'i'
,
'e'
,
'r'
,
0
};
const
WCHAR
teststring
[]
=
{
'o'
,
'o'
,
' '
,
'o'
,
'\n'
,
'o'
,
0
};
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
=
GdipCreateFontFamilyFromName
(
fontname
,
NULL
,
&
family
);
if
(
status
!=
Ok
)
{
/* Wine doesn't have Courier New? */
todo_wine
expect
(
Ok
,
status
);
status
=
GdipCreateFontFamilyFromName
(
fontname2
,
NULL
,
&
family
);
}
expect
(
Ok
,
status
);
status
=
GdipCreateFont
(
family
,
10
.
0
,
FontStyleRegular
,
UnitPixel
,
&
font
);
expect
(
Ok
,
status
);
status
=
GdipCreateSolidFill
(
color
,
(
GpSolidFill
**
)
&
brush
);
expect
(
Ok
,
status
);
rc
.
X
=
0
;
rc
.
Y
=
0
;
rc
.
Width
=
100
.
0
;
rc
.
Height
=
100
.
0
;
status
=
GdipDrawString
(
NULL
,
teststring
,
6
,
font
,
&
rc
,
NULL
,
brush
);
expect
(
InvalidParameter
,
status
);
status
=
GdipDrawString
(
graphics
,
NULL
,
6
,
font
,
&
rc
,
NULL
,
brush
);
expect
(
InvalidParameter
,
status
);
status
=
GdipDrawString
(
graphics
,
teststring
,
6
,
NULL
,
&
rc
,
NULL
,
brush
);
expect
(
InvalidParameter
,
status
);
status
=
GdipDrawString
(
graphics
,
teststring
,
6
,
font
,
NULL
,
NULL
,
brush
);
expect
(
InvalidParameter
,
status
);
status
=
GdipDrawString
(
graphics
,
teststring
,
6
,
font
,
&
rc
,
NULL
,
NULL
);
expect
(
InvalidParameter
,
status
);
status
=
GdipDrawString
(
graphics
,
teststring
,
6
,
font
,
&
rc
,
NULL
,
brush
);
expect
(
Ok
,
status
);
GdipDeleteBrush
(
brush
);
GdipDeleteFont
(
font
);
GdipDeleteFontFamily
(
family
);
GdipDeleteGraphics
(
graphics
);
ReleaseDC
(
hwnd
,
hdc
);
}
START_TEST
(
graphics
)
START_TEST
(
graphics
)
{
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
@@ -2452,6 +2519,7 @@ START_TEST(graphics)
...
@@ -2452,6 +2519,7 @@ START_TEST(graphics)
test_clear
();
test_clear
();
test_textcontrast
();
test_textcontrast
();
test_fromMemoryBitmap
();
test_fromMemoryBitmap
();
test_string_functions
();
GdiplusShutdown
(
gdiplusToken
);
GdiplusShutdown
(
gdiplusToken
);
DestroyWindow
(
hwnd
);
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