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
7b004c17
Commit
7b004c17
authored
Mar 02, 2013
by
Vincent Povirk
Committed by
Alexandre Julliard
Mar 04, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Store the image type on a Graphics object in case the image is freed.
parent
edea85de
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+1
-0
graphics.c
dlls/gdiplus/graphics.c
+4
-1
No files found.
dlls/gdiplus/gdiplus_private.h
View file @
7b004c17
...
...
@@ -154,6 +154,7 @@ struct GpGraphics{
BOOL
owndc
;
BOOL
alpha_hdc
;
GpImage
*
image
;
ImageType
image_type
;
SmoothingMode
smoothing
;
CompositingQuality
compqual
;
InterpolationMode
interpolation
;
...
...
dlls/gdiplus/graphics.c
View file @
7b004c17
...
...
@@ -2195,6 +2195,9 @@ GpStatus graphics_from_image(GpImage *image, GpGraphics **graphics)
(
*
graphics
)
->
hwnd
=
NULL
;
(
*
graphics
)
->
owndc
=
FALSE
;
(
*
graphics
)
->
image
=
image
;
/* We have to store the image type here because the image may be freed
* before GdipDeleteGraphics is called, and metafiles need special treatment. */
(
*
graphics
)
->
image_type
=
image
->
type
;
(
*
graphics
)
->
smoothing
=
SmoothingModeDefault
;
(
*
graphics
)
->
compqual
=
CompositingQualityDefault
;
(
*
graphics
)
->
interpolation
=
InterpolationModeBilinear
;
...
...
@@ -2389,7 +2392,7 @@ GpStatus WINGDIPAPI GdipDeleteGraphics(GpGraphics *graphics)
if
(
!
graphics
)
return
InvalidParameter
;
if
(
graphics
->
busy
)
return
ObjectBusy
;
if
(
graphics
->
image
&&
graphics
->
image
->
type
==
ImageTypeMetafile
)
if
(
graphics
->
image
&&
graphics
->
image
_
type
==
ImageTypeMetafile
)
{
stat
=
METAFILE_GraphicsDeleted
((
GpMetafile
*
)
graphics
->
image
);
if
(
stat
!=
Ok
)
...
...
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