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
8496db49
Commit
8496db49
authored
Feb 09, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 09, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Some tests for LinearGradientBrush.
parent
17db41c3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
0 deletions
+62
-0
brush.c
dlls/gdiplus/tests/brush.c
+62
-0
No files found.
dlls/gdiplus/tests/brush.c
View file @
8496db49
...
@@ -283,6 +283,67 @@ static void test_texturewrap(void)
...
@@ -283,6 +283,67 @@ static void test_texturewrap(void)
ReleaseDC
(
0
,
hdc
);
ReleaseDC
(
0
,
hdc
);
}
}
static
void
test_gradientgetrect
(
void
)
{
GpLineGradient
*
brush
;
GpRectF
rectf
;
GpStatus
status
;
GpPointF
pt1
,
pt2
;
pt1
.
X
=
pt1
.
Y
=
1
.
0
;
pt2
.
X
=
pt2
.
Y
=
100
.
0
;
status
=
GdipCreateLineBrush
(
&
pt1
,
&
pt2
,
0
,
0
,
WrapModeTile
,
&
brush
);
expect
(
Ok
,
status
);
memset
(
&
rectf
,
0
,
sizeof
(
GpRectF
));
status
=
GdipGetLineRect
(
brush
,
&
rectf
);
expect
(
Ok
,
status
);
expectf
(
1
.
0
,
rectf
.
X
);
expectf
(
1
.
0
,
rectf
.
Y
);
expectf
(
99
.
0
,
rectf
.
Width
);
expectf
(
99
.
0
,
rectf
.
Height
);
status
=
GdipDeleteBrush
((
GpBrush
*
)
brush
);
/* vertical gradient */
pt1
.
X
=
pt1
.
Y
=
pt2
.
X
=
0
.
0
;
pt2
.
Y
=
10
.
0
;
status
=
GdipCreateLineBrush
(
&
pt1
,
&
pt2
,
0
,
0
,
WrapModeTile
,
&
brush
);
expect
(
Ok
,
status
);
memset
(
&
rectf
,
0
,
sizeof
(
GpRectF
));
status
=
GdipGetLineRect
(
brush
,
&
rectf
);
expect
(
Ok
,
status
);
todo_wine
expectf
(
-
5
.
0
,
rectf
.
X
);
expectf
(
0
.
0
,
rectf
.
Y
);
todo_wine
expectf
(
10
.
0
,
rectf
.
Width
);
expectf
(
10
.
0
,
rectf
.
Height
);
status
=
GdipDeleteBrush
((
GpBrush
*
)
brush
);
/* horizontal gradient */
pt1
.
X
=
pt1
.
Y
=
pt2
.
Y
=
0
.
0
;
pt2
.
X
=
10
.
0
;
status
=
GdipCreateLineBrush
(
&
pt1
,
&
pt2
,
0
,
0
,
WrapModeTile
,
&
brush
);
expect
(
Ok
,
status
);
memset
(
&
rectf
,
0
,
sizeof
(
GpRectF
));
status
=
GdipGetLineRect
(
brush
,
&
rectf
);
expect
(
Ok
,
status
);
expectf
(
0
.
0
,
rectf
.
X
);
todo_wine
expectf
(
-
5
.
0
,
rectf
.
Y
);
expectf
(
10
.
0
,
rectf
.
Width
);
todo_wine
expectf
(
10
.
0
,
rectf
.
Height
);
status
=
GdipDeleteBrush
((
GpBrush
*
)
brush
);
/* from rect with LinearGradientModeHorizontal */
rectf
.
X
=
rectf
.
Y
=
10
.
0
;
rectf
.
Width
=
rectf
.
Height
=
100
.
0
;
status
=
GdipCreateLineBrushFromRect
(
&
rectf
,
0
,
0
,
LinearGradientModeHorizontal
,
WrapModeTile
,
&
brush
);
expect
(
Ok
,
status
);
memset
(
&
rectf
,
0
,
sizeof
(
GpRectF
));
status
=
GdipGetLineRect
(
brush
,
&
rectf
);
expect
(
Ok
,
status
);
expectf
(
10
.
0
,
rectf
.
X
);
expectf
(
10
.
0
,
rectf
.
Y
);
expectf
(
100
.
0
,
rectf
.
Width
);
expectf
(
100
.
0
,
rectf
.
Height
);
status
=
GdipDeleteBrush
((
GpBrush
*
)
brush
);
}
START_TEST
(
brush
)
START_TEST
(
brush
)
{
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
@@ -303,6 +364,7 @@ START_TEST(brush)
...
@@ -303,6 +364,7 @@ START_TEST(brush)
test_getgamma
();
test_getgamma
();
test_transform
();
test_transform
();
test_texturewrap
();
test_texturewrap
();
test_gradientgetrect
();
GdiplusShutdown
(
gdiplusToken
);
GdiplusShutdown
(
gdiplusToken
);
}
}
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