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
f49d56fe
Commit
f49d56fe
authored
Oct 30, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
Nov 01, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Add tests for GdipGetLineTransform.
parent
3e86d430
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
92 additions
and
0 deletions
+92
-0
brush.c
dlls/gdiplus/tests/brush.c
+91
-0
gdiplusflat.h
include/gdiplusflat.h
+1
-0
No files found.
dlls/gdiplus/tests/brush.c
View file @
f49d56fe
...
...
@@ -286,10 +286,15 @@ static void test_texturewrap(void)
static
void
test_gradientgetrect
(
void
)
{
GpLineGradient
*
brush
;
GpMatrix
*
transform
;
REAL
elements
[
6
];
GpRectF
rectf
;
GpStatus
status
;
GpPointF
pt1
,
pt2
;
status
=
GdipCreateMatrix
(
&
transform
);
expect
(
Ok
,
status
);
pt1
.
X
=
pt1
.
Y
=
1
.
0
;
pt2
.
X
=
pt2
.
Y
=
100
.
0
;
status
=
GdipCreateLineBrush
(
&
pt1
,
&
pt2
,
0
,
0
,
WrapModeTile
,
&
brush
);
...
...
@@ -301,6 +306,18 @@ static void test_gradientgetrect(void)
expectf
(
1
.
0
,
rectf
.
Y
);
expectf
(
99
.
0
,
rectf
.
Width
);
expectf
(
99
.
0
,
rectf
.
Height
);
status
=
GdipGetLineTransform
(
brush
,
transform
);
todo_wine
expect
(
Ok
,
status
);
if
(
status
==
Ok
)
{
status
=
GdipGetMatrixElements
(
transform
,
elements
);
expectf
(
1
.
0
,
elements
[
0
]);
expectf
(
1
.
0
,
elements
[
1
]);
expectf
(
-
1
.
0
,
elements
[
2
]);
expectf
(
1
.
0
,
elements
[
3
]);
expectf
(
50
.
50
,
elements
[
4
]);
expectf
(
-
50
.
50
,
elements
[
5
]);
}
status
=
GdipDeleteBrush
((
GpBrush
*
)
brush
);
/* vertical gradient */
pt1
.
X
=
pt1
.
Y
=
pt2
.
X
=
0
.
0
;
...
...
@@ -314,6 +331,18 @@ static void test_gradientgetrect(void)
expectf
(
0
.
0
,
rectf
.
Y
);
expectf
(
10
.
0
,
rectf
.
Width
);
expectf
(
10
.
0
,
rectf
.
Height
);
status
=
GdipGetLineTransform
(
brush
,
transform
);
todo_wine
expect
(
Ok
,
status
);
if
(
status
==
Ok
)
{
status
=
GdipGetMatrixElements
(
transform
,
elements
);
expectf
(
0
.
0
,
elements
[
0
]);
expectf
(
1
.
0
,
elements
[
1
]);
expectf
(
-
1
.
0
,
elements
[
2
]);
expectf
(
0
.
0
,
elements
[
3
]);
expectf
(
5
.
0
,
elements
[
4
]);
expectf
(
5
.
0
,
elements
[
5
]);
}
status
=
GdipDeleteBrush
((
GpBrush
*
)
brush
);
/* horizontal gradient */
pt1
.
X
=
pt1
.
Y
=
pt2
.
Y
=
0
.
0
;
...
...
@@ -327,6 +356,18 @@ static void test_gradientgetrect(void)
expectf
(
-
5
.
0
,
rectf
.
Y
);
expectf
(
10
.
0
,
rectf
.
Width
);
expectf
(
10
.
0
,
rectf
.
Height
);
status
=
GdipGetLineTransform
(
brush
,
transform
);
todo_wine
expect
(
Ok
,
status
);
if
(
status
==
Ok
)
{
status
=
GdipGetMatrixElements
(
transform
,
elements
);
expectf
(
1
.
0
,
elements
[
0
]);
expectf
(
0
.
0
,
elements
[
1
]);
expectf
(
0
.
0
,
elements
[
2
]);
expectf
(
1
.
0
,
elements
[
3
]);
expectf
(
0
.
0
,
elements
[
4
]);
expectf
(
0
.
0
,
elements
[
5
]);
}
status
=
GdipDeleteBrush
((
GpBrush
*
)
brush
);
/* slope = -1 */
pt1
.
X
=
pt1
.
Y
=
0
.
0
;
...
...
@@ -341,6 +382,18 @@ static void test_gradientgetrect(void)
expectf
(
-
20
.
0
,
rectf
.
Y
);
expectf
(
20
.
0
,
rectf
.
Width
);
expectf
(
20
.
0
,
rectf
.
Height
);
status
=
GdipGetLineTransform
(
brush
,
transform
);
todo_wine
expect
(
Ok
,
status
);
if
(
status
==
Ok
)
{
status
=
GdipGetMatrixElements
(
transform
,
elements
);
expectf
(
1
.
0
,
elements
[
0
]);
expectf
(
-
1
.
0
,
elements
[
1
]);
expectf
(
1
.
0
,
elements
[
2
]);
expectf
(
1
.
0
,
elements
[
3
]);
expectf
(
10
.
0
,
elements
[
4
]);
expectf
(
10
.
0
,
elements
[
5
]);
}
status
=
GdipDeleteBrush
((
GpBrush
*
)
brush
);
/* slope = 1/100 */
pt1
.
X
=
pt1
.
Y
=
0
.
0
;
...
...
@@ -355,6 +408,18 @@ static void test_gradientgetrect(void)
expectf
(
0
.
0
,
rectf
.
Y
);
expectf
(
100
.
0
,
rectf
.
Width
);
expectf
(
1
.
0
,
rectf
.
Height
);
status
=
GdipGetLineTransform
(
brush
,
transform
);
todo_wine
expect
(
Ok
,
status
);
if
(
status
==
Ok
)
{
status
=
GdipGetMatrixElements
(
transform
,
elements
);
expectf
(
1
.
0
,
elements
[
0
]);
expectf
(
0
.
01
,
elements
[
1
]);
expectf
(
-
0
.
02
,
elements
[
2
]);
/* expectf(2.0, elements[3]); */
expectf
(
0
.
01
,
elements
[
4
]);
/* expectf(-1.0, elements[5]); */
}
status
=
GdipDeleteBrush
((
GpBrush
*
)
brush
);
/* zero height rect */
rectf
.
X
=
rectf
.
Y
=
10
.
0
;
...
...
@@ -383,6 +448,18 @@ static void test_gradientgetrect(void)
expectf
(
10
.
0
,
rectf
.
Y
);
expectf
(
100
.
0
,
rectf
.
Width
);
expectf
(
100
.
0
,
rectf
.
Height
);
status
=
GdipGetLineTransform
(
brush
,
transform
);
todo_wine
expect
(
Ok
,
status
);
if
(
status
==
Ok
)
{
status
=
GdipGetMatrixElements
(
transform
,
elements
);
expectf
(
1
.
0
,
elements
[
0
]);
expectf
(
0
.
0
,
elements
[
1
]);
expectf
(
0
.
0
,
elements
[
2
]);
expectf
(
1
.
0
,
elements
[
3
]);
expectf
(
0
.
0
,
elements
[
4
]);
expectf
(
0
.
0
,
elements
[
5
]);
}
status
=
GdipDeleteBrush
((
GpBrush
*
)
brush
);
/* passing negative Width/Height to LinearGradientModeHorizontal */
rectf
.
X
=
rectf
.
Y
=
10
.
0
;
...
...
@@ -397,7 +474,21 @@ static void test_gradientgetrect(void)
expectf
(
10
.
0
,
rectf
.
Y
);
expectf
(
-
100
.
0
,
rectf
.
Width
);
expectf
(
-
100
.
0
,
rectf
.
Height
);
status
=
GdipGetLineTransform
(
brush
,
transform
);
todo_wine
expect
(
Ok
,
status
);
if
(
status
==
Ok
)
{
status
=
GdipGetMatrixElements
(
transform
,
elements
);
expectf
(
1
.
0
,
elements
[
0
]);
expectf
(
0
.
0
,
elements
[
1
]);
expectf
(
0
.
0
,
elements
[
2
]);
expectf
(
1
.
0
,
elements
[
3
]);
expectf
(
0
.
0
,
elements
[
4
]);
expectf
(
0
.
0
,
elements
[
5
]);
}
status
=
GdipDeleteBrush
((
GpBrush
*
)
brush
);
GdipDeleteMatrix
(
transform
);
}
static
void
test_lineblend
(
void
)
...
...
include/gdiplusflat.h
View file @
f49d56fe
...
...
@@ -474,6 +474,7 @@ GpStatus WINGDIPAPI GdipSetLinePresetBlend(GpLineGradient*,GDIPCONST ARGB*,
GDIPCONST
REAL
*
,
INT
);
GpStatus
WINGDIPAPI
GdipGetLinePresetBlend
(
GpLineGradient
*
,
ARGB
*
,
REAL
*
,
INT
);
GpStatus
WINGDIPAPI
GdipGetLinePresetBlendCount
(
GpLineGradient
*
,
INT
*
);
GpStatus
WINGDIPAPI
GdipGetLineTransform
(
GpLineGradient
*
,
GpMatrix
*
);
GpStatus
WINGDIPAPI
GdipResetLineTransform
(
GpLineGradient
*
);
GpStatus
WINGDIPAPI
GdipRotateLineTransform
(
GpLineGradient
*
,
REAL
,
GpMatrixOrder
);
GpStatus
WINGDIPAPI
GdipScaleLineTransform
(
GpLineGradient
*
,
REAL
,
REAL
,
...
...
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