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
526143cb
Commit
526143cb
authored
Mar 13, 2014
by
Vincent Povirk
Committed by
Alexandre Julliard
Mar 25, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Limit image output to the bounds of the Graphics object.
parent
ebd5f96a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
graphics.c
dlls/gdiplus/graphics.c
+11
-0
No files found.
dlls/gdiplus/graphics.c
View file @
526143cb
...
...
@@ -2858,6 +2858,7 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image
if
(
use_software
)
{
RECT
dst_area
;
GpRectF
graphics_bounds
;
GpRect
src_area
;
int
i
,
x
,
y
,
src_stride
,
dst_stride
;
GpMatrix
dst_to_src
;
...
...
@@ -2883,8 +2884,18 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image
if
(
dst_area
.
bottom
<
pti
[
i
].
y
)
dst_area
.
bottom
=
pti
[
i
].
y
;
}
stat
=
get_graphics_bounds
(
graphics
,
&
graphics_bounds
);
if
(
stat
!=
Ok
)
return
stat
;
if
(
graphics_bounds
.
X
>
dst_area
.
left
)
dst_area
.
left
=
floorf
(
graphics_bounds
.
X
);
if
(
graphics_bounds
.
Y
>
dst_area
.
top
)
dst_area
.
top
=
floorf
(
graphics_bounds
.
Y
);
if
(
graphics_bounds
.
X
+
graphics_bounds
.
Width
<
dst_area
.
right
)
dst_area
.
right
=
ceilf
(
graphics_bounds
.
X
+
graphics_bounds
.
Width
);
if
(
graphics_bounds
.
Y
+
graphics_bounds
.
Height
<
dst_area
.
bottom
)
dst_area
.
bottom
=
ceilf
(
graphics_bounds
.
Y
+
graphics_bounds
.
Height
);
TRACE
(
"dst_area: %s
\n
"
,
wine_dbgstr_rect
(
&
dst_area
));
if
(
IsRectEmpty
(
&
dst_area
))
return
Ok
;
m11
=
(
ptf
[
1
].
X
-
ptf
[
0
].
X
)
/
srcwidth
;
m21
=
(
ptf
[
2
].
X
-
ptf
[
0
].
X
)
/
srcheight
;
mdx
=
ptf
[
0
].
X
-
m11
*
srcx
-
m21
*
srcy
;
...
...
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