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
7318acaa
Commit
7318acaa
authored
Aug 17, 2002
by
Huw D M Davies
Committed by
Alexandre Julliard
Aug 17, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented a few device caps.
parent
bd0a567a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
5 deletions
+46
-5
dc.c
dlls/gdi/enhmfdrv/dc.c
+28
-0
enhmetafiledrv.h
dlls/gdi/enhmfdrv/enhmetafiledrv.h
+5
-0
init.c
dlls/gdi/enhmfdrv/init.c
+13
-5
No files found.
dlls/gdi/enhmfdrv/dc.c
View file @
7318acaa
...
...
@@ -278,3 +278,31 @@ BOOL EMFDRV_WidenPath( PHYSDEV dev )
return
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
);
}
INT
EMFDRV_GetDeviceCaps
(
PHYSDEV
dev
,
INT
cap
)
{
EMFDRV_PDEVICE
*
physDev
=
(
EMFDRV_PDEVICE
*
)
dev
;
switch
(
cap
)
{
case
HORZRES
:
return
physDev
->
horzres
;
case
VERTRES
:
return
physDev
->
vertres
;
case
LOGPIXELSX
:
return
physDev
->
logpixelsx
;
case
LOGPIXELSY
:
return
physDev
->
logpixelsy
;
case
HORZSIZE
:
return
physDev
->
horzsize
;
case
VERTSIZE
:
return
physDev
->
vertsize
;
case
BITSPIXEL
:
return
physDev
->
bitspixel
;
default:
FIXME
(
"Unimplemented cap %d
\n
"
,
cap
);
return
0
;
}
}
dlls/gdi/enhmfdrv/enhmetafiledrv.h
View file @
7318acaa
...
...
@@ -34,6 +34,10 @@ typedef struct
ENHMETAHEADER
*
emh
;
/* Pointer to enhanced metafile header */
UINT
nextHandle
;
/* Next handle number */
HANDLE
hFile
;
/* Handle for disk based MetaFile */
INT
horzres
,
vertres
;
INT
horzsize
,
vertsize
;
INT
logpixelsx
,
logpixelsy
;
INT
bitspixel
;
}
EMFDRV_PDEVICE
;
...
...
@@ -69,6 +73,7 @@ extern BOOL EMFDRV_FillRgn( PHYSDEV dev, HRGN hrgn, HBRUSH hbrush );
extern
BOOL
EMFDRV_FlattenPath
(
PHYSDEV
dev
);
extern
BOOL
EMFDRV_FrameRgn
(
PHYSDEV
dev
,
HRGN
hrgn
,
HBRUSH
hbrush
,
INT
width
,
INT
height
);
extern
INT
EMFDRV_GetDeviceCaps
(
PHYSDEV
dev
,
INT
cap
);
extern
INT
EMFDRV_IntersectClipRect
(
PHYSDEV
dev
,
INT
left
,
INT
top
,
INT
right
,
INT
bottom
);
extern
BOOL
EMFDRV_InvertRgn
(
PHYSDEV
dev
,
HRGN
hrgn
);
...
...
dlls/gdi/enhmfdrv/init.c
View file @
7318acaa
...
...
@@ -67,7 +67,7 @@ static const DC_FUNCTIONS EMFDRV_Funcs =
NULL
,
/* pGetDCOrgEx */
NULL
,
/* pGetDIBColorTable */
NULL
,
/* pGetDIBits */
NULL
,
/* pGetDeviceCaps */
EMFDRV_GetDeviceCaps
,
/* pGetDeviceCaps */
NULL
,
/* pGetDeviceGammaRamp */
NULL
,
/* pGetNearestColor */
NULL
,
/* pGetPixel */
...
...
@@ -311,6 +311,14 @@ HDC WINAPI CreateEnhMetaFileW(
physDev
->
nextHandle
=
1
;
physDev
->
hFile
=
0
;
physDev
->
horzres
=
GetDeviceCaps
(
hRefDC
,
HORZRES
);
physDev
->
vertres
=
GetDeviceCaps
(
hRefDC
,
VERTRES
);
physDev
->
logpixelsx
=
GetDeviceCaps
(
hRefDC
,
LOGPIXELSX
);
physDev
->
logpixelsy
=
GetDeviceCaps
(
hRefDC
,
LOGPIXELSY
);
physDev
->
horzsize
=
GetDeviceCaps
(
hRefDC
,
HORZSIZE
);
physDev
->
vertsize
=
GetDeviceCaps
(
hRefDC
,
VERTSIZE
);
physDev
->
bitspixel
=
GetDeviceCaps
(
hRefDC
,
BITSPIXEL
);
physDev
->
emh
->
iType
=
EMR_HEADER
;
physDev
->
emh
->
nSize
=
size
;
...
...
@@ -341,12 +349,12 @@ HDC WINAPI CreateEnhMetaFileW(
physDev
->
emh
->
nPalEntries
=
0
;
/* I guess this should start at 0 */
/* Size in pixels */
physDev
->
emh
->
szlDevice
.
cx
=
GetDeviceCaps
(
hRefDC
,
HORZRES
)
;
physDev
->
emh
->
szlDevice
.
cy
=
GetDeviceCaps
(
hRefDC
,
VERTRES
)
;
physDev
->
emh
->
szlDevice
.
cx
=
physDev
->
horzres
;
physDev
->
emh
->
szlDevice
.
cy
=
physDev
->
vertres
;
/* Size in millimeters */
physDev
->
emh
->
szlMillimeters
.
cx
=
GetDeviceCaps
(
hRefDC
,
HORZSIZE
)
;
physDev
->
emh
->
szlMillimeters
.
cy
=
GetDeviceCaps
(
hRefDC
,
VERTSIZE
)
;
physDev
->
emh
->
szlMillimeters
.
cx
=
physDev
->
horzsize
;
physDev
->
emh
->
szlMillimeters
.
cy
=
physDev
->
vertsize
;
memcpy
((
char
*
)
physDev
->
emh
+
sizeof
(
ENHMETAHEADER
),
description
,
length
);
...
...
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