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
caec1c24
Commit
caec1c24
authored
Oct 28, 2023
by
Bartosz Kosiorek
Committed by
Alexandre Julliard
Oct 30, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Add additional check to GdipSetPenTransform.
parent
04308954
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
pen.c
dlls/gdiplus/pen.c
+5
-1
pen.c
dlls/gdiplus/tests/pen.c
+7
-7
No files found.
dlls/gdiplus/pen.c
View file @
caec1c24
...
@@ -445,8 +445,9 @@ GpStatus WINGDIPAPI GdipResetPenTransform(GpPen *pen)
...
@@ -445,8 +445,9 @@ GpStatus WINGDIPAPI GdipResetPenTransform(GpPen *pen)
GpStatus
WINGDIPAPI
GdipSetPenTransform
(
GpPen
*
pen
,
GpMatrix
*
matrix
)
GpStatus
WINGDIPAPI
GdipSetPenTransform
(
GpPen
*
pen
,
GpMatrix
*
matrix
)
{
{
static
int
calls
;
static
int
calls
;
BOOL
result
;
TRACE
(
"(%p,%s)
\n
"
,
pen
,
debugstr_matrix
(
matrix
));
TRACE
(
"(%p,
%s)
\n
"
,
pen
,
debugstr_matrix
(
matrix
));
if
(
!
pen
||
!
matrix
)
if
(
!
pen
||
!
matrix
)
return
InvalidParameter
;
return
InvalidParameter
;
...
@@ -454,6 +455,9 @@ GpStatus WINGDIPAPI GdipSetPenTransform(GpPen *pen, GpMatrix *matrix)
...
@@ -454,6 +455,9 @@ GpStatus WINGDIPAPI GdipSetPenTransform(GpPen *pen, GpMatrix *matrix)
if
(
!
(
calls
++
))
if
(
!
(
calls
++
))
FIXME
(
"(%p,%p) Semi-stub
\n
"
,
pen
,
matrix
);
FIXME
(
"(%p,%p) Semi-stub
\n
"
,
pen
,
matrix
);
GdipIsMatrixInvertible
(
matrix
,
&
result
);
if
(
!
result
)
return
InvalidParameter
;
pen
->
transform
=
*
matrix
;
pen
->
transform
=
*
matrix
;
return
Ok
;
return
Ok
;
...
...
dlls/gdiplus/tests/pen.c
View file @
caec1c24
...
@@ -472,7 +472,7 @@ static void test_transform(void)
...
@@ -472,7 +472,7 @@ static void test_transform(void)
GdipCreateMatrix2
(
3
.
0
,
3
.
0
,
2
.
0
,
2
.
0
,
6
.
0
,
3
.
0
,
&
not_invertible_matrix
);
GdipCreateMatrix2
(
3
.
0
,
3
.
0
,
2
.
0
,
2
.
0
,
6
.
0
,
3
.
0
,
&
not_invertible_matrix
);
status
=
GdipSetPenTransform
(
pen
,
not_invertible_matrix
);
status
=
GdipSetPenTransform
(
pen
,
not_invertible_matrix
);
todo_wine
expect
(
InvalidParameter
,
status
);
expect
(
InvalidParameter
,
status
);
GdipDeleteMatrix
(
not_invertible_matrix
);
GdipDeleteMatrix
(
not_invertible_matrix
);
status
=
GdipGetPenTransform
(
pen
,
matrix
);
status
=
GdipGetPenTransform
(
pen
,
matrix
);
...
@@ -480,12 +480,12 @@ static void test_transform(void)
...
@@ -480,12 +480,12 @@ static void test_transform(void)
status
=
GdipGetMatrixElements
(
matrix
,
values
);
status
=
GdipGetMatrixElements
(
matrix
,
values
);
expect
(
Ok
,
status
);
expect
(
Ok
,
status
);
todo_wine
expectf
(
1
.
0
,
values
[
0
]);
expectf
(
1
.
0
,
values
[
0
]);
todo_wine
expectf
(
0
.
0
,
values
[
1
]);
expectf
(
0
.
0
,
values
[
1
]);
todo_wine
expectf
(
0
.
0
,
values
[
2
]);
expectf
(
0
.
0
,
values
[
2
]);
todo_wine
expectf
(
1
.
0
,
values
[
3
]);
expectf
(
1
.
0
,
values
[
3
]);
todo_wine
expectf
(
0
.
0
,
values
[
4
]);
expectf
(
0
.
0
,
values
[
4
]);
todo_wine
expectf
(
0
.
0
,
values
[
5
]);
expectf
(
0
.
0
,
values
[
5
]);
/* Setting Pen Tranformation to invertible matrix, should be successfull */
/* Setting Pen Tranformation to invertible matrix, should be successfull */
GdipCreateMatrix2
(
3
.
0
,
-
2
.
0
,
5
.
0
,
2
.
0
,
6
.
0
,
3
.
0
,
&
matrix2
);
GdipCreateMatrix2
(
3
.
0
,
-
2
.
0
,
5
.
0
,
2
.
0
,
6
.
0
,
3
.
0
,
&
matrix2
);
...
...
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