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
0553eba0
Commit
0553eba0
authored
Feb 20, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Feb 20, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Use an off-screen DC as an image surface.
parent
97b92fe1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
image.c
dlls/gdiplus/image.c
+8
-11
No files found.
dlls/gdiplus/image.c
View file @
0553eba0
...
...
@@ -116,10 +116,9 @@ static INT ipicture_pixel_height(IPicture *pic)
IPicture_get_Height
(
pic
,
&
y
);
hdcref
=
GetDC
(
0
);
hdcref
=
CreateCompatibleDC
(
0
);
y
=
MulDiv
(
y
,
GetDeviceCaps
(
hdcref
,
LOGPIXELSY
),
INCH_HIMETRIC
);
ReleaseDC
(
0
,
hdcref
);
DeleteDC
(
hdcref
);
return
y
;
}
...
...
@@ -131,11 +130,9 @@ static INT ipicture_pixel_width(IPicture *pic)
IPicture_get_Width
(
pic
,
&
x
);
hdcref
=
GetDC
(
0
);
hdcref
=
CreateCompatibleDC
(
0
);
x
=
MulDiv
(
x
,
GetDeviceCaps
(
hdcref
,
LOGPIXELSX
),
INCH_HIMETRIC
);
ReleaseDC
(
0
,
hdcref
);
DeleteDC
(
hdcref
);
return
x
;
}
...
...
@@ -1688,7 +1685,7 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromHICON(HICON hicon, GpBitmap** bitmap)
bih
.
biClrUsed
=
0
;
bih
.
biClrImportant
=
0
;
screendc
=
Get
DC
(
0
);
screendc
=
CreateCompatible
DC
(
0
);
if
(
iinfo
.
hbmColor
)
{
GetDIBits
(
screendc
,
iinfo
.
hbmColor
,
0
,
height
,
lockeddata
.
Scan0
,
(
BITMAPINFO
*
)
&
bih
,
DIB_RGB_COLORS
);
...
...
@@ -1756,7 +1753,7 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromHICON(HICON hicon, GpBitmap** bitmap)
}
}
ReleaseDC
(
0
,
screendc
);
DeleteDC
(
screendc
);
DeleteObject
(
iinfo
.
hbmColor
);
DeleteObject
(
iinfo
.
hbmMask
);
...
...
@@ -1806,14 +1803,14 @@ static void generate_halftone_palette(ARGB *entries, UINT count)
static
GpStatus
get_screen_resolution
(
REAL
*
xres
,
REAL
*
yres
)
{
HDC
screendc
=
Get
DC
(
0
);
HDC
screendc
=
CreateCompatible
DC
(
0
);
if
(
!
screendc
)
return
GenericError
;
*
xres
=
(
REAL
)
GetDeviceCaps
(
screendc
,
LOGPIXELSX
);
*
yres
=
(
REAL
)
GetDeviceCaps
(
screendc
,
LOGPIXELSY
);
ReleaseDC
(
0
,
screendc
);
DeleteDC
(
screendc
);
return
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