Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
cd3855f3
Commit
cd3855f3
authored
Feb 05, 2011
by
Vincent Povirk
Committed by
Alexandre Julliard
Feb 07, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Allow adding rectangles with negative sizes to paths.
parent
29ec595e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
1 deletion
+30
-1
graphicspath.c
dlls/gdiplus/graphicspath.c
+1
-1
graphicspath.c
dlls/gdiplus/tests/graphicspath.c
+29
-0
No files found.
dlls/gdiplus/graphicspath.c
View file @
cd3855f3
...
...
@@ -1507,7 +1507,7 @@ GpStatus WINGDIPAPI GdipAddPathRectangle(GpPath *path, REAL x, REAL y,
TRACE
(
"(%p, %.2f, %.2f, %.2f, %.2f)
\n
"
,
path
,
x
,
y
,
width
,
height
);
if
(
!
path
||
width
<
0
.
0
||
height
<
0
.
0
)
if
(
!
path
)
return
InvalidParameter
;
/* make a backup copy of path data */
...
...
dlls/gdiplus/tests/graphicspath.c
View file @
cd3855f3
...
...
@@ -1106,6 +1106,34 @@ static void test_isvisible(void)
ReleaseDC
(
0
,
hdc
);
}
static
void
test_empty_rect
(
void
)
{
GpPath
*
path
;
GpStatus
status
;
BOOL
result
;
status
=
GdipCreatePath
(
FillModeAlternate
,
&
path
);
expect
(
Ok
,
status
);
status
=
GdipAddPathRectangle
(
path
,
0
.
0
,
0
.
0
,
-
5
.
0
,
5
.
0
);
expect
(
Ok
,
status
);
status
=
GdipIsVisiblePathPoint
(
path
,
-
2
.
0
,
2
.
0
,
NULL
,
&
result
);
expect
(
Ok
,
status
);
expect
(
FALSE
,
status
);
status
=
GdipAddPathRectangle
(
path
,
0
.
0
,
0
.
0
,
5
.
0
,
-
5
.
0
);
expect
(
Ok
,
status
);
status
=
GdipAddPathRectangle
(
path
,
0
.
0
,
0
.
0
,
0
.
0
,
5
.
0
);
expect
(
Ok
,
status
);
status
=
GdipAddPathRectangle
(
path
,
0
.
0
,
0
.
0
,
5
.
0
,
0
.
0
);
expect
(
Ok
,
status
);
GdipDeletePath
(
path
);
}
START_TEST
(
graphicspath
)
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
...
@@ -1135,6 +1163,7 @@ START_TEST(graphicspath)
test_addpie
();
test_flatten
();
test_isvisible
();
test_empty_rect
();
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