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
2661ce79
Commit
2661ce79
authored
Oct 27, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
Oct 28, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Reject linear gradients where the start and end points are equal.
parent
bb5f5dba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
brush.c
dlls/gdiplus/brush.c
+3
-0
brush.c
dlls/gdiplus/tests/brush.c
+18
-0
No files found.
dlls/gdiplus/brush.c
View file @
2661ce79
...
...
@@ -325,6 +325,9 @@ GpStatus WINGDIPAPI GdipCreateLineBrush(GDIPCONST GpPointF* startpoint,
if
(
!
line
||
!
startpoint
||
!
endpoint
||
wrap
==
WrapModeClamp
)
return
InvalidParameter
;
if
(
startpoint
->
X
==
endpoint
->
X
&&
startpoint
->
Y
==
endpoint
->
Y
)
return
OutOfMemory
;
*
line
=
GdipAlloc
(
sizeof
(
GpLineGradient
));
if
(
!*
line
)
return
OutOfMemory
;
...
...
dlls/gdiplus/tests/brush.c
View file @
2661ce79
...
...
@@ -356,6 +356,20 @@ static void test_gradientgetrect(void)
expectf
(
100
.
0
,
rectf
.
Width
);
expectf
(
1
.
0
,
rectf
.
Height
);
status
=
GdipDeleteBrush
((
GpBrush
*
)
brush
);
/* zero height rect */
rectf
.
X
=
rectf
.
Y
=
10
.
0
;
rectf
.
Width
=
100
.
0
;
rectf
.
Height
=
0
.
0
;
status
=
GdipCreateLineBrushFromRect
(
&
rectf
,
0
,
0
,
LinearGradientModeVertical
,
WrapModeTile
,
&
brush
);
expect
(
OutOfMemory
,
status
);
/* zero width rect */
rectf
.
X
=
rectf
.
Y
=
10
.
0
;
rectf
.
Width
=
0
.
0
;
rectf
.
Height
=
100
.
0
;
status
=
GdipCreateLineBrushFromRect
(
&
rectf
,
0
,
0
,
LinearGradientModeHorizontal
,
WrapModeTile
,
&
brush
);
expect
(
OutOfMemory
,
status
);
/* from rect with LinearGradientModeHorizontal */
rectf
.
X
=
rectf
.
Y
=
10
.
0
;
rectf
.
Width
=
rectf
.
Height
=
100
.
0
;
...
...
@@ -401,6 +415,10 @@ static void test_lineblend(void)
REAL
res_positions
[
6
]
=
{
0
.
3
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
};
ARGB
res_colors
[
6
]
=
{
0xdeadbeef
,
0
,
0
,
0
,
0
};
pt1
.
X
=
pt1
.
Y
=
pt2
.
Y
=
pt2
.
X
=
1
.
0
;
status
=
GdipCreateLineBrush
(
&
pt1
,
&
pt2
,
0
,
0
,
WrapModeTile
,
&
brush
);
expect
(
OutOfMemory
,
status
);
pt1
.
X
=
pt1
.
Y
=
1
.
0
;
pt2
.
X
=
pt2
.
Y
=
100
.
0
;
status
=
GdipCreateLineBrush
(
&
pt1
,
&
pt2
,
0
,
0
,
WrapModeTile
,
&
brush
);
...
...
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