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
bb5f5dba
Commit
bb5f5dba
authored
Oct 27, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
Oct 28, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Make get_path_hrgn work with HDC-less graphics objects.
parent
5f327f78
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
region.c
dlls/gdiplus/region.c
+13
-2
No files found.
dlls/gdiplus/region.c
View file @
bb5f5dba
...
...
@@ -884,6 +884,7 @@ GpStatus WINGDIPAPI GdipGetRegionDataSize(GpRegion *region, UINT *needed)
static
GpStatus
get_path_hrgn
(
GpPath
*
path
,
GpGraphics
*
graphics
,
HRGN
*
hrgn
)
{
HDC
new_hdc
=
NULL
;
GpGraphics
*
new_graphics
=
NULL
;
GpStatus
stat
;
INT
save_state
;
...
...
@@ -893,13 +894,20 @@ static GpStatus get_path_hrgn(GpPath *path, GpGraphics *graphics, HRGN *hrgn)
if
(
!
new_hdc
)
return
OutOfMemory
;
stat
=
GdipCreateFromHDC
(
new_hdc
,
&
graphics
);
stat
=
GdipCreateFromHDC
(
new_hdc
,
&
new_graphics
);
graphics
=
new_graphics
;
if
(
stat
!=
Ok
)
{
ReleaseDC
(
0
,
new_hdc
);
return
stat
;
}
}
else
if
(
!
graphics
->
hdc
)
{
graphics
->
hdc
=
new_hdc
=
GetDC
(
0
);
if
(
!
new_hdc
)
return
OutOfMemory
;
}
save_state
=
SaveDC
(
graphics
->
hdc
);
EndPath
(
graphics
->
hdc
);
...
...
@@ -918,7 +926,10 @@ static GpStatus get_path_hrgn(GpPath *path, GpGraphics *graphics, HRGN *hrgn)
if
(
new_hdc
)
{
ReleaseDC
(
0
,
new_hdc
);
GdipDeleteGraphics
(
graphics
);
if
(
new_graphics
)
GdipDeleteGraphics
(
new_graphics
);
else
graphics
->
hdc
=
NULL
;
}
return
stat
;
...
...
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