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
8c3766c5
Commit
8c3766c5
authored
Mar 11, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Move all the enhanced metafile DC setting functions to enhmfdrv/dc.c
parent
7d1dd28d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
204 additions
and
239 deletions
+204
-239
Makefile.in
dlls/gdi32/Makefile.in
+0
-1
dc.c
dlls/gdi32/enhmfdrv/dc.c
+204
-0
graphics.c
dlls/gdi32/enhmfdrv/graphics.c
+0
-50
mapping.c
dlls/gdi32/enhmfdrv/mapping.c
+0
-188
No files found.
dlls/gdi32/Makefile.in
View file @
8c3766c5
...
...
@@ -20,7 +20,6 @@ C_SRCS = \
enhmfdrv/dc.c
\
enhmfdrv/graphics.c
\
enhmfdrv/init.c
\
enhmfdrv/mapping.c
\
enhmfdrv/objects.c
\
font.c
\
freetype.c
\
...
...
dlls/gdi32/enhmfdrv/dc.c
View file @
8c3766c5
...
...
@@ -90,6 +90,33 @@ INT CDECL EMFDRV_SetBkMode( PHYSDEV dev, INT mode )
return
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
)
?
mode
:
0
;
}
COLORREF
CDECL
EMFDRV_SetBkColor
(
PHYSDEV
dev
,
COLORREF
color
)
{
EMRSETBKCOLOR
emr
;
EMFDRV_PDEVICE
*
physDev
=
(
EMFDRV_PDEVICE
*
)
dev
;
if
(
physDev
->
restoring
)
return
color
;
/* don't output records during RestoreDC */
emr
.
emr
.
iType
=
EMR_SETBKCOLOR
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
emr
.
crColor
=
color
;
return
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
)
?
color
:
CLR_INVALID
;
}
COLORREF
CDECL
EMFDRV_SetTextColor
(
PHYSDEV
dev
,
COLORREF
color
)
{
EMRSETTEXTCOLOR
emr
;
EMFDRV_PDEVICE
*
physDev
=
(
EMFDRV_PDEVICE
*
)
dev
;
if
(
physDev
->
restoring
)
return
color
;
/* don't output records during RestoreDC */
emr
.
emr
.
iType
=
EMR_SETTEXTCOLOR
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
emr
.
crColor
=
color
;
return
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
)
?
color
:
CLR_INVALID
;
}
INT
CDECL
EMFDRV_SetROP2
(
PHYSDEV
dev
,
INT
rop
)
{
EMRSETROP2
emr
;
...
...
@@ -117,6 +144,16 @@ INT CDECL EMFDRV_SetStretchBltMode( PHYSDEV dev, INT mode )
return
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
)
?
mode
:
0
;
}
INT
CDECL
EMFDRV_SetArcDirection
(
PHYSDEV
dev
,
INT
arcDirection
)
{
EMRSETARCDIRECTION
emr
;
emr
.
emr
.
iType
=
EMR_SETARCDIRECTION
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
emr
.
iArcDirection
=
arcDirection
;
return
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
)
?
arcDirection
:
0
;
}
INT
CDECL
EMFDRV_ExcludeClipRect
(
PHYSDEV
dev
,
INT
left
,
INT
top
,
INT
right
,
INT
bottom
)
{
EMREXCLUDECLIPRECT
emr
;
...
...
@@ -178,6 +215,173 @@ INT CDECL EMFDRV_ExtSelectClipRgn( PHYSDEV dev, HRGN hrgn, INT mode )
return
ret
?
SIMPLEREGION
:
ERROR
;
}
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
;
if
(
!
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
))
return
0
;
return
next
->
funcs
->
pSetMapMode
(
next
,
mode
);
}
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
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
emr
.
szlExtent
.
cx
=
cx
;
emr
.
szlExtent
.
cy
=
cy
;
if
(
!
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
))
return
FALSE
;
return
next
->
funcs
->
pSetViewportExtEx
(
next
,
cx
,
cy
,
size
);
}
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
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
emr
.
szlExtent
.
cx
=
cx
;
emr
.
szlExtent
.
cy
=
cy
;
if
(
!
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
))
return
0
;
return
next
->
funcs
->
pSetWindowExtEx
(
next
,
cx
,
cy
,
size
);
}
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
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
emr
.
ptlOrigin
.
x
=
x
;
emr
.
ptlOrigin
.
y
=
y
;
if
(
!
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
))
return
0
;
return
next
->
funcs
->
pSetViewportOrgEx
(
next
,
x
,
y
,
pt
);
}
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
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
emr
.
ptlOrigin
.
x
=
x
;
emr
.
ptlOrigin
.
y
=
y
;
if
(
!
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
))
return
0
;
return
next
->
funcs
->
pSetWindowOrgEx
(
next
,
x
,
y
,
pt
);
}
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
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
emr
.
xNum
=
xNum
;
emr
.
xDenom
=
xDenom
;
emr
.
yNum
=
yNum
;
emr
.
yDenom
=
yDenom
;
if
(
!
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
))
return
0
;
return
next
->
funcs
->
pScaleViewportExtEx
(
next
,
xNum
,
xDenom
,
yNum
,
yDenom
,
size
);
}
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
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
emr
.
xNum
=
xNum
;
emr
.
xDenom
=
xDenom
;
emr
.
yNum
=
yNum
;
emr
.
yDenom
=
yDenom
;
if
(
!
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
))
return
0
;
return
next
->
funcs
->
pScaleWindowExtEx
(
next
,
xNum
,
xDenom
,
yNum
,
yDenom
,
size
);
}
DWORD
CDECL
EMFDRV_SetLayout
(
PHYSDEV
dev
,
DWORD
layout
)
{
EMRSETLAYOUT
emr
;
emr
.
emr
.
iType
=
EMR_SETLAYOUT
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
emr
.
iMode
=
layout
;
return
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
)
?
layout
:
GDI_ERROR
;
}
BOOL
CDECL
EMFDRV_SetWorldTransform
(
PHYSDEV
dev
,
const
XFORM
*
xform
)
{
EMRSETWORLDTRANSFORM
emr
;
emr
.
emr
.
iType
=
EMR_SETWORLDTRANSFORM
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
emr
.
xform
=
*
xform
;
return
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
);
}
BOOL
CDECL
EMFDRV_ModifyWorldTransform
(
PHYSDEV
dev
,
const
XFORM
*
xform
,
DWORD
mode
)
{
EMRMODIFYWORLDTRANSFORM
emr
;
emr
.
emr
.
iType
=
EMR_MODIFYWORLDTRANSFORM
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
emr
.
xform
=
*
xform
;
emr
.
iMode
=
mode
;
return
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
);
}
BOOL
CDECL
EMFDRV_OffsetViewportOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
{
PHYSDEV
next
=
GET_NEXT_PHYSDEV
(
dev
,
pOffsetViewportOrgEx
);
EMRSETVIEWPORTORGEX
emr
;
EMFDRV_PDEVICE
*
physDev
=
(
EMFDRV_PDEVICE
*
)
dev
;
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
;
if
(
!
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
))
return
0
;
return
next
->
funcs
->
pOffsetViewportOrgEx
(
next
,
x
,
y
,
pt
);
}
BOOL
CDECL
EMFDRV_OffsetWindowOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
{
PHYSDEV
next
=
GET_NEXT_PHYSDEV
(
dev
,
pOffsetWindowOrgEx
);
EMRSETWINDOWORGEX
emr
;
EMFDRV_PDEVICE
*
physDev
=
(
EMFDRV_PDEVICE
*
)
dev
;
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
;
if
(
!
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
))
return
0
;
return
next
->
funcs
->
pOffsetWindowOrgEx
(
next
,
x
,
y
,
pt
);
}
DWORD
CDECL
EMFDRV_SetMapperFlags
(
PHYSDEV
dev
,
DWORD
flags
)
{
EMRSETMAPPERFLAGS
emr
;
...
...
dlls/gdi32/enhmfdrv/graphics.c
View file @
8c3766c5
...
...
@@ -678,43 +678,6 @@ EMFDRV_InvertRgn( PHYSDEV dev, HRGN hrgn )
}
/**********************************************************************
* EMFDRV_SetBkColor
*/
COLORREF
CDECL
EMFDRV_SetBkColor
(
PHYSDEV
dev
,
COLORREF
color
)
{
EMRSETBKCOLOR
emr
;
EMFDRV_PDEVICE
*
physDev
=
(
EMFDRV_PDEVICE
*
)
dev
;
if
(
physDev
->
restoring
)
return
color
;
/* don't output records during RestoreDC */
emr
.
emr
.
iType
=
EMR_SETBKCOLOR
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
emr
.
crColor
=
color
;
return
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
)
?
color
:
CLR_INVALID
;
}
/**********************************************************************
* EMFDRV_SetTextColor
*/
COLORREF
CDECL
EMFDRV_SetTextColor
(
PHYSDEV
dev
,
COLORREF
color
)
{
EMRSETTEXTCOLOR
emr
;
EMFDRV_PDEVICE
*
physDev
=
(
EMFDRV_PDEVICE
*
)
dev
;
if
(
physDev
->
restoring
)
return
color
;
/* don't output records during RestoreDC */
emr
.
emr
.
iType
=
EMR_SETTEXTCOLOR
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
emr
.
crColor
=
color
;
return
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
)
?
color
:
CLR_INVALID
;
}
/**********************************************************************
* EMFDRV_ExtTextOut
*/
BOOL
CDECL
EMFDRV_ExtTextOut
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
UINT
flags
,
...
...
@@ -855,16 +818,3 @@ no_bounds:
HeapFree
(
GetProcessHeap
(),
0
,
pemr
);
return
ret
;
}
/**********************************************************************
* EMFDRV_SetArcDirection
*/
INT
CDECL
EMFDRV_SetArcDirection
(
PHYSDEV
dev
,
INT
arcDirection
)
{
EMRSETARCDIRECTION
emr
;
emr
.
emr
.
iType
=
EMR_SETARCDIRECTION
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
emr
.
iArcDirection
=
arcDirection
;
return
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
)
?
arcDirection
:
0
;
}
dlls/gdi32/enhmfdrv/mapping.c
deleted
100644 → 0
View file @
7d1dd28d
/*
* Enhanced MetaFile driver mapping functions
*
* Copyright 1999 Huw D M Davies
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "enhmfdrv/enhmetafiledrv.h"
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
;
if
(
!
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
))
return
0
;
return
next
->
funcs
->
pSetMapMode
(
next
,
mode
);
}
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
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
emr
.
szlExtent
.
cx
=
cx
;
emr
.
szlExtent
.
cy
=
cy
;
if
(
!
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
))
return
FALSE
;
return
next
->
funcs
->
pSetViewportExtEx
(
next
,
cx
,
cy
,
size
);
}
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
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
emr
.
szlExtent
.
cx
=
cx
;
emr
.
szlExtent
.
cy
=
cy
;
if
(
!
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
))
return
0
;
return
next
->
funcs
->
pSetWindowExtEx
(
next
,
cx
,
cy
,
size
);
}
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
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
emr
.
ptlOrigin
.
x
=
x
;
emr
.
ptlOrigin
.
y
=
y
;
if
(
!
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
))
return
0
;
return
next
->
funcs
->
pSetViewportOrgEx
(
next
,
x
,
y
,
pt
);
}
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
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
emr
.
ptlOrigin
.
x
=
x
;
emr
.
ptlOrigin
.
y
=
y
;
if
(
!
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
))
return
0
;
return
next
->
funcs
->
pSetWindowOrgEx
(
next
,
x
,
y
,
pt
);
}
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
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
emr
.
xNum
=
xNum
;
emr
.
xDenom
=
xDenom
;
emr
.
yNum
=
yNum
;
emr
.
yDenom
=
yDenom
;
if
(
!
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
))
return
0
;
return
next
->
funcs
->
pScaleViewportExtEx
(
next
,
xNum
,
xDenom
,
yNum
,
yDenom
,
size
);
}
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
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
emr
.
xNum
=
xNum
;
emr
.
xDenom
=
xDenom
;
emr
.
yNum
=
yNum
;
emr
.
yDenom
=
yDenom
;
if
(
!
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
))
return
0
;
return
next
->
funcs
->
pScaleWindowExtEx
(
next
,
xNum
,
xDenom
,
yNum
,
yDenom
,
size
);
}
DWORD
CDECL
EMFDRV_SetLayout
(
PHYSDEV
dev
,
DWORD
layout
)
{
EMRSETLAYOUT
emr
;
emr
.
emr
.
iType
=
EMR_SETLAYOUT
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
emr
.
iMode
=
layout
;
return
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
)
?
layout
:
GDI_ERROR
;
}
BOOL
CDECL
EMFDRV_SetWorldTransform
(
PHYSDEV
dev
,
const
XFORM
*
xform
)
{
EMRSETWORLDTRANSFORM
emr
;
emr
.
emr
.
iType
=
EMR_SETWORLDTRANSFORM
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
emr
.
xform
=
*
xform
;
return
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
);
}
BOOL
CDECL
EMFDRV_ModifyWorldTransform
(
PHYSDEV
dev
,
const
XFORM
*
xform
,
DWORD
mode
)
{
EMRMODIFYWORLDTRANSFORM
emr
;
emr
.
emr
.
iType
=
EMR_MODIFYWORLDTRANSFORM
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
emr
.
xform
=
*
xform
;
emr
.
iMode
=
mode
;
return
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
);
}
BOOL
CDECL
EMFDRV_OffsetViewportOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
{
PHYSDEV
next
=
GET_NEXT_PHYSDEV
(
dev
,
pOffsetViewportOrgEx
);
EMRSETVIEWPORTORGEX
emr
;
EMFDRV_PDEVICE
*
physDev
=
(
EMFDRV_PDEVICE
*
)
dev
;
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
;
if
(
!
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
))
return
0
;
return
next
->
funcs
->
pOffsetViewportOrgEx
(
next
,
x
,
y
,
pt
);
}
BOOL
CDECL
EMFDRV_OffsetWindowOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
{
PHYSDEV
next
=
GET_NEXT_PHYSDEV
(
dev
,
pOffsetWindowOrgEx
);
EMRSETWINDOWORGEX
emr
;
EMFDRV_PDEVICE
*
physDev
=
(
EMFDRV_PDEVICE
*
)
dev
;
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
;
if
(
!
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
))
return
0
;
return
next
->
funcs
->
pOffsetWindowOrgEx
(
next
,
x
,
y
,
pt
);
}
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