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
2f26b02f
Commit
2f26b02f
authored
Oct 29, 2022
by
Bartosz Kosiorek
Committed by
Alexandre Julliard
Oct 31, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Add GdipGetPenCompoundArray implementation.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=52196
parent
e2e8487b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
3 deletions
+35
-3
gdiplus.spec
dlls/gdiplus/gdiplus.spec
+1
-1
pen.c
dlls/gdiplus/pen.c
+11
-0
pen.c
dlls/gdiplus/tests/pen.c
+22
-2
gdiplusflat.h
include/gdiplusflat.h
+1
-0
No files found.
dlls/gdiplus/gdiplus.spec
View file @
2f26b02f
...
...
@@ -334,7 +334,7 @@
334 stdcall GdipGetPathWorldBoundsI(ptr ptr ptr ptr)
335 stdcall GdipGetPenBrushFill(ptr ptr)
336 stdcall GdipGetPenColor(ptr ptr)
337 st
ub GdipGetPenCompoundArray
337 st
dcall GdipGetPenCompoundArray(ptr ptr long)
338 stdcall GdipGetPenCompoundCount(ptr ptr)
339 stdcall GdipGetPenCustomEndCap(ptr ptr)
340 stdcall GdipGetPenCustomStartCap(ptr ptr)
...
...
dlls/gdiplus/pen.c
View file @
2f26b02f
...
...
@@ -526,6 +526,17 @@ GpStatus WINGDIPAPI GdipSetPenColor(GpPen *pen, ARGB argb)
return
GdipSetSolidFillColor
(((
GpSolidFill
*
)
pen
->
brush
),
argb
);
}
GpStatus
WINGDIPAPI
GdipGetPenCompoundArray
(
GpPen
*
pen
,
REAL
*
compoundarray
,
INT
count
)
{
TRACE
(
"(%p, %p, %i)
\n
"
,
pen
,
compoundarray
,
count
);
if
(
!
pen
||
!
compoundarray
||
count
>
pen
->
compound_array_size
)
return
InvalidParameter
;
if
(
pen
->
compound_array
&&
count
>
0
)
memcpy
(
compoundarray
,
pen
->
compound_array
,
count
*
sizeof
(
REAL
));
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipGetPenCompoundCount
(
GpPen
*
pen
,
INT
*
count
)
{
TRACE
(
"(%p, %p)
\n
"
,
pen
,
count
);
...
...
dlls/gdiplus/tests/pen.c
View file @
2f26b02f
...
...
@@ -350,6 +350,7 @@ static void test_compoundarray(void)
{
GpStatus
status
;
GpPen
*
pen
;
REAL
*
returnvalues
;
static
const
REAL
testvalues
[]
=
{
0
.
2
,
0
.
4
,
0
.
6
,
0
.
8
};
static
const
REAL
notSortedValues
[]
=
{
0
.
2
,
0
.
6
,
0
.
4
,
0
.
8
};
static
const
REAL
negativeValues
[]
=
{
-
1
.
2
,
0
.
4
,
0
.
6
,
0
.
8
};
...
...
@@ -398,10 +399,29 @@ static void test_compoundarray(void)
count
=
0
;
status
=
GdipGetPenCompoundCount
(
pen
,
&
count
);
todo_wine
{
expect
(
Ok
,
status
);
ok
(
count
==
4
,
"Unexpected compound count %d
\n
"
,
count
);
}
returnvalues
=
calloc
(
5
,
sizeof
(
REAL
));
/* When count larger than stored array return error */
status
=
GdipGetPenCompoundArray
(
pen
,
returnvalues
,
40
);
expect
(
InvalidParameter
,
status
);
status
=
GdipGetPenCompoundArray
(
NULL
,
returnvalues
,
4
);
expect
(
InvalidParameter
,
status
);
/* When count is zero, it should do nothing */
status
=
GdipGetPenCompoundArray
(
pen
,
returnvalues
,
0
);
expect
(
Ok
,
status
);
ok
(
returnvalues
[
0
]
==
0
.
0
,
"Unexpected compound array %f
\n
"
,
returnvalues
[
0
]);
status
=
GdipGetPenCompoundArray
(
pen
,
returnvalues
,
4
);
expect
(
Ok
,
status
);
ok
(
memcmp
(
returnvalues
,
testvalues
,
4
*
sizeof
(
REAL
))
==
0
,
"Unexpected compound array
\n
"
);
status
=
GdipGetPenCompoundArray
(
pen
,
returnvalues
,
-
10
);
expect
(
Ok
,
status
);
ok
(
memcmp
(
returnvalues
,
testvalues
,
4
*
sizeof
(
REAL
))
==
0
,
"Unexpected compound array
\n
"
);
free
(
returnvalues
);
GdipDeletePen
(
pen
);
}
...
...
include/gdiplusflat.h
View file @
2f26b02f
...
...
@@ -629,6 +629,7 @@ GpStatus WINGDIPAPI GdipCreatePen2(GpBrush*,REAL,GpUnit,GpPen**);
GpStatus
WINGDIPAPI
GdipDeletePen
(
GpPen
*
);
GpStatus
WINGDIPAPI
GdipGetPenBrushFill
(
GpPen
*
,
GpBrush
**
);
GpStatus
WINGDIPAPI
GdipGetPenColor
(
GpPen
*
,
ARGB
*
);
GpStatus
WINGDIPAPI
GdipGetPenCompoundArray
(
GpPen
*
,
REAL
*
,
INT
);
GpStatus
WINGDIPAPI
GdipGetPenCompoundCount
(
GpPen
*
,
INT
*
);
GpStatus
WINGDIPAPI
GdipGetPenCustomStartCap
(
GpPen
*
,
GpCustomLineCap
**
);
GpStatus
WINGDIPAPI
GdipGetPenCustomEndCap
(
GpPen
*
,
GpCustomLineCap
**
);
...
...
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