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
b12078d9
Commit
b12078d9
authored
Dec 07, 2023
by
Bartosz Kosiorek
Committed by
Alexandre Julliard
Jan 18, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Partially implement GdipDrawImageFX.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=55945
parent
bc56fc1b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
9 deletions
+40
-9
graphics.c
dlls/gdiplus/graphics.c
+40
-4
graphics.c
dlls/gdiplus/tests/graphics.c
+0
-5
No files found.
dlls/gdiplus/graphics.c
View file @
b12078d9
...
...
@@ -2947,13 +2947,49 @@ GpStatus WINGDIPAPI GdipDrawImage(GpGraphics *graphics, GpImage *image, REAL x,
0
.
0
,
0
.
0
,
(
REAL
)
width
,
(
REAL
)
height
,
UnitPixel
);
}
GpStatus
WINGDIPAPI
GdipDrawImageFX
(
GpGraphics
*
graphics
,
GpImage
*
image
,
GpRectF
*
src
,
GpStatus
WINGDIPAPI
GdipDrawImageFX
(
GpGraphics
*
graphics
,
GpImage
*
image
,
GpRectF
*
src
_rect
,
GpMatrix
*
transform
,
CGpEffect
*
effect
,
GpImageAttributes
*
imageattr
,
GpUnit
src
U
nit
)
GpUnit
src
_u
nit
)
{
FIXME
(
"(%p, %p, %p, %p, %p, %p, %d): stub
\n
"
,
graphics
,
image
,
src
,
transform
,
effect
,
imageattr
,
srcUnit
);
GpRectF
src_rect_buf
;
GpPointF
points
[
3
];
GpStatus
status
;
return
NotImplemented
;
TRACE
(
"(%p, %p, %p, %p, %p, %p, %d)
\n
"
,
graphics
,
image
,
src_rect
,
transform
,
effect
,
imageattr
,
src_unit
);
if
(
!
graphics
||
!
image
)
return
InvalidParameter
;
if
(
effect
)
FIXME
(
"effect not implemented
\n
"
);
if
(
!
src_rect
)
{
if
((
status
=
GdipGetImageBounds
(
image
,
&
src_rect_buf
,
&
src_unit
))
!=
Ok
)
return
status
;
/* Metafiles may have different left-top coordinates */
if
(
src_rect_buf
.
X
!=
0
.
0
||
src_rect_buf
.
Y
!=
0
.
0
)
{
FIXME
(
"image bounds %s left-top not at origin"
,
debugstr_rectf
(
&
src_rect_buf
));
/* TODO: only use width and height (force origin)? */
}
src_rect
=
&
src_rect_buf
;
}
points
[
0
].
X
=
points
[
2
].
X
=
src_rect
->
X
;
points
[
0
].
Y
=
points
[
1
].
Y
=
src_rect
->
Y
;
points
[
1
].
X
=
src_rect
->
X
+
src_rect
->
Width
;
points
[
2
].
Y
=
src_rect
->
Y
+
src_rect
->
Height
;
if
(
transform
)
GdipTransformMatrixPoints
(
transform
,
points
,
3
);
return
GdipDrawImagePointsRect
(
graphics
,
image
,
points
,
3
,
src_rect
->
X
,
src_rect
->
Y
,
src_rect
->
Width
,
src_rect
->
Height
,
src_unit
,
imageattr
,
NULL
,
NULL
);
}
GpStatus
WINGDIPAPI
GdipDrawImageI
(
GpGraphics
*
graphics
,
GpImage
*
image
,
INT
x
,
...
...
dlls/gdiplus/tests/graphics.c
View file @
b12078d9
...
...
@@ -1332,17 +1332,14 @@ static void test_GdipDrawImageFX(void)
/* DrawImageFX with source rectangle */
status
=
GdipDrawImageFX
(
graphics
,
NULL
,
&
source
,
NULL
,
NULL
,
NULL
,
UnitPixel
);
todo_wine
expect
(
InvalidParameter
,
status
);
/* DrawImageFX with source bitmap */
status
=
GdipDrawImageFX
(
graphics
,
(
GpImage
*
)
bm
,
NULL
,
NULL
,
NULL
,
NULL
,
UnitPixel
);
todo_wine
expect
(
Ok
,
status
);
/* DrawImageFX with source bitmap and transform */
status
=
GdipDrawImageFX
(
graphics
,
(
GpImage
*
)
bm
,
NULL
,
transform
,
NULL
,
NULL
,
UnitPixel
);
todo_wine
expect
(
Ok
,
status
);
/* DrawImageFX with source bitmap and source rectangle */
...
...
@@ -1350,12 +1347,10 @@ static void test_GdipDrawImageFX(void)
source
.
Height
=
source
.
Width
=
10
.
0
;
status
=
GdipDrawImageFX
(
graphics
,
(
GpImage
*
)
bm
,
&
source
,
NULL
,
NULL
,
NULL
,
UnitPixel
);
todo_wine
expect
(
Ok
,
status
);
/* DrawImageFX with source bitmap, source rectangle, and transform */
status
=
GdipDrawImageFX
(
graphics
,
(
GpImage
*
)
bm
,
&
source
,
transform
,
NULL
,
NULL
,
UnitPixel
);
todo_wine
expect
(
Ok
,
status
);
GdipDeleteMatrix
(
transform
);
...
...
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