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
edb68487
Commit
edb68487
authored
Apr 04, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Use the hdc from the generic physdev structure in metafiles.
parent
65ba77bd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
18 deletions
+11
-18
init.c
dlls/gdi32/mfdrv/init.c
+5
-6
metafiledrv.h
dlls/gdi32/mfdrv/metafiledrv.h
+0
-1
objects.c
dlls/gdi32/mfdrv/objects.c
+5
-9
text.c
dlls/gdi32/mfdrv/text.c
+1
-2
No files found.
dlls/gdi32/mfdrv/init.c
View file @
edb68487
...
...
@@ -181,7 +181,6 @@ static DC *MFDRV_AllocMetaFile(void)
}
push_dc_driver
(
dc
,
&
physDev
->
dev
,
&
MFDRV_Funcs
);
physDev
->
hdc
=
dc
->
hSelf
;
physDev
->
handles
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
HANDLE_LIST_INC
*
sizeof
(
physDev
->
handles
[
0
]));
physDev
->
handles_size
=
HANDLE_LIST_INC
;
...
...
@@ -196,7 +195,7 @@ static DC *MFDRV_AllocMetaFile(void)
physDev
->
mh
->
mtMaxRecord
=
0
;
physDev
->
mh
->
mtNoParameters
=
0
;
SetVirtualResolution
(
dc
->
hSelf
,
0
,
0
,
0
,
0
);
SetVirtualResolution
(
physDev
->
dev
.
hdc
,
0
,
0
,
0
,
0
);
return
dc
;
}
...
...
@@ -213,7 +212,7 @@ static BOOL CDECL MFDRV_DeleteDC( PHYSDEV dev )
HeapFree
(
GetProcessHeap
(),
0
,
physDev
->
mh
);
for
(
index
=
0
;
index
<
physDev
->
handles_size
;
index
++
)
if
(
physDev
->
handles
[
index
])
GDI_hdc_not_using_object
(
physDev
->
handles
[
index
],
physD
ev
->
hdc
);
GDI_hdc_not_using_object
(
physDev
->
handles
[
index
],
d
ev
->
hdc
);
HeapFree
(
GetProcessHeap
(),
0
,
physDev
->
handles
);
HeapFree
(
GetProcessHeap
(),
0
,
physDev
);
return
TRUE
;
...
...
@@ -265,8 +264,8 @@ HDC WINAPI CreateMetaFileW( LPCWSTR filename )
else
/* memory based metafile */
physDev
->
mh
->
mtType
=
METAFILE_MEMORY
;
TRACE
(
"returning %p
\n
"
,
dc
->
hSelf
);
ret
=
dc
->
hSelf
;
TRACE
(
"returning %p
\n
"
,
physDev
->
dev
.
hdc
);
ret
=
physDev
->
dev
.
hdc
;
release_dc_ptr
(
dc
);
return
ret
;
}
...
...
@@ -314,7 +313,7 @@ static DC *MFDRV_CloseMetaFile( HDC hdc )
}
if
(
dc
->
refcount
!=
1
)
{
FIXME
(
"not deleting busy DC %p refcount %u
\n
"
,
dc
->
hSelf
,
dc
->
refcount
);
FIXME
(
"not deleting busy DC %p refcount %u
\n
"
,
hdc
,
dc
->
refcount
);
release_dc_ptr
(
dc
);
return
NULL
;
}
...
...
dlls/gdi32/mfdrv/metafiledrv.h
View file @
edb68487
...
...
@@ -33,7 +33,6 @@
typedef
struct
{
struct
gdi_physdev
dev
;
HDC
hdc
;
METAHEADER
*
mh
;
/* Pointer to metafile header */
UINT
handles_size
,
cur_handles
;
HGDIOBJ
*
handles
;
...
...
dlls/gdi32/mfdrv/objects.c
View file @
edb68487
...
...
@@ -214,7 +214,6 @@ INT16 MFDRV_CreateBrushIndirect(PHYSDEV dev, HBRUSH hBrush )
DWORD
size
;
METARECORD
*
mr
;
LOGBRUSH
logbrush
;
METAFILEDRV_PDEVICE
*
physDev
=
(
METAFILEDRV_PDEVICE
*
)
dev
;
BOOL
r
;
if
(
!
GetObjectA
(
hBrush
,
sizeof
(
logbrush
),
&
logbrush
))
return
-
1
;
...
...
@@ -282,12 +281,12 @@ INT16 MFDRV_CreateBrushIndirect(PHYSDEV dev, HBRUSH hBrush )
MFDRV_Reverse
((
LPBYTE
)
info
+
sizeof
(
BITMAPINFO
)
+
sizeof
(
RGBQUAD
),
bm
.
bmWidth
,
bm
.
bmHeight
);
cref
=
GetTextColor
(
physDev
->
hdc
);
cref
=
GetTextColor
(
dev
->
hdc
);
info
->
bmiColors
[
0
].
rgbRed
=
GetRValue
(
cref
);
info
->
bmiColors
[
0
].
rgbGreen
=
GetGValue
(
cref
);
info
->
bmiColors
[
0
].
rgbBlue
=
GetBValue
(
cref
);
info
->
bmiColors
[
0
].
rgbReserved
=
0
;
cref
=
GetBkColor
(
physDev
->
hdc
);
cref
=
GetBkColor
(
dev
->
hdc
);
info
->
bmiColors
[
1
].
rgbRed
=
GetRValue
(
cref
);
info
->
bmiColors
[
1
].
rgbGreen
=
GetGValue
(
cref
);
info
->
bmiColors
[
1
].
rgbBlue
=
GetBValue
(
cref
);
...
...
@@ -341,7 +340,6 @@ done:
*/
HBRUSH
CDECL
MFDRV_SelectBrush
(
PHYSDEV
dev
,
HBRUSH
hbrush
)
{
METAFILEDRV_PDEVICE
*
physDev
=
(
METAFILEDRV_PDEVICE
*
)
dev
;
INT16
index
;
index
=
MFDRV_FindObject
(
dev
,
hbrush
);
...
...
@@ -350,7 +348,7 @@ HBRUSH CDECL MFDRV_SelectBrush( PHYSDEV dev, HBRUSH hbrush )
index
=
MFDRV_CreateBrushIndirect
(
dev
,
hbrush
);
if
(
index
<
0
)
return
0
;
GDI_hdc_using_object
(
hbrush
,
physD
ev
->
hdc
);
GDI_hdc_using_object
(
hbrush
,
d
ev
->
hdc
);
}
return
MFDRV_SelectObject
(
dev
,
index
)
?
hbrush
:
HGDI_ERROR
;
}
...
...
@@ -398,7 +396,6 @@ static UINT16 MFDRV_CreateFontIndirect(PHYSDEV dev, HFONT hFont, LOGFONTW *logfo
*/
HFONT
CDECL
MFDRV_SelectFont
(
PHYSDEV
dev
,
HFONT
hfont
,
HANDLE
gdiFont
)
{
METAFILEDRV_PDEVICE
*
physDev
=
(
METAFILEDRV_PDEVICE
*
)
dev
;
LOGFONTW
font
;
INT16
index
;
...
...
@@ -410,7 +407,7 @@ HFONT CDECL MFDRV_SelectFont( PHYSDEV dev, HFONT hfont, HANDLE gdiFont )
index
=
MFDRV_CreateFontIndirect
(
dev
,
hfont
,
&
font
);
if
(
index
<
0
)
return
HGDI_ERROR
;
GDI_hdc_using_object
(
hfont
,
physD
ev
->
hdc
);
GDI_hdc_using_object
(
hfont
,
d
ev
->
hdc
);
}
return
MFDRV_SelectObject
(
dev
,
index
)
?
hfont
:
HGDI_ERROR
;
}
...
...
@@ -437,7 +434,6 @@ static UINT16 MFDRV_CreatePenIndirect(PHYSDEV dev, HPEN hPen, LOGPEN16 *logpen)
*/
HPEN
CDECL
MFDRV_SelectPen
(
PHYSDEV
dev
,
HPEN
hpen
)
{
METAFILEDRV_PDEVICE
*
physDev
=
(
METAFILEDRV_PDEVICE
*
)
dev
;
LOGPEN16
logpen
;
INT16
index
;
...
...
@@ -476,7 +472,7 @@ HPEN CDECL MFDRV_SelectPen( PHYSDEV dev, HPEN hpen )
index
=
MFDRV_CreatePenIndirect
(
dev
,
hpen
,
&
logpen
);
if
(
index
<
0
)
return
0
;
GDI_hdc_using_object
(
hpen
,
physD
ev
->
hdc
);
GDI_hdc_using_object
(
hpen
,
d
ev
->
hdc
);
}
return
MFDRV_SelectObject
(
dev
,
index
)
?
hpen
:
HGDI_ERROR
;
}
...
...
dlls/gdi32/mfdrv/text.c
View file @
edb68487
...
...
@@ -84,8 +84,7 @@ MFDRV_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
LPSTR
ascii
;
DWORD
len
;
CHARSETINFO
csi
;
METAFILEDRV_PDEVICE
*
physDev
=
(
METAFILEDRV_PDEVICE
*
)
dev
;
int
charset
=
GetTextCharset
(
physDev
->
hdc
);
int
charset
=
GetTextCharset
(
dev
->
hdc
);
UINT
cp
=
CP_ACP
;
if
(
TranslateCharsetInfo
(
ULongToPtr
(
charset
),
&
csi
,
TCI_SRCCHARSET
))
...
...
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