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
3a850fc8
Commit
3a850fc8
authored
Mar 09, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add null driver entry points for the mapping functions.
parent
6419edfb
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
397 additions
and
383 deletions
+397
-383
driver.c
dlls/gdi32/driver.c
+17
-17
enhmetafiledrv.h
dlls/gdi32/enhmfdrv/enhmetafiledrv.h
+10
-10
init.c
dlls/gdi32/enhmfdrv/init.c
+8
-8
mapping.c
dlls/gdi32/enhmfdrv/mapping.c
+41
-27
gdi_private.h
dlls/gdi32/gdi_private.h
+17
-8
mapping.c
dlls/gdi32/mapping.c
+249
-248
init.c
dlls/gdi32/mfdrv/init.c
+8
-8
mapping.c
dlls/gdi32/mfdrv/mapping.c
+25
-43
metafiledrv.h
dlls/gdi32/mfdrv/metafiledrv.h
+10
-10
metafile.c
dlls/gdi32/tests/metafile.c
+12
-4
No files found.
dlls/gdi32/driver.c
View file @
3a850fc8
...
...
@@ -126,8 +126,8 @@ static struct graphics_driver *create_driver( HMODULE module )
GET_FUNC
(
MoveTo
);
GET_FUNC
(
ModifyWorldTransform
);
GET_FUNC
(
OffsetClipRgn
);
GET_FUNC
(
OffsetViewportOrg
);
GET_FUNC
(
OffsetWindowOrg
);
GET_FUNC
(
OffsetViewportOrg
Ex
);
GET_FUNC
(
OffsetWindowOrg
Ex
);
GET_FUNC
(
PaintRgn
);
GET_FUNC
(
PatBlt
);
GET_FUNC
(
Pie
);
...
...
@@ -146,8 +146,8 @@ static struct graphics_driver *create_driver( HMODULE module )
GET_FUNC
(
RestoreDC
);
GET_FUNC
(
RoundRect
);
GET_FUNC
(
SaveDC
);
GET_FUNC
(
ScaleViewportExt
);
GET_FUNC
(
ScaleWindowExt
);
GET_FUNC
(
ScaleViewportExt
Ex
);
GET_FUNC
(
ScaleWindowExt
Ex
);
GET_FUNC
(
SelectBitmap
);
GET_FUNC
(
SelectBrush
);
GET_FUNC
(
SelectClipPath
);
...
...
@@ -177,10 +177,10 @@ static struct graphics_driver *create_driver( HMODULE module )
GET_FUNC
(
SetTextCharacterExtra
);
GET_FUNC
(
SetTextColor
);
GET_FUNC
(
SetTextJustification
);
GET_FUNC
(
SetViewportExt
);
GET_FUNC
(
SetViewportOrg
);
GET_FUNC
(
SetWindowExt
);
GET_FUNC
(
SetWindowOrg
);
GET_FUNC
(
SetViewportExt
Ex
);
GET_FUNC
(
SetViewportOrg
Ex
);
GET_FUNC
(
SetWindowExt
Ex
);
GET_FUNC
(
SetWindowOrg
Ex
);
GET_FUNC
(
SetWorldTransform
);
GET_FUNC
(
StartDoc
);
GET_FUNC
(
StartPage
);
...
...
@@ -483,8 +483,8 @@ const DC_FUNCTIONS null_driver =
NULL
,
/* pModifyWorldTransform */
nulldrv_MoveTo
,
/* pMoveTo */
nulldrv_OffsetClipRgn
,
/* pOffsetClipRgn */
NULL
,
/* pOffsetViewportOrg */
NULL
,
/* pOffsetWindowOrg */
nulldrv_OffsetViewportOrgEx
,
/* pOffsetViewportOrg */
nulldrv_OffsetWindowOrgEx
,
/* pOffsetWindowOrg */
nulldrv_PaintRgn
,
/* pPaintRgn */
NULL
,
/* pPatBlt */
nulldrv_Pie
,
/* pPie */
...
...
@@ -503,8 +503,8 @@ const DC_FUNCTIONS null_driver =
NULL
,
/* pRestoreDC */
nulldrv_RoundRect
,
/* pRoundRect */
NULL
,
/* pSaveDC */
NULL
,
/* pScaleViewportExt */
NULL
,
/* pScaleWindowExt */
nulldrv_ScaleViewportExtEx
,
/* pScaleViewportExt */
nulldrv_ScaleWindowExtEx
,
/* pScaleWindowExt */
NULL
,
/* pSelectBitmap */
NULL
,
/* pSelectBrush */
NULL
,
/* pSelectClipPath */
...
...
@@ -522,7 +522,7 @@ const DC_FUNCTIONS null_driver =
NULL
,
/* pSetDIBitsToDevice */
nulldrv_SetDeviceClipping
,
/* pSetDeviceClipping */
NULL
,
/* pSetDeviceGammaRamp */
NULL
,
/* pSetMapMode */
nulldrv_SetMapMode
,
/* pSetMapMode */
NULL
,
/* pSetMapperFlags */
nulldrv_SetPixel
,
/* pSetPixel */
NULL
,
/* pSetPixelFormat */
...
...
@@ -534,10 +534,10 @@ const DC_FUNCTIONS null_driver =
NULL
,
/* pSetTextCharacterExtra */
NULL
,
/* pSetTextColor */
NULL
,
/* pSetTextJustification */
NULL
,
/* pSetViewportExt */
NULL
,
/* pSetViewportOrg */
NULL
,
/* pSetWindowExt */
NULL
,
/* pSetWindowOrg */
nulldrv_SetViewportExtEx
,
/* pSetViewportExt */
nulldrv_SetViewportOrgEx
,
/* pSetViewportOrg */
nulldrv_SetWindowExtEx
,
/* pSetWindowExt */
nulldrv_SetWindowOrgEx
,
/* pSetWindowOrg */
NULL
,
/* pSetWorldTransform */
nulldrv_StartDoc
,
/* pStartDoc */
nulldrv_StartPage
,
/* pStartPage */
...
...
dlls/gdi32/enhmfdrv/enhmetafiledrv.h
View file @
3a850fc8
...
...
@@ -94,8 +94,8 @@ extern BOOL CDECL EMFDRV_LineTo( PHYSDEV dev, INT x, INT y ) DECLSPEC_HIDDEN
extern
BOOL
CDECL
EMFDRV_ModifyWorldTransform
(
PHYSDEV
dev
,
const
XFORM
*
xform
,
DWORD
mode
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
EMFDRV_MoveTo
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
DECLSPEC_HIDDEN
;
extern
INT
CDECL
EMFDRV_OffsetClipRgn
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
DECLSPEC_HIDDEN
;
extern
INT
CDECL
EMFDRV_OffsetViewportOrg
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
DECLSPEC_HIDDEN
;
extern
INT
CDECL
EMFDRV_OffsetWindowOrg
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
EMFDRV_OffsetViewportOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
EMFDRV_OffsetWindowOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
EMFDRV_PaintRgn
(
PHYSDEV
dev
,
HRGN
hrgn
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
EMFDRV_PatBlt
(
PHYSDEV
dev
,
INT
left
,
INT
top
,
INT
width
,
INT
height
,
DWORD
rop
)
DECLSPEC_HIDDEN
;
...
...
@@ -115,10 +115,10 @@ extern BOOL CDECL EMFDRV_RoundRect( PHYSDEV dev, INT left, INT top,
INT
right
,
INT
bottom
,
INT
ell_width
,
INT
ell_height
)
DECLSPEC_HIDDEN
;
extern
INT
CDECL
EMFDRV_SaveDC
(
PHYSDEV
dev
)
DECLSPEC_HIDDEN
;
extern
INT
CDECL
EMFDRV_ScaleViewportExt
(
PHYSDEV
dev
,
INT
xNu
m
,
INT
xDenom
,
INT
yNum
,
INT
yDenom
)
DECLSPEC_HIDDEN
;
extern
INT
CDECL
EMFDRV_ScaleWindowExt
(
PHYSDEV
dev
,
INT
xNum
,
INT
xDenom
,
INT
yNum
,
INT
yDenom
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
EMFDRV_ScaleViewportExtEx
(
PHYSDEV
dev
,
INT
xNum
,
INT
xDeno
m
,
INT
yNum
,
INT
yDenom
,
SIZE
*
size
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
EMFDRV_ScaleWindowExtEx
(
PHYSDEV
dev
,
INT
xNum
,
INT
xDenom
,
INT
yNum
,
INT
yDenom
,
SIZE
*
size
)
DECLSPEC_HIDDEN
;
extern
HBITMAP
CDECL
EMFDRV_SelectBitmap
(
PHYSDEV
dev
,
HBITMAP
handle
)
DECLSPEC_HIDDEN
;
extern
HBRUSH
CDECL
EMFDRV_SelectBrush
(
PHYSDEV
dev
,
HBRUSH
handle
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
EMFDRV_SelectClipPath
(
PHYSDEV
dev
,
INT
iMode
)
DECLSPEC_HIDDEN
;
...
...
@@ -143,10 +143,10 @@ extern UINT CDECL EMFDRV_SetTextAlign( PHYSDEV dev, UINT align ) DECLSPEC_HI
extern
COLORREF
CDECL
EMFDRV_SetTextColor
(
PHYSDEV
dev
,
COLORREF
color
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
EMFDRV_SetTextJustification
(
PHYSDEV
dev
,
INT
nBreakExtra
,
INT
nBreakCount
)
DECLSPEC_HIDDEN
;
extern
INT
CDECL
EMFDRV_SetViewportExt
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
DECLSPEC_HIDDEN
;
extern
INT
CDECL
EMFDRV_SetViewportOrg
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
DECLSPEC_HIDDEN
;
extern
INT
CDECL
EMFDRV_SetWindowExt
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
DECLSPEC_HIDDEN
;
extern
INT
CDECL
EMFDRV_SetWindowOrg
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
EMFDRV_SetViewportExtEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
SIZE
*
size
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
EMFDRV_SetViewportOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
EMFDRV_SetWindowExtEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
SIZE
*
size
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
EMFDRV_SetWindowOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
EMFDRV_SetWorldTransform
(
PHYSDEV
dev
,
const
XFORM
*
xform
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
EMFDRV_StretchBlt
(
PHYSDEV
devDst
,
INT
xDst
,
INT
yDst
,
INT
widthDst
,
INT
heightDst
,
...
...
dlls/gdi32/enhmfdrv/init.c
View file @
3a850fc8
...
...
@@ -88,8 +88,8 @@ static const DC_FUNCTIONS EMFDRV_Funcs =
EMFDRV_ModifyWorldTransform
,
/* pModifyWorldTransform */
EMFDRV_MoveTo
,
/* pMoveTo */
EMFDRV_OffsetClipRgn
,
/* pOffsetClipRgn */
EMFDRV_OffsetViewportOrg
,
/* pOffsetViewportOrg
*/
EMFDRV_OffsetWindowOrg
,
/* pOffsetWindowOrg
*/
EMFDRV_OffsetViewportOrg
Ex
,
/* pOffsetViewportOrgEx
*/
EMFDRV_OffsetWindowOrg
Ex
,
/* pOffsetWindowOrgEx
*/
EMFDRV_PaintRgn
,
/* pPaintRgn */
EMFDRV_PatBlt
,
/* pPatBlt */
EMFDRV_Pie
,
/* pPie */
...
...
@@ -108,8 +108,8 @@ static const DC_FUNCTIONS EMFDRV_Funcs =
EMFDRV_RestoreDC
,
/* pRestoreDC */
EMFDRV_RoundRect
,
/* pRoundRect */
EMFDRV_SaveDC
,
/* pSaveDC */
EMFDRV_ScaleViewportExt
,
/* pScaleViewportExt
*/
EMFDRV_ScaleWindowExt
,
/* pScaleWindowExt
*/
EMFDRV_ScaleViewportExt
Ex
,
/* pScaleViewportExtEx
*/
EMFDRV_ScaleWindowExt
Ex
,
/* pScaleWindowExtEx
*/
EMFDRV_SelectBitmap
,
/* pSelectBitmap */
EMFDRV_SelectBrush
,
/* pSelectBrush */
EMFDRV_SelectClipPath
,
/* pSelectClipPath */
...
...
@@ -139,10 +139,10 @@ static const DC_FUNCTIONS EMFDRV_Funcs =
NULL
,
/* pSetTextCharacterExtra */
EMFDRV_SetTextColor
,
/* pSetTextColor */
EMFDRV_SetTextJustification
,
/* pSetTextJustification */
EMFDRV_SetViewportExt
,
/* pSetViewportExt
*/
EMFDRV_SetViewportOrg
,
/* pSetViewportOrg
*/
EMFDRV_SetWindowExt
,
/* pSetWindowExt
*/
EMFDRV_SetWindowOrg
,
/* pSetWindowOrg
*/
EMFDRV_SetViewportExt
Ex
,
/* pSetViewportExtEx
*/
EMFDRV_SetViewportOrg
Ex
,
/* pSetViewportOrgEx
*/
EMFDRV_SetWindowExt
Ex
,
/* pSetWindowExtEx
*/
EMFDRV_SetWindowOrg
Ex
,
/* pSetWindowOrgEx
*/
EMFDRV_SetWorldTransform
,
/* pSetWorldTransform */
NULL
,
/* pStartDoc */
NULL
,
/* pStartPage */
...
...
dlls/gdi32/enhmfdrv/mapping.c
View file @
3a850fc8
...
...
@@ -22,16 +22,19 @@
INT
CDECL
EMFDRV_SetMapMode
(
PHYSDEV
dev
,
INT
mode
)
{
PHYSDEV
next
=
GET_NEXT_PHYSDEV
(
dev
,
pSetMapMode
);
EMRSETMAPMODE
emr
;
emr
.
emr
.
iType
=
EMR_SETMAPMODE
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
emr
.
iMode
=
mode
;
return
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
);
if
(
!
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
))
return
0
;
return
next
->
funcs
->
pSetMapMode
(
next
,
mode
);
}
INT
CDECL
EMFDRV_SetViewportExt
(
PHYSDEV
dev
,
INT
cx
,
INT
cy
)
BOOL
CDECL
EMFDRV_SetViewportExtEx
(
PHYSDEV
dev
,
INT
cx
,
INT
cy
,
SIZE
*
size
)
{
PHYSDEV
next
=
GET_NEXT_PHYSDEV
(
dev
,
pSetViewportExtEx
);
EMRSETVIEWPORTEXTEX
emr
;
emr
.
emr
.
iType
=
EMR_SETVIEWPORTEXTEX
;
...
...
@@ -39,11 +42,13 @@ INT CDECL EMFDRV_SetViewportExt( PHYSDEV dev, INT cx, INT cy )
emr
.
szlExtent
.
cx
=
cx
;
emr
.
szlExtent
.
cy
=
cy
;
return
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
);
if
(
!
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
))
return
FALSE
;
return
next
->
funcs
->
pSetViewportExtEx
(
next
,
cx
,
cy
,
size
);
}
INT
CDECL
EMFDRV_SetWindowExt
(
PHYSDEV
dev
,
INT
cx
,
INT
cy
)
BOOL
CDECL
EMFDRV_SetWindowExtEx
(
PHYSDEV
dev
,
INT
cx
,
INT
cy
,
SIZE
*
size
)
{
PHYSDEV
next
=
GET_NEXT_PHYSDEV
(
dev
,
pSetWindowExtEx
);
EMRSETWINDOWEXTEX
emr
;
emr
.
emr
.
iType
=
EMR_SETWINDOWEXTEX
;
...
...
@@ -51,11 +56,13 @@ INT CDECL EMFDRV_SetWindowExt( PHYSDEV dev, INT cx, INT cy )
emr
.
szlExtent
.
cx
=
cx
;
emr
.
szlExtent
.
cy
=
cy
;
return
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
);
if
(
!
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
))
return
0
;
return
next
->
funcs
->
pSetWindowExtEx
(
next
,
cx
,
cy
,
size
);
}
INT
CDECL
EMFDRV_SetViewportOrg
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
BOOL
CDECL
EMFDRV_SetViewportOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
{
PHYSDEV
next
=
GET_NEXT_PHYSDEV
(
dev
,
pSetViewportOrgEx
);
EMRSETVIEWPORTORGEX
emr
;
emr
.
emr
.
iType
=
EMR_SETVIEWPORTORGEX
;
...
...
@@ -63,11 +70,13 @@ INT CDECL EMFDRV_SetViewportOrg( PHYSDEV dev, INT x, INT y )
emr
.
ptlOrigin
.
x
=
x
;
emr
.
ptlOrigin
.
y
=
y
;
return
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
);
if
(
!
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
))
return
0
;
return
next
->
funcs
->
pSetViewportOrgEx
(
next
,
x
,
y
,
pt
);
}
INT
CDECL
EMFDRV_SetWindowOrg
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
BOOL
CDECL
EMFDRV_SetWindowOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
{
PHYSDEV
next
=
GET_NEXT_PHYSDEV
(
dev
,
pSetWindowOrgEx
);
EMRSETWINDOWORGEX
emr
;
emr
.
emr
.
iType
=
EMR_SETWINDOWORGEX
;
...
...
@@ -75,12 +84,13 @@ INT CDECL EMFDRV_SetWindowOrg( PHYSDEV dev, INT x, INT y )
emr
.
ptlOrigin
.
x
=
x
;
emr
.
ptlOrigin
.
y
=
y
;
return
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
);
if
(
!
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
))
return
0
;
return
next
->
funcs
->
pSetWindowOrgEx
(
next
,
x
,
y
,
pt
);
}
INT
CDECL
EMFDRV_ScaleViewportExt
(
PHYSDEV
dev
,
INT
xNum
,
INT
xDenom
,
INT
yNum
,
INT
yDenom
)
BOOL
CDECL
EMFDRV_ScaleViewportExtEx
(
PHYSDEV
dev
,
INT
xNum
,
INT
xDenom
,
INT
yNum
,
INT
yDenom
,
SIZE
*
size
)
{
PHYSDEV
next
=
GET_NEXT_PHYSDEV
(
dev
,
pScaleViewportExtEx
);
EMRSCALEVIEWPORTEXTEX
emr
;
emr
.
emr
.
iType
=
EMR_SCALEVIEWPORTEXTEX
;
...
...
@@ -90,12 +100,13 @@ INT CDECL EMFDRV_ScaleViewportExt( PHYSDEV dev, INT xNum, INT xDenom, INT yNum,
emr
.
yNum
=
yNum
;
emr
.
yDenom
=
yDenom
;
return
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
);
if
(
!
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
))
return
0
;
return
next
->
funcs
->
pScaleViewportExtEx
(
next
,
xNum
,
xDenom
,
yNum
,
yDenom
,
size
);
}
INT
CDECL
EMFDRV_ScaleWindowExt
(
PHYSDEV
dev
,
INT
xNum
,
INT
xDenom
,
INT
yNum
,
INT
yDenom
)
BOOL
CDECL
EMFDRV_ScaleWindowExtEx
(
PHYSDEV
dev
,
INT
xNum
,
INT
xDenom
,
INT
yNum
,
INT
yDenom
,
SIZE
*
size
)
{
PHYSDEV
next
=
GET_NEXT_PHYSDEV
(
dev
,
pScaleWindowExtEx
);
EMRSCALEWINDOWEXTEX
emr
;
emr
.
emr
.
iType
=
EMR_SCALEWINDOWEXTEX
;
...
...
@@ -105,7 +116,8 @@ INT CDECL EMFDRV_ScaleWindowExt( PHYSDEV dev, INT xNum, INT xDenom, INT yNum,
emr
.
yNum
=
yNum
;
emr
.
yDenom
=
yDenom
;
return
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
);
if
(
!
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
))
return
0
;
return
next
->
funcs
->
pScaleWindowExtEx
(
next
,
xNum
,
xDenom
,
yNum
,
yDenom
,
size
);
}
BOOL
CDECL
EMFDRV_SetWorldTransform
(
PHYSDEV
dev
,
const
XFORM
*
xform
)
...
...
@@ -131,34 +143,36 @@ BOOL CDECL EMFDRV_ModifyWorldTransform( PHYSDEV dev, const XFORM *xform, DWORD m
return
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
);
}
INT
CDECL
EMFDRV_OffsetViewportOrg
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
BOOL
CDECL
EMFDRV_OffsetViewportOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
{
P
OINT
pt
;
P
HYSDEV
next
=
GET_NEXT_PHYSDEV
(
dev
,
pOffsetViewportOrgEx
)
;
EMRSETVIEWPORTORGEX
emr
;
EMFDRV_PDEVICE
*
physDev
=
(
EMFDRV_PDEVICE
*
)
dev
;
GetViewportOrgEx
(
physDev
->
hdc
,
&
pt
);
GetViewportOrgEx
(
physDev
->
hdc
,
pt
);
emr
.
emr
.
iType
=
EMR_SETVIEWPORTORGEX
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
emr
.
ptlOrigin
.
x
=
pt
.
x
+
x
;
emr
.
ptlOrigin
.
y
=
pt
.
y
+
y
;
emr
.
ptlOrigin
.
x
=
pt
->
x
+
x
;
emr
.
ptlOrigin
.
y
=
pt
->
y
+
y
;
return
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
);
if
(
!
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
))
return
0
;
return
next
->
funcs
->
pOffsetViewportOrgEx
(
next
,
x
,
y
,
pt
);
}
INT
CDECL
EMFDRV_OffsetWindowOrg
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
BOOL
CDECL
EMFDRV_OffsetWindowOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
{
P
OINT
pt
;
P
HYSDEV
next
=
GET_NEXT_PHYSDEV
(
dev
,
pOffsetWindowOrgEx
)
;
EMRSETWINDOWORGEX
emr
;
EMFDRV_PDEVICE
*
physDev
=
(
EMFDRV_PDEVICE
*
)
dev
;
GetWindowOrgEx
(
physDev
->
hdc
,
&
pt
);
GetWindowOrgEx
(
physDev
->
hdc
,
pt
);
emr
.
emr
.
iType
=
EMR_SETWINDOWORGEX
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
emr
.
ptlOrigin
.
x
=
pt
.
x
+
x
;
emr
.
ptlOrigin
.
y
=
pt
.
y
+
y
;
emr
.
ptlOrigin
.
x
=
pt
->
x
+
x
;
emr
.
ptlOrigin
.
y
=
pt
->
y
+
y
;
return
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
);
if
(
!
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
))
return
0
;
return
next
->
funcs
->
pOffsetWindowOrgEx
(
next
,
x
,
y
,
pt
);
}
dlls/gdi32/gdi_private.h
View file @
3a850fc8
...
...
@@ -135,8 +135,8 @@ typedef struct tagDC_FUNCS
BOOL
(
CDECL
*
pModifyWorldTransform
)(
PHYSDEV
,
const
XFORM
*
,
DWORD
);
BOOL
(
CDECL
*
pMoveTo
)(
PHYSDEV
,
INT
,
INT
);
INT
(
CDECL
*
pOffsetClipRgn
)(
PHYSDEV
,
INT
,
INT
);
INT
(
CDECL
*
pOffsetViewportOrg
)(
PHYSDEV
,
INT
,
INT
);
INT
(
CDECL
*
pOffsetWindowOrg
)(
PHYSDEV
,
INT
,
INT
);
BOOL
(
CDECL
*
pOffsetViewportOrgEx
)(
PHYSDEV
,
INT
,
INT
,
POINT
*
);
BOOL
(
CDECL
*
pOffsetWindowOrgEx
)(
PHYSDEV
,
INT
,
INT
,
POINT
*
);
BOOL
(
CDECL
*
pPaintRgn
)(
PHYSDEV
,
HRGN
);
BOOL
(
CDECL
*
pPatBlt
)(
PHYSDEV
,
INT
,
INT
,
INT
,
INT
,
DWORD
);
BOOL
(
CDECL
*
pPie
)(
PHYSDEV
,
INT
,
INT
,
INT
,
INT
,
INT
,
INT
,
INT
,
INT
);
...
...
@@ -155,8 +155,8 @@ typedef struct tagDC_FUNCS
BOOL
(
CDECL
*
pRestoreDC
)(
PHYSDEV
,
INT
);
BOOL
(
CDECL
*
pRoundRect
)(
PHYSDEV
,
INT
,
INT
,
INT
,
INT
,
INT
,
INT
);
INT
(
CDECL
*
pSaveDC
)(
PHYSDEV
);
INT
(
CDECL
*
pScaleViewportExt
)(
PHYSDEV
,
INT
,
INT
,
INT
,
INT
);
INT
(
CDECL
*
pScaleWindowExt
)(
PHYSDEV
,
INT
,
INT
,
INT
,
INT
);
BOOL
(
CDECL
*
pScaleViewportExtEx
)(
PHYSDEV
,
INT
,
INT
,
INT
,
INT
,
SIZE
*
);
BOOL
(
CDECL
*
pScaleWindowExtEx
)(
PHYSDEV
,
INT
,
INT
,
INT
,
INT
,
SIZE
*
);
HBITMAP
(
CDECL
*
pSelectBitmap
)(
PHYSDEV
,
HBITMAP
);
HBRUSH
(
CDECL
*
pSelectBrush
)(
PHYSDEV
,
HBRUSH
);
BOOL
(
CDECL
*
pSelectClipPath
)(
PHYSDEV
,
INT
);
...
...
@@ -187,10 +187,10 @@ typedef struct tagDC_FUNCS
INT
(
CDECL
*
pSetTextCharacterExtra
)(
PHYSDEV
,
INT
);
DWORD
(
CDECL
*
pSetTextColor
)(
PHYSDEV
,
DWORD
);
INT
(
CDECL
*
pSetTextJustification
)(
PHYSDEV
,
INT
,
INT
);
INT
(
CDECL
*
pSetViewportExt
)(
PHYSDEV
,
INT
,
INT
);
INT
(
CDECL
*
pSetViewportOrg
)(
PHYSDEV
,
INT
,
INT
);
INT
(
CDECL
*
pSetWindowExt
)(
PHYSDEV
,
INT
,
INT
);
INT
(
CDECL
*
pSetWindowOrg
)(
PHYSDEV
,
INT
,
INT
);
BOOL
(
CDECL
*
pSetViewportExtEx
)(
PHYSDEV
,
INT
,
INT
,
SIZE
*
);
BOOL
(
CDECL
*
pSetViewportOrgEx
)(
PHYSDEV
,
INT
,
INT
,
POINT
*
);
BOOL
(
CDECL
*
pSetWindowExtEx
)(
PHYSDEV
,
INT
,
INT
,
SIZE
*
);
BOOL
(
CDECL
*
pSetWindowOrgEx
)(
PHYSDEV
,
INT
,
INT
,
POINT
*
);
BOOL
(
CDECL
*
pSetWorldTransform
)(
PHYSDEV
,
const
XFORM
*
);
INT
(
CDECL
*
pStartDoc
)(
PHYSDEV
,
const
DOCINFOW
*
);
INT
(
CDECL
*
pStartPage
)(
PHYSDEV
);
...
...
@@ -521,10 +521,19 @@ extern BOOL CDECL nulldrv_FrameRgn( PHYSDEV dev, HRGN rgn, HBRUSH brush, INT wid
extern
INT
CDECL
nulldrv_IntersectClipRect
(
PHYSDEV
dev
,
INT
left
,
INT
top
,
INT
right
,
INT
bottom
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
nulldrv_InvertRgn
(
PHYSDEV
dev
,
HRGN
rgn
)
DECLSPEC_HIDDEN
;
extern
INT
CDECL
nulldrv_OffsetClipRgn
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
nulldrv_OffsetViewportOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
nulldrv_OffsetWindowOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
nulldrv_PolyBezier
(
PHYSDEV
dev
,
const
POINT
*
points
,
DWORD
count
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
nulldrv_PolyBezierTo
(
PHYSDEV
dev
,
const
POINT
*
points
,
DWORD
count
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
nulldrv_PolyDraw
(
PHYSDEV
dev
,
const
POINT
*
points
,
const
BYTE
*
types
,
DWORD
count
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
nulldrv_PolylineTo
(
PHYSDEV
dev
,
const
POINT
*
points
,
INT
count
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
nulldrv_ScaleViewportExtEx
(
PHYSDEV
dev
,
INT
x_num
,
INT
x_denom
,
INT
y_num
,
INT
y_denom
,
SIZE
*
size
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
nulldrv_ScaleWindowExtEx
(
PHYSDEV
dev
,
INT
x_num
,
INT
x_denom
,
INT
y_num
,
INT
y_denom
,
SIZE
*
size
)
DECLSPEC_HIDDEN
;
extern
INT
CDECL
nulldrv_SetMapMode
(
PHYSDEV
dev
,
INT
mode
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
nulldrv_SetViewportExtEx
(
PHYSDEV
dev
,
INT
cx
,
INT
cy
,
SIZE
*
size
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
nulldrv_SetViewportOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
nulldrv_SetWindowExtEx
(
PHYSDEV
dev
,
INT
cx
,
INT
cy
,
SIZE
*
size
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
nulldrv_SetWindowOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
DECLSPEC_HIDDEN
;
static
inline
DC
*
get_nulldrv_dc
(
PHYSDEV
dev
)
{
...
...
dlls/gdi32/mapping.c
View file @
3a850fc8
...
...
@@ -57,90 +57,96 @@ static void MAPPING_FixIsotropic( DC * dc )
/***********************************************************************
*
DPtoLP (GDI32.@)
*
null driver fallback implementations
*/
BOOL
WINAPI
DPtoLP
(
HDC
hdc
,
LPPOINT
points
,
INT
count
)
BOOL
CDECL
nulldrv_OffsetViewportOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
{
DC
*
dc
=
get_dc_ptr
(
hdc
);
if
(
!
dc
)
return
FALSE
;
DC
*
dc
=
get_nulldrv_dc
(
dev
);
if
(
dc
->
vport2WorldValid
)
if
(
pt
)
{
while
(
count
--
)
{
double
x
=
points
->
x
;
double
y
=
points
->
y
;
points
->
x
=
floor
(
x
*
dc
->
xformVport2World
.
eM11
+
y
*
dc
->
xformVport2World
.
eM21
+
dc
->
xformVport2World
.
eDx
+
0
.
5
);
points
->
y
=
floor
(
x
*
dc
->
xformVport2World
.
eM12
+
y
*
dc
->
xformVport2World
.
eM22
+
dc
->
xformVport2World
.
eDy
+
0
.
5
);
points
++
;
}
pt
->
x
=
dc
->
vportOrgX
;
pt
->
y
=
dc
->
vportOrgY
;
}
release_dc_ptr
(
dc
);
return
(
count
<
0
);
dc
->
vportOrgX
+=
x
;
dc
->
vportOrgY
+=
y
;
DC_UpdateXforms
(
dc
);
return
TRUE
;
}
/***********************************************************************
* LPtoDP (GDI32.@)
*/
BOOL
WINAPI
LPtoDP
(
HDC
hdc
,
LPPOINT
points
,
INT
count
)
BOOL
CDECL
nulldrv_OffsetWindowOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
{
DC
*
dc
=
get_dc_ptr
(
hdc
);
if
(
!
dc
)
return
FALSE
;
DC
*
dc
=
get_nulldrv_dc
(
dev
);
while
(
count
--
)
if
(
pt
)
{
double
x
=
points
->
x
;
double
y
=
points
->
y
;
points
->
x
=
floor
(
x
*
dc
->
xformWorld2Vport
.
eM11
+
y
*
dc
->
xformWorld2Vport
.
eM21
+
dc
->
xformWorld2Vport
.
eDx
+
0
.
5
);
points
->
y
=
floor
(
x
*
dc
->
xformWorld2Vport
.
eM12
+
y
*
dc
->
xformWorld2Vport
.
eM22
+
dc
->
xformWorld2Vport
.
eDy
+
0
.
5
);
points
++
;
pt
->
x
=
dc
->
wndOrgX
;
pt
->
y
=
dc
->
wndOrgY
;
}
release_dc_ptr
(
dc
);
dc
->
wndOrgX
+=
x
;
dc
->
wndOrgY
+=
y
;
DC_UpdateXforms
(
dc
);
return
TRUE
;
}
BOOL
CDECL
nulldrv_ScaleViewportExtEx
(
PHYSDEV
dev
,
INT
x_num
,
INT
x_denom
,
INT
y_num
,
INT
y_denom
,
SIZE
*
size
)
{
DC
*
dc
=
get_nulldrv_dc
(
dev
);
/***********************************************************************
* SetMapMode (GDI32.@)
*/
INT
WINAPI
SetMapMode
(
HDC
hdc
,
INT
mode
)
if
(
size
)
{
size
->
cx
=
dc
->
vportExtX
;
size
->
cy
=
dc
->
vportExtY
;
}
if
(
dc
->
MapMode
!=
MM_ISOTROPIC
&&
dc
->
MapMode
!=
MM_ANISOTROPIC
)
return
TRUE
;
if
(
!
x_num
||
!
x_denom
||
!
y_num
||
!
y_denom
)
return
FALSE
;
dc
->
vportExtX
=
(
dc
->
vportExtX
*
x_num
)
/
x_denom
;
dc
->
vportExtY
=
(
dc
->
vportExtY
*
y_num
)
/
y_denom
;
if
(
dc
->
vportExtX
==
0
)
dc
->
vportExtX
=
1
;
if
(
dc
->
vportExtY
==
0
)
dc
->
vportExtY
=
1
;
if
(
dc
->
MapMode
==
MM_ISOTROPIC
)
MAPPING_FixIsotropic
(
dc
);
DC_UpdateXforms
(
dc
);
return
TRUE
;
}
BOOL
CDECL
nulldrv_ScaleWindowExtEx
(
PHYSDEV
dev
,
INT
x_num
,
INT
x_denom
,
INT
y_num
,
INT
y_denom
,
SIZE
*
size
)
{
INT
ret
;
INT
horzSize
,
vertSize
,
horzRes
,
vertRes
;
DC
*
dc
=
get_nulldrv_dc
(
dev
);
DC
*
dc
=
get_dc_ptr
(
hdc
);
if
(
!
dc
)
return
0
;
if
(
dc
->
funcs
->
pSetMapMode
)
if
(
size
)
{
if
((
ret
=
dc
->
funcs
->
pSetMapMode
(
dc
->
physDev
,
mode
))
!=
TRUE
)
{
if
(
ret
==
GDI_NO_MORE_WORK
)
ret
=
TRUE
;
goto
done
;
}
size
->
cx
=
dc
->
wndExtX
;
size
->
cy
=
dc
->
wndExtY
;
}
if
(
dc
->
MapMode
!=
MM_ISOTROPIC
&&
dc
->
MapMode
!=
MM_ANISOTROPIC
)
return
TRUE
;
if
(
!
x_num
||
!
x_denom
||
!
y_num
||
!
y_denom
)
return
FALSE
;
TRACE
(
"%p %d
\n
"
,
hdc
,
mode
);
dc
->
wndExtX
=
(
dc
->
wndExtX
*
x_num
)
/
x_denom
;
dc
->
wndExtY
=
(
dc
->
wndExtY
*
y_num
)
/
y_denom
;
if
(
dc
->
wndExtX
==
0
)
dc
->
wndExtX
=
1
;
if
(
dc
->
wndExtY
==
0
)
dc
->
wndExtY
=
1
;
if
(
dc
->
MapMode
==
MM_ISOTROPIC
)
MAPPING_FixIsotropic
(
dc
);
DC_UpdateXforms
(
dc
);
return
TRUE
;
}
ret
=
dc
->
MapMode
;
INT
CDECL
nulldrv_SetMapMode
(
PHYSDEV
dev
,
INT
mode
)
{
DC
*
dc
=
get_nulldrv_dc
(
dev
);
INT
ret
=
dc
->
MapMode
;
INT
horzSize
,
vertSize
,
horzRes
,
vertRes
;
if
(
mode
==
dc
->
MapMode
&&
(
mode
==
MM_ISOTROPIC
||
mode
==
MM_ANISOTROPIC
))
goto
done
;
if
(
mode
==
dc
->
MapMode
&&
(
mode
==
MM_ISOTROPIC
||
mode
==
MM_ANISOTROPIC
))
return
ret
;
horzSize
=
dc
->
virtual_size
.
cx
;
vertSize
=
dc
->
virtual_size
.
cy
;
horzRes
=
dc
->
virtual_res
.
cx
;
vertRes
=
dc
->
virtual_res
.
cy
;
switch
(
mode
)
switch
(
mode
)
{
case
MM_TEXT
:
dc
->
wndExtX
=
1
;
...
...
@@ -182,126 +188,206 @@ INT WINAPI SetMapMode( HDC hdc, INT mode )
case
MM_ANISOTROPIC
:
break
;
default:
goto
done
;
return
0
;
}
/* RTL layout is always MM_ANISOTROPIC */
if
(
!
(
dc
->
layout
&
LAYOUT_RTL
))
dc
->
MapMode
=
mode
;
DC_UpdateXforms
(
dc
);
done:
release_dc_ptr
(
dc
);
return
ret
;
}
BOOL
CDECL
nulldrv_SetViewportExtEx
(
PHYSDEV
dev
,
INT
cx
,
INT
cy
,
SIZE
*
size
)
{
DC
*
dc
=
get_nulldrv_dc
(
dev
);
/***********************************************************************
* SetViewportExtEx (GDI32.@)
*/
BOOL
WINAPI
SetViewportExtEx
(
HDC
hdc
,
INT
x
,
INT
y
,
LPSIZE
size
)
if
(
size
)
{
size
->
cx
=
dc
->
vportExtX
;
size
->
cy
=
dc
->
vportExtY
;
}
if
(
dc
->
MapMode
!=
MM_ISOTROPIC
&&
dc
->
MapMode
!=
MM_ANISOTROPIC
)
return
TRUE
;
if
(
!
cx
||
!
cy
)
return
FALSE
;
dc
->
vportExtX
=
cx
;
dc
->
vportExtY
=
cy
;
if
(
dc
->
MapMode
==
MM_ISOTROPIC
)
MAPPING_FixIsotropic
(
dc
);
DC_UpdateXforms
(
dc
);
return
TRUE
;
}
BOOL
CDECL
nulldrv_SetViewportOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
{
INT
ret
=
TRUE
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
if
(
!
dc
)
return
FALSE
;
if
(
dc
->
funcs
->
pSetViewportExt
)
DC
*
dc
=
get_nulldrv_dc
(
dev
);
if
(
pt
)
{
if
((
ret
=
dc
->
funcs
->
pSetViewportExt
(
dc
->
physDev
,
x
,
y
))
!=
TRUE
)
{
if
(
ret
==
GDI_NO_MORE_WORK
)
ret
=
TRUE
;
goto
done
;
}
pt
->
x
=
dc
->
vportOrgX
;
pt
->
y
=
dc
->
vportOrgY
;
}
dc
->
vportOrgX
=
x
;
dc
->
vportOrgY
=
y
;
DC_UpdateXforms
(
dc
);
return
TRUE
;
}
BOOL
CDECL
nulldrv_SetWindowExtEx
(
PHYSDEV
dev
,
INT
cx
,
INT
cy
,
SIZE
*
size
)
{
DC
*
dc
=
get_nulldrv_dc
(
dev
);
if
(
size
)
{
size
->
cx
=
dc
->
vport
ExtX
;
size
->
cy
=
dc
->
vport
ExtY
;
size
->
cx
=
dc
->
wnd
ExtX
;
size
->
cy
=
dc
->
wnd
ExtY
;
}
if
((
dc
->
MapMode
!=
MM_ISOTROPIC
)
&&
(
dc
->
MapMode
!=
MM_ANISOTROPIC
))
goto
done
;
if
(
!
x
||
!
y
)
if
(
dc
->
MapMode
!=
MM_ISOTROPIC
&&
dc
->
MapMode
!=
MM_ANISOTROPIC
)
return
TRUE
;
if
(
!
cx
||
!
cy
)
return
FALSE
;
dc
->
wndExtX
=
cx
;
dc
->
wndExtY
=
cy
;
/* The API docs say that you should call SetWindowExtEx before
SetViewportExtEx. This advice does not imply that Windows
doesn't ensure the isotropic mapping after SetWindowExtEx! */
if
(
dc
->
MapMode
==
MM_ISOTROPIC
)
MAPPING_FixIsotropic
(
dc
);
DC_UpdateXforms
(
dc
);
return
TRUE
;
}
BOOL
CDECL
nulldrv_SetWindowOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
{
DC
*
dc
=
get_nulldrv_dc
(
dev
);
if
(
pt
)
{
ret
=
FALSE
;
goto
done
;
pt
->
x
=
dc
->
wndOrgX
;
pt
->
y
=
dc
->
wndOrgY
;
}
dc
->
vportExtX
=
x
;
dc
->
vportExtY
=
y
;
if
(
dc
->
MapMode
==
MM_ISOTROPIC
)
MAPPING_FixIsotropic
(
dc
);
dc
->
wndOrgX
=
x
;
dc
->
wndOrgY
=
y
;
DC_UpdateXforms
(
dc
);
done:
return
TRUE
;
}
/***********************************************************************
* DPtoLP (GDI32.@)
*/
BOOL
WINAPI
DPtoLP
(
HDC
hdc
,
LPPOINT
points
,
INT
count
)
{
DC
*
dc
=
get_dc_ptr
(
hdc
);
if
(
!
dc
)
return
FALSE
;
if
(
dc
->
vport2WorldValid
)
{
while
(
count
--
)
{
double
x
=
points
->
x
;
double
y
=
points
->
y
;
points
->
x
=
floor
(
x
*
dc
->
xformVport2World
.
eM11
+
y
*
dc
->
xformVport2World
.
eM21
+
dc
->
xformVport2World
.
eDx
+
0
.
5
);
points
->
y
=
floor
(
x
*
dc
->
xformVport2World
.
eM12
+
y
*
dc
->
xformVport2World
.
eM22
+
dc
->
xformVport2World
.
eDy
+
0
.
5
);
points
++
;
}
}
release_dc_ptr
(
dc
);
return
ret
;
return
(
count
<
0
)
;
}
/***********************************************************************
*
SetViewportOrgEx
(GDI32.@)
*
LPtoDP
(GDI32.@)
*/
BOOL
WINAPI
SetViewportOrgEx
(
HDC
hdc
,
INT
x
,
INT
y
,
LPPOINT
p
t
)
BOOL
WINAPI
LPtoDP
(
HDC
hdc
,
LPPOINT
points
,
INT
coun
t
)
{
INT
ret
=
TRUE
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
if
(
!
dc
)
return
FALSE
;
if
(
dc
->
funcs
->
pSetViewportOrg
)
while
(
count
--
)
{
if
((
ret
=
dc
->
funcs
->
pSetViewportOrg
(
dc
->
physDev
,
x
,
y
))
!=
TRUE
)
{
if
(
ret
==
GDI_NO_MORE_WORK
)
ret
=
TRUE
;
goto
done
;
}
double
x
=
points
->
x
;
double
y
=
points
->
y
;
points
->
x
=
floor
(
x
*
dc
->
xformWorld2Vport
.
eM11
+
y
*
dc
->
xformWorld2Vport
.
eM21
+
dc
->
xformWorld2Vport
.
eDx
+
0
.
5
);
points
->
y
=
floor
(
x
*
dc
->
xformWorld2Vport
.
eM12
+
y
*
dc
->
xformWorld2Vport
.
eM22
+
dc
->
xformWorld2Vport
.
eDy
+
0
.
5
);
points
++
;
}
if
(
pt
)
release_dc_ptr
(
dc
);
return
TRUE
;
}
/***********************************************************************
* SetMapMode (GDI32.@)
*/
INT
WINAPI
SetMapMode
(
HDC
hdc
,
INT
mode
)
{
INT
ret
=
0
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
TRACE
(
"%p %d
\n
"
,
hdc
,
mode
);
if
(
dc
)
{
pt
->
x
=
dc
->
vportOrgX
;
pt
->
y
=
dc
->
vportOrgY
;
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pSetMapMode
);
ret
=
physdev
->
funcs
->
pSetMapMode
(
physdev
,
mode
);
release_dc_ptr
(
dc
);
}
dc
->
vportOrgX
=
x
;
dc
->
vportOrgY
=
y
;
DC_UpdateXforms
(
dc
);
done:
release_dc_ptr
(
dc
);
return
ret
;
}
/***********************************************************************
* Set
Window
ExtEx (GDI32.@)
* Set
Viewport
ExtEx (GDI32.@)
*/
BOOL
WINAPI
Set
Window
ExtEx
(
HDC
hdc
,
INT
x
,
INT
y
,
LPSIZE
size
)
BOOL
WINAPI
Set
Viewport
ExtEx
(
HDC
hdc
,
INT
x
,
INT
y
,
LPSIZE
size
)
{
INT
ret
=
TRU
E
;
INT
ret
=
FALS
E
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
if
(
!
dc
)
return
FALSE
;
if
(
dc
->
funcs
->
pSetWindowExt
)
if
(
dc
)
{
if
((
ret
=
dc
->
funcs
->
pSetWindowExt
(
dc
->
physDev
,
x
,
y
))
!=
TRUE
)
{
if
(
ret
==
GDI_NO_MORE_WORK
)
ret
=
TRUE
;
goto
done
;
}
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pSetViewportExtEx
);
ret
=
physdev
->
funcs
->
pSetViewportExtEx
(
physdev
,
x
,
y
,
size
);
release_dc_ptr
(
dc
);
}
if
(
size
)
return
ret
;
}
/***********************************************************************
* SetViewportOrgEx (GDI32.@)
*/
BOOL
WINAPI
SetViewportOrgEx
(
HDC
hdc
,
INT
x
,
INT
y
,
LPPOINT
pt
)
{
INT
ret
=
FALSE
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
if
(
dc
)
{
size
->
cx
=
dc
->
wndExtX
;
size
->
cy
=
dc
->
wndExtY
;
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pSetViewportOrgEx
);
ret
=
physdev
->
funcs
->
pSetViewportOrgEx
(
physdev
,
x
,
y
,
pt
);
release_dc_ptr
(
dc
);
}
if
((
dc
->
MapMode
!=
MM_ISOTROPIC
)
&&
(
dc
->
MapMode
!=
MM_ANISOTROPIC
))
goto
done
;
if
(
!
x
||
!
y
)
return
ret
;
}
/***********************************************************************
* SetWindowExtEx (GDI32.@)
*/
BOOL
WINAPI
SetWindowExtEx
(
HDC
hdc
,
INT
x
,
INT
y
,
LPSIZE
size
)
{
INT
ret
=
FALSE
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
if
(
dc
)
{
ret
=
FALSE
;
goto
done
;
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pSetWindowExtEx
);
ret
=
physdev
->
funcs
->
pSetWindowExtEx
(
physdev
,
x
,
y
,
size
);
release_dc_ptr
(
dc
);
}
dc
->
wndExtX
=
x
;
dc
->
wndExtY
=
y
;
/* The API docs say that you should call SetWindowExtEx before
SetViewportExtEx. This advice does not imply that Windows
doesn't ensure the isotropic mapping after SetWindowExtEx! */
if
(
dc
->
MapMode
==
MM_ISOTROPIC
)
MAPPING_FixIsotropic
(
dc
);
DC_UpdateXforms
(
dc
);
done:
release_dc_ptr
(
dc
);
return
ret
;
}
...
...
@@ -311,28 +397,15 @@ BOOL WINAPI SetWindowExtEx( HDC hdc, INT x, INT y, LPSIZE size )
*/
BOOL
WINAPI
SetWindowOrgEx
(
HDC
hdc
,
INT
x
,
INT
y
,
LPPOINT
pt
)
{
INT
ret
=
TRU
E
;
INT
ret
=
FALS
E
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
if
(
!
dc
)
return
FALSE
;
if
(
dc
->
funcs
->
pSetWindowOrg
)
{
if
((
ret
=
dc
->
funcs
->
pSetWindowOrg
(
dc
->
physDev
,
x
,
y
))
!=
TRUE
)
{
if
(
ret
==
GDI_NO_MORE_WORK
)
ret
=
TRUE
;
goto
done
;
}
}
if
(
pt
)
if
(
dc
)
{
pt
->
x
=
dc
->
wndOrgX
;
pt
->
y
=
dc
->
wndOrgY
;
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pSetWindowOrgEx
);
ret
=
physdev
->
funcs
->
pSetWindowOrgEx
(
physdev
,
x
,
y
,
pt
);
release_dc_ptr
(
dc
);
}
dc
->
wndOrgX
=
x
;
dc
->
wndOrgY
=
y
;
DC_UpdateXforms
(
dc
);
done:
release_dc_ptr
(
dc
);
return
ret
;
}
...
...
@@ -342,28 +415,15 @@ BOOL WINAPI SetWindowOrgEx( HDC hdc, INT x, INT y, LPPOINT pt )
*/
BOOL
WINAPI
OffsetViewportOrgEx
(
HDC
hdc
,
INT
x
,
INT
y
,
LPPOINT
pt
)
{
INT
ret
=
TRU
E
;
INT
ret
=
FALS
E
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
if
(
!
dc
)
return
FALSE
;
if
(
dc
->
funcs
->
pOffsetViewportOrg
)
{
if
((
ret
=
dc
->
funcs
->
pOffsetViewportOrg
(
dc
->
physDev
,
x
,
y
))
!=
TRUE
)
{
if
(
ret
==
GDI_NO_MORE_WORK
)
ret
=
TRUE
;
goto
done
;
}
}
if
(
pt
)
if
(
dc
)
{
pt
->
x
=
dc
->
vportOrgX
;
pt
->
y
=
dc
->
vportOrgY
;
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pOffsetViewportOrgEx
);
ret
=
physdev
->
funcs
->
pOffsetViewportOrgEx
(
physdev
,
x
,
y
,
pt
);
release_dc_ptr
(
dc
);
}
dc
->
vportOrgX
+=
x
;
dc
->
vportOrgY
+=
y
;
DC_UpdateXforms
(
dc
);
done:
release_dc_ptr
(
dc
);
return
ret
;
}
...
...
@@ -373,28 +433,15 @@ BOOL WINAPI OffsetViewportOrgEx( HDC hdc, INT x, INT y, LPPOINT pt)
*/
BOOL
WINAPI
OffsetWindowOrgEx
(
HDC
hdc
,
INT
x
,
INT
y
,
LPPOINT
pt
)
{
INT
ret
=
TRU
E
;
INT
ret
=
FALS
E
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
if
(
!
dc
)
return
FALSE
;
if
(
dc
->
funcs
->
pOffsetWindowOrg
)
if
(
dc
)
{
if
((
ret
=
dc
->
funcs
->
pOffsetWindowOrg
(
dc
->
physDev
,
x
,
y
))
!=
TRUE
)
{
if
(
ret
==
GDI_NO_MORE_WORK
)
ret
=
TRUE
;
goto
done
;
}
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pOffsetWindowOrgEx
);
ret
=
physdev
->
funcs
->
pOffsetWindowOrgEx
(
physdev
,
x
,
y
,
pt
);
release_dc_ptr
(
dc
);
}
if
(
pt
)
{
pt
->
x
=
dc
->
wndOrgX
;
pt
->
y
=
dc
->
wndOrgY
;
}
dc
->
wndOrgX
+=
x
;
dc
->
wndOrgY
+=
y
;
DC_UpdateXforms
(
dc
);
done:
release_dc_ptr
(
dc
);
return
ret
;
}
...
...
@@ -405,38 +452,15 @@ BOOL WINAPI OffsetWindowOrgEx( HDC hdc, INT x, INT y, LPPOINT pt )
BOOL
WINAPI
ScaleViewportExtEx
(
HDC
hdc
,
INT
xNum
,
INT
xDenom
,
INT
yNum
,
INT
yDenom
,
LPSIZE
size
)
{
INT
ret
=
TRU
E
;
INT
ret
=
FALS
E
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
if
(
!
dc
)
return
FALSE
;
if
(
dc
->
funcs
->
pScaleViewportExt
)
{
if
((
ret
=
dc
->
funcs
->
pScaleViewportExt
(
dc
->
physDev
,
xNum
,
xDenom
,
yNum
,
yDenom
))
!=
TRUE
)
{
if
(
ret
==
GDI_NO_MORE_WORK
)
ret
=
TRUE
;
goto
done
;
}
}
if
(
size
)
{
size
->
cx
=
dc
->
vportExtX
;
size
->
cy
=
dc
->
vportExtY
;
}
if
((
dc
->
MapMode
!=
MM_ISOTROPIC
)
&&
(
dc
->
MapMode
!=
MM_ANISOTROPIC
))
goto
done
;
if
(
!
xNum
||
!
xDenom
||
!
yNum
||
!
yDenom
)
if
(
dc
)
{
ret
=
FALSE
;
goto
done
;
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pScaleViewportExtEx
);
ret
=
physdev
->
funcs
->
pScaleViewportExtEx
(
physdev
,
xNum
,
xDenom
,
yNum
,
yDenom
,
size
);
release_dc_ptr
(
dc
);
}
dc
->
vportExtX
=
(
dc
->
vportExtX
*
xNum
)
/
xDenom
;
dc
->
vportExtY
=
(
dc
->
vportExtY
*
yNum
)
/
yDenom
;
if
(
dc
->
vportExtX
==
0
)
dc
->
vportExtX
=
1
;
if
(
dc
->
vportExtY
==
0
)
dc
->
vportExtY
=
1
;
if
(
dc
->
MapMode
==
MM_ISOTROPIC
)
MAPPING_FixIsotropic
(
dc
);
DC_UpdateXforms
(
dc
);
done:
release_dc_ptr
(
dc
);
return
ret
;
}
...
...
@@ -447,38 +471,15 @@ BOOL WINAPI ScaleViewportExtEx( HDC hdc, INT xNum, INT xDenom,
BOOL
WINAPI
ScaleWindowExtEx
(
HDC
hdc
,
INT
xNum
,
INT
xDenom
,
INT
yNum
,
INT
yDenom
,
LPSIZE
size
)
{
INT
ret
=
TRU
E
;
INT
ret
=
FALS
E
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
if
(
!
dc
)
return
FALSE
;
if
(
dc
->
funcs
->
pScaleWindowExt
)
{
if
((
ret
=
dc
->
funcs
->
pScaleWindowExt
(
dc
->
physDev
,
xNum
,
xDenom
,
yNum
,
yDenom
))
!=
TRUE
)
{
if
(
ret
==
GDI_NO_MORE_WORK
)
ret
=
TRUE
;
goto
done
;
}
}
if
(
size
)
{
size
->
cx
=
dc
->
wndExtX
;
size
->
cy
=
dc
->
wndExtY
;
}
if
((
dc
->
MapMode
!=
MM_ISOTROPIC
)
&&
(
dc
->
MapMode
!=
MM_ANISOTROPIC
))
goto
done
;
if
(
!
xNum
||
!
xDenom
||
!
xNum
||
!
yDenom
)
if
(
dc
)
{
ret
=
FALSE
;
goto
done
;
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pScaleWindowExtEx
);
ret
=
physdev
->
funcs
->
pScaleWindowExtEx
(
physdev
,
xNum
,
xDenom
,
yNum
,
yDenom
,
size
);
release_dc_ptr
(
dc
);
}
dc
->
wndExtX
=
(
dc
->
wndExtX
*
xNum
)
/
xDenom
;
dc
->
wndExtY
=
(
dc
->
wndExtY
*
yNum
)
/
yDenom
;
if
(
dc
->
wndExtX
==
0
)
dc
->
wndExtX
=
1
;
if
(
dc
->
wndExtY
==
0
)
dc
->
wndExtY
=
1
;
if
(
dc
->
MapMode
==
MM_ISOTROPIC
)
MAPPING_FixIsotropic
(
dc
);
DC_UpdateXforms
(
dc
);
done:
release_dc_ptr
(
dc
);
return
ret
;
}
...
...
dlls/gdi32/mfdrv/init.c
View file @
3a850fc8
...
...
@@ -86,8 +86,8 @@ static const DC_FUNCTIONS MFDRV_Funcs =
NULL
,
/* pModifyWorldTransform */
MFDRV_MoveTo
,
/* pMoveTo */
MFDRV_OffsetClipRgn
,
/* pOffsetClipRgn */
MFDRV_OffsetViewportOrg
,
/* pOffsetViewportOrg
*/
MFDRV_OffsetWindowOrg
,
/* pOffsetWindowOrg
*/
MFDRV_OffsetViewportOrg
Ex
,
/* pOffsetViewportOrgEx
*/
MFDRV_OffsetWindowOrg
Ex
,
/* pOffsetWindowOrgEx
*/
MFDRV_PaintRgn
,
/* pPaintRgn */
MFDRV_PatBlt
,
/* pPatBlt */
MFDRV_Pie
,
/* pPie */
...
...
@@ -106,8 +106,8 @@ static const DC_FUNCTIONS MFDRV_Funcs =
MFDRV_RestoreDC
,
/* pRestoreDC */
MFDRV_RoundRect
,
/* pRoundRect */
MFDRV_SaveDC
,
/* pSaveDC */
MFDRV_ScaleViewportExt
,
/* pScaleViewportExt
*/
MFDRV_ScaleWindowExt
,
/* pScaleWindowExt
*/
MFDRV_ScaleViewportExt
Ex
,
/* pScaleViewportExtEx
*/
MFDRV_ScaleWindowExt
Ex
,
/* pScaleWindowExtEx
*/
MFDRV_SelectBitmap
,
/* pSelectBitmap */
MFDRV_SelectBrush
,
/* pSelectBrush */
MFDRV_SelectClipPath
,
/* pSelectClipPath */
...
...
@@ -137,10 +137,10 @@ static const DC_FUNCTIONS MFDRV_Funcs =
MFDRV_SetTextCharacterExtra
,
/* pSetTextCharacterExtra */
MFDRV_SetTextColor
,
/* pSetTextColor */
MFDRV_SetTextJustification
,
/* pSetTextJustification */
MFDRV_SetViewportExt
,
/* pSetViewportExt
*/
MFDRV_SetViewportOrg
,
/* pSetViewportOrg
*/
MFDRV_SetWindowExt
,
/* pSetWindowExt
*/
MFDRV_SetWindowOrg
,
/* pSetWindowOrg
*/
MFDRV_SetViewportExt
Ex
,
/* pSetViewportExtEx
*/
MFDRV_SetViewportOrg
Ex
,
/* pSetViewportOrgEx
*/
MFDRV_SetWindowExt
Ex
,
/* pSetWindowExtEx
*/
MFDRV_SetWindowOrg
Ex
,
/* pSetWindowOrgEx
*/
NULL
,
/* pSetWorldTransform */
NULL
,
/* pStartDoc */
NULL
,
/* pStartPage */
...
...
dlls/gdi32/mfdrv/mapping.c
View file @
3a850fc8
...
...
@@ -31,95 +31,77 @@
*/
INT
CDECL
MFDRV_SetMapMode
(
PHYSDEV
dev
,
INT
mode
)
{
if
(
!
MFDRV_MetaParam1
(
dev
,
META_SETMAPMODE
,
mode
))
return
FALSE
;
return
GDI_NO_MORE_WORK
;
return
MFDRV_MetaParam1
(
dev
,
META_SETMAPMODE
,
mode
);
}
/***********************************************************************
* MFDRV_SetViewportExt
* MFDRV_SetViewportExt
Ex
*/
INT
CDECL
MFDRV_SetViewportExt
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
BOOL
CDECL
MFDRV_SetViewportExtEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
SIZE
*
size
)
{
if
(
!
MFDRV_MetaParam2
(
dev
,
META_SETVIEWPORTEXT
,
x
,
y
))
return
FALSE
;
return
GDI_NO_MORE_WORK
;
return
MFDRV_MetaParam2
(
dev
,
META_SETVIEWPORTEXT
,
x
,
y
);
}
/***********************************************************************
* MFDRV_SetViewportOrg
* MFDRV_SetViewportOrg
Ex
*/
INT
CDECL
MFDRV_SetViewportOrg
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
BOOL
CDECL
MFDRV_SetViewportOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
{
if
(
!
MFDRV_MetaParam2
(
dev
,
META_SETVIEWPORTORG
,
x
,
y
))
return
FALSE
;
return
GDI_NO_MORE_WORK
;
return
MFDRV_MetaParam2
(
dev
,
META_SETVIEWPORTORG
,
x
,
y
);
}
/***********************************************************************
* MFDRV_SetWindowExt
* MFDRV_SetWindowExt
Ex
*/
INT
CDECL
MFDRV_SetWindowExt
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
BOOL
CDECL
MFDRV_SetWindowExtEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
SIZE
*
size
)
{
if
(
!
MFDRV_MetaParam2
(
dev
,
META_SETWINDOWEXT
,
x
,
y
))
return
FALSE
;
return
GDI_NO_MORE_WORK
;
return
MFDRV_MetaParam2
(
dev
,
META_SETWINDOWEXT
,
x
,
y
);
}
/***********************************************************************
* MFDRV_SetWindowOrg
* MFDRV_SetWindowOrg
Ex
*/
INT
CDECL
MFDRV_SetWindowOrg
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
BOOL
CDECL
MFDRV_SetWindowOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
{
if
(
!
MFDRV_MetaParam2
(
dev
,
META_SETWINDOWORG
,
x
,
y
))
return
FALSE
;
return
GDI_NO_MORE_WORK
;
return
MFDRV_MetaParam2
(
dev
,
META_SETWINDOWORG
,
x
,
y
);
}
/***********************************************************************
* MFDRV_OffsetViewportOrg
* MFDRV_OffsetViewportOrg
Ex
*/
INT
CDECL
MFDRV_OffsetViewportOrg
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
BOOL
CDECL
MFDRV_OffsetViewportOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
{
if
(
!
MFDRV_MetaParam2
(
dev
,
META_OFFSETVIEWPORTORG
,
x
,
y
))
return
FALSE
;
return
GDI_NO_MORE_WORK
;
return
MFDRV_MetaParam2
(
dev
,
META_OFFSETVIEWPORTORG
,
x
,
y
);
}
/***********************************************************************
* MFDRV_OffsetWindowOrg
* MFDRV_OffsetWindowOrg
Ex
*/
INT
CDECL
MFDRV_OffsetWindowOrg
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
BOOL
CDECL
MFDRV_OffsetWindowOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
{
if
(
!
MFDRV_MetaParam2
(
dev
,
META_OFFSETWINDOWORG
,
x
,
y
))
return
FALSE
;
return
GDI_NO_MORE_WORK
;
return
MFDRV_MetaParam2
(
dev
,
META_OFFSETWINDOWORG
,
x
,
y
);
}
/***********************************************************************
* MFDRV_ScaleViewportExt
* MFDRV_ScaleViewportExt
Ex
*/
INT
CDECL
MFDRV_ScaleViewportExt
(
PHYSDEV
dev
,
INT
xNum
,
INT
xDenom
,
INT
yNum
,
INT
yDenom
)
BOOL
CDECL
MFDRV_ScaleViewportExtEx
(
PHYSDEV
dev
,
INT
xNum
,
INT
xDenom
,
INT
yNum
,
INT
yDenom
,
SIZE
*
size
)
{
if
(
!
MFDRV_MetaParam4
(
dev
,
META_SCALEVIEWPORTEXT
,
xNum
,
xDenom
,
yNum
,
yDenom
))
return
FALSE
;
return
GDI_NO_MORE_WORK
;
return
MFDRV_MetaParam4
(
dev
,
META_SCALEVIEWPORTEXT
,
xNum
,
xDenom
,
yNum
,
yDenom
);
}
/***********************************************************************
* MFDRV_ScaleWindowExt
* MFDRV_ScaleWindowExt
Ex
*/
INT
CDECL
MFDRV_ScaleWindowExt
(
PHYSDEV
dev
,
INT
xNum
,
INT
xDenom
,
INT
yNum
,
INT
yDenom
)
BOOL
CDECL
MFDRV_ScaleWindowExtEx
(
PHYSDEV
dev
,
INT
xNum
,
INT
xDenom
,
INT
yNum
,
INT
yDenom
,
SIZE
*
size
)
{
if
(
!
MFDRV_MetaParam4
(
dev
,
META_SCALEWINDOWEXT
,
xNum
,
xDenom
,
yNum
,
yDenom
))
return
FALSE
;
return
GDI_NO_MORE_WORK
;
return
MFDRV_MetaParam4
(
dev
,
META_SCALEWINDOWEXT
,
xNum
,
xDenom
,
yNum
,
yDenom
);
}
dlls/gdi32/mfdrv/metafiledrv.h
View file @
3a850fc8
...
...
@@ -92,8 +92,8 @@ extern BOOL CDECL MFDRV_InvertRgn( PHYSDEV dev, HRGN hrgn ) DECLSPEC_HIDDEN;
extern
BOOL
CDECL
MFDRV_LineTo
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
MFDRV_MoveTo
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
DECLSPEC_HIDDEN
;
extern
INT
CDECL
MFDRV_OffsetClipRgn
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
DECLSPEC_HIDDEN
;
extern
INT
CDECL
MFDRV_OffsetViewportOrg
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
DECLSPEC_HIDDEN
;
extern
INT
CDECL
MFDRV_OffsetWindowOrg
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
MFDRV_OffsetViewportOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
MFDRV_OffsetWindowOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
MFDRV_PaintRgn
(
PHYSDEV
dev
,
HRGN
hrgn
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
MFDRV_PatBlt
(
PHYSDEV
dev
,
INT
left
,
INT
top
,
INT
width
,
INT
height
,
DWORD
rop
)
DECLSPEC_HIDDEN
;
...
...
@@ -113,10 +113,10 @@ extern BOOL CDECL MFDRV_RoundRect( PHYSDEV dev, INT left, INT top,
INT
right
,
INT
bottom
,
INT
ell_width
,
INT
ell_height
)
DECLSPEC_HIDDEN
;
extern
INT
CDECL
MFDRV_SaveDC
(
PHYSDEV
dev
)
DECLSPEC_HIDDEN
;
extern
INT
CDECL
MFDRV_ScaleViewportExt
(
PHYSDEV
dev
,
INT
xNum
,
INT
xDenom
,
INT
yNum
,
INT
yDenom
)
DECLSPEC_HIDDEN
;
extern
INT
CDECL
MFDRV_ScaleWindowExt
(
PHYSDEV
dev
,
INT
xNum
,
INT
xDenom
,
INT
yNum
,
INT
yDenom
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
MFDRV_ScaleViewportExtEx
(
PHYSDEV
dev
,
INT
xNum
,
INT
xDenom
,
INT
yNum
,
INT
yDenom
,
SIZE
*
size
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
MFDRV_ScaleWindowExtEx
(
PHYSDEV
dev
,
INT
xNum
,
INT
xDenom
,
INT
yNum
,
INT
yDenom
,
SIZE
*
size
)
DECLSPEC_HIDDEN
;
extern
HBITMAP
CDECL
MFDRV_SelectBitmap
(
PHYSDEV
dev
,
HBITMAP
handle
)
DECLSPEC_HIDDEN
;
extern
HBRUSH
CDECL
MFDRV_SelectBrush
(
PHYSDEV
dev
,
HBRUSH
handle
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
MFDRV_SelectClipPath
(
PHYSDEV
dev
,
INT
iMode
)
DECLSPEC_HIDDEN
;
...
...
@@ -137,10 +137,10 @@ extern UINT CDECL MFDRV_SetTextAlign( PHYSDEV dev, UINT align ) DECLSPEC_HIDDEN
extern
INT
CDECL
MFDRV_SetTextCharacterExtra
(
PHYSDEV
dev
,
INT
extra
)
DECLSPEC_HIDDEN
;
extern
COLORREF
CDECL
MFDRV_SetTextColor
(
PHYSDEV
dev
,
COLORREF
color
)
DECLSPEC_HIDDEN
;
extern
INT
CDECL
MFDRV_SetTextJustification
(
PHYSDEV
dev
,
INT
extra
,
INT
breaks
)
DECLSPEC_HIDDEN
;
extern
INT
CDECL
MFDRV_SetViewportExt
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
DECLSPEC_HIDDEN
;
extern
INT
CDECL
MFDRV_SetViewportOrg
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
DECLSPEC_HIDDEN
;
extern
INT
CDECL
MFDRV_SetWindowExt
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
DECLSPEC_HIDDEN
;
extern
INT
CDECL
MFDRV_SetWindowOrg
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
MFDRV_SetViewportExtEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
SIZE
*
size
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
MFDRV_SetViewportOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
MFDRV_SetWindowExtEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
SIZE
*
size
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
MFDRV_SetWindowOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
MFDRV_StretchBlt
(
PHYSDEV
devDst
,
INT
xDst
,
INT
yDst
,
INT
widthDst
,
INT
heightDst
,
PHYSDEV
devSrc
,
INT
xSrc
,
INT
ySrc
,
INT
widthSrc
,
INT
heightSrc
,
DWORD
rop
)
DECLSPEC_HIDDEN
;
...
...
dlls/gdi32/tests/metafile.c
View file @
3a850fc8
...
...
@@ -846,10 +846,18 @@ static void test_mf_SaveDC(void)
/* Need to write something to the emf, otherwise Windows won't play it back */
LineTo
(
hdcMetafile
,
150
,
150
);
SetWindowOrgEx
(
hdcMetafile
,
0
,
0
,
NULL
);
SetViewportOrgEx
(
hdcMetafile
,
0
,
0
,
NULL
);
SetWindowExtEx
(
hdcMetafile
,
110
,
110
,
NULL
);
SetViewportExtEx
(
hdcMetafile
,
120
,
120
,
NULL
);
pt
.
x
=
pt
.
y
=
5555
;
SetWindowOrgEx
(
hdcMetafile
,
0
,
0
,
&
pt
);
ok
(
pt
.
x
==
5555
&&
pt
.
y
==
5555
,
"wrong origin %d,%d
\n
"
,
pt
.
x
,
pt
.
y
);
pt
.
x
=
pt
.
y
=
5555
;
SetViewportOrgEx
(
hdcMetafile
,
0
,
0
,
&
pt
);
ok
(
pt
.
x
==
5555
&&
pt
.
y
==
5555
,
"wrong origin %d,%d
\n
"
,
pt
.
x
,
pt
.
y
);
size
.
cx
=
size
.
cy
=
5555
;
SetWindowExtEx
(
hdcMetafile
,
110
,
110
,
&
size
);
ok
(
size
.
cx
==
5555
&&
size
.
cy
==
5555
,
"wrong size %d,%d
\n
"
,
size
.
cx
,
size
.
cy
);
size
.
cx
=
size
.
cy
=
5555
;
SetViewportExtEx
(
hdcMetafile
,
120
,
120
,
&
size
);
ok
(
size
.
cx
==
5555
&&
size
.
cy
==
5555
,
"wrong size %d,%d
\n
"
,
size
.
cx
,
size
.
cy
);
/* Force Win9x to update DC state */
SetPixelV
(
hdcMetafile
,
50
,
50
,
0
);
...
...
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