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
f6007881
Commit
f6007881
authored
Oct 20, 2023
by
Bartosz Kosiorek
Committed by
Alexandre Julliard
Oct 27, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus/tests: Add test for GdipIsOutlineVisiblePathPoint.
parent
d20aca6b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
142 additions
and
0 deletions
+142
-0
graphicspath.c
dlls/gdiplus/tests/graphicspath.c
+142
-0
No files found.
dlls/gdiplus/tests/graphicspath.c
View file @
f6007881
...
...
@@ -1883,6 +1883,147 @@ static void test_isvisible(void)
ReleaseDC
(
0
,
hdc
);
}
static
void
test_is_outline_visible_path_point
(
void
)
{
BOOL
result
;
GpBitmap
*
bitmap
;
GpGraphics
*
graphics
=
NULL
;
GpPath
*
path
;
GpPen
*
pen
=
NULL
;
GpStatus
status
;
static
const
int
width
=
20
,
height
=
20
;
/* Graphics associated with an Image object.*/
status
=
GdipCreateBitmapFromScan0
(
width
,
height
,
0
,
PixelFormat32bppRGB
,
NULL
,
&
bitmap
);
expect
(
Ok
,
status
);
status
=
GdipGetImageGraphicsContext
((
GpImage
*
)
bitmap
,
&
graphics
);
expect
(
Ok
,
status
);
ok
(
graphics
!=
NULL
,
"Expected the graphics context to be initialized.
\n
"
);
status
=
GdipCreatePath
(
FillModeAlternate
,
&
path
);
expect
(
Ok
,
status
);
status
=
GdipAddPathRectangle
(
path
,
2
.
0
,
0
.
0
,
13
.
0
,
15
.
0
);
expect
(
Ok
,
status
);
status
=
GdipCreatePen1
((
ARGB
)
0xffff00ff
,
3
.
0
f
,
UnitPixel
,
&
pen
);
expect
(
Ok
,
status
);
ok
(
pen
!=
NULL
,
"Expected pen to be initialized
\n
"
);
/* With NULL pen */
result
=
9
;
status
=
GdipIsOutlineVisiblePathPoint
(
path
,
0
.
0
,
1
.
0
,
NULL
,
graphics
,
&
result
);
expect
(
InvalidParameter
,
status
);
expect
(
9
,
result
);
/* Without transformation */
result
=
TRUE
;
status
=
GdipIsOutlineVisiblePathPoint
(
path
,
0
.
0
,
1
.
0
,
pen
,
graphics
,
&
result
);
expect
(
Ok
,
status
);
expect
(
FALSE
,
result
);
result
=
FALSE
;
status
=
GdipIsOutlineVisiblePathPoint
(
path
,
1
.
0
,
1
.
0
,
pen
,
graphics
,
&
result
);
expect
(
Ok
,
status
);
expect
(
TRUE
,
result
);
result
=
FALSE
;
status
=
GdipIsOutlineVisiblePathPoint
(
path
,
10
.
0
,
1
.
0
,
pen
,
graphics
,
&
result
);
expect
(
Ok
,
status
);
expect
(
TRUE
,
result
);
result
=
FALSE
;
status
=
GdipIsOutlineVisiblePathPoint
(
path
,
16
.
0
,
1
.
0
,
pen
,
graphics
,
&
result
);
expect
(
Ok
,
status
);
expect
(
TRUE
,
result
);
result
=
TRUE
;
status
=
GdipIsOutlineVisiblePathPoint
(
path
,
17
.
0
,
1
.
0
,
pen
,
graphics
,
&
result
);
expect
(
Ok
,
status
);
expect
(
FALSE
,
result
);
/* Translating */
status
=
GdipTranslateWorldTransform
(
graphics
,
50
.
0
,
50
.
0
,
MatrixOrderPrepend
);
expect
(
Ok
,
status
);
result
=
FALSE
;
status
=
GdipIsOutlineVisiblePathPoint
(
path
,
10
.
0
,
1
.
0
,
pen
,
graphics
,
&
result
);
expect
(
Ok
,
status
);
expect
(
TRUE
,
result
);
result
=
FALSE
;
status
=
GdipIsOutlineVisiblePathPoint
(
path
,
15
.
0
,
1
.
0
,
pen
,
graphics
,
&
result
);
expect
(
Ok
,
status
);
expect
(
TRUE
,
result
);
result
=
FALSE
;
status
=
GdipIsOutlineVisiblePathPoint
(
path
,
16
.
0
,
1
.
0
,
pen
,
graphics
,
&
result
);
expect
(
Ok
,
status
);
expect
(
TRUE
,
result
);
/* Scaling */
status
=
GdipScaleWorldTransform
(
graphics
,
2
.
0
,
2
.
0
,
MatrixOrderPrepend
);
expect
(
Ok
,
status
);
result
=
TRUE
;
status
=
GdipIsOutlineVisiblePathPoint
(
path
,
0
.
0
,
1
.
0
,
pen
,
graphics
,
&
result
);
expect
(
Ok
,
status
);
expect
(
FALSE
,
result
);
result
=
TRUE
;
status
=
GdipIsOutlineVisiblePathPoint
(
path
,
1
.
0
,
1
.
0
,
pen
,
graphics
,
&
result
);
expect
(
Ok
,
status
);
todo_wine
expect
(
FALSE
,
result
);
result
=
FALSE
;
status
=
GdipIsOutlineVisiblePathPoint
(
path
,
2
.
0
,
1
.
0
,
pen
,
graphics
,
&
result
);
expect
(
Ok
,
status
);
expect
(
TRUE
,
result
);
result
=
TRUE
;
status
=
GdipIsOutlineVisiblePathPoint
(
path
,
3
.
0
,
1
.
0
,
pen
,
graphics
,
&
result
);
expect
(
Ok
,
status
);
expect
(
FALSE
,
result
);
result
=
TRUE
;
status
=
GdipIsOutlineVisiblePathPoint
(
path
,
14
.
0
,
1
.
0
,
pen
,
graphics
,
&
result
);
expect
(
Ok
,
status
);
todo_wine
expect
(
FALSE
,
result
);
result
=
FALSE
;
status
=
GdipIsOutlineVisiblePathPoint
(
path
,
15
.
0
,
1
.
0
,
pen
,
graphics
,
&
result
);
expect
(
Ok
,
status
);
expect
(
TRUE
,
result
);
result
=
TRUE
;
status
=
GdipIsOutlineVisiblePathPoint
(
path
,
16
.
0
,
1
.
0
,
pen
,
graphics
,
&
result
);
expect
(
Ok
,
status
);
expect
(
FALSE
,
result
);
/* Page Unit */
GdipResetWorldTransform
(
graphics
);
status
=
GdipSetPageUnit
(
graphics
,
UnitMillimeter
);
expect
(
Ok
,
status
);
result
=
TRUE
;
status
=
GdipIsOutlineVisiblePathPoint
(
path
,
0
.
0
,
1
.
0
,
pen
,
graphics
,
&
result
);
expect
(
Ok
,
status
);
expect
(
FALSE
,
result
);
result
=
TRUE
;
status
=
GdipIsOutlineVisiblePathPoint
(
path
,
1
.
0
,
1
.
0
,
pen
,
graphics
,
&
result
);
expect
(
Ok
,
status
);
expect
(
FALSE
,
result
);
result
=
FALSE
;
status
=
GdipIsOutlineVisiblePathPoint
(
path
,
2
.
0
,
1
.
0
,
pen
,
graphics
,
&
result
);
expect
(
Ok
,
status
);
todo_wine
expect
(
TRUE
,
result
);
result
=
TRUE
;
status
=
GdipIsOutlineVisiblePathPoint
(
path
,
3
.
0
,
1
.
0
,
pen
,
graphics
,
&
result
);
expect
(
Ok
,
status
);
expect
(
FALSE
,
result
);
result
=
TRUE
;
status
=
GdipIsOutlineVisiblePathPoint
(
path
,
14
.
0
,
1
.
0
,
pen
,
graphics
,
&
result
);
expect
(
Ok
,
status
);
expect
(
FALSE
,
result
);
result
=
FALSE
;
status
=
GdipIsOutlineVisiblePathPoint
(
path
,
15
.
0
,
1
.
0
,
pen
,
graphics
,
&
result
);
expect
(
Ok
,
status
);
todo_wine
expect
(
TRUE
,
result
);
result
=
TRUE
;
status
=
GdipIsOutlineVisiblePathPoint
(
path
,
16
.
0
,
1
.
0
,
pen
,
graphics
,
&
result
);
expect
(
Ok
,
status
);
expect
(
FALSE
,
result
);
GdipResetWorldTransform
(
graphics
);
GdipDeletePath
(
path
);
GdipDeleteGraphics
(
graphics
);
}
static
void
test_empty_rect
(
void
)
{
GpPath
*
path
;
...
...
@@ -1976,6 +2117,7 @@ START_TEST(graphicspath)
test_widen
();
test_widen_cap
();
test_isvisible
();
test_is_outline_visible_path_point
();
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