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
550b97e7
Commit
550b97e7
authored
Jun 24, 2002
by
Ulrich Czekalla
Committed by
Alexandre Julliard
Jun 24, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added temp fix for world transform bug in SetWindowOrgEx handler.
Added handlers for EMR_SETTEXTJUSTIFICATION and EMR_SETLAYOUT.
parent
1d707151
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
97 additions
and
23 deletions
+97
-23
wingdi.h
include/wingdi.h
+25
-1
enhmetafile.c
objects/enhmetafile.c
+72
-22
No files found.
include/wingdi.h
View file @
550b97e7
...
...
@@ -2495,6 +2495,12 @@ typedef struct {
BYTE
Data
[
1
];
}
EMRGLSBOUNDEDRECORD
,
*
PEMRGLSBOUNDEDRECORD
;
typedef
struct
{
EMR
emr
;
INT
nBreakExtra
;
INT
nBreakCount
;
}
EMRSETTEXTJUSTIFICATION
,
*
PEMRSETTEXTJUSTIFICATION
;
typedef
INT
(
CALLBACK
*
ENHMFENUMPROC
)(
HDC
,
LPHANDLETABLE
,
LPENHMETARECORD
,
INT
,
LPVOID
);
...
...
@@ -2601,9 +2607,27 @@ typedef INT (CALLBACK *ENHMFENUMPROC)(HDC, LPHANDLETABLE,
#define EMR_GLSRECORD 102
#define EMR_GLSBOUNDEDRECORD 103
#define EMR_PIXELFORMAT 104
#define EMR_DRAWESCAPE 105
#define EMR_EXTESCAPE 106
#define EMR_STARTDOC 107
#define EMR_SMALLTEXTOUT 108
#define EMR_FORCEUFIMAPPING 109
#define EMR_NAMEDESCAPE 110
#define EMR_COLORCORRECTPALETTE 111
#define EMR_SETICMPROFILEA 112
#define EMR_SETICMPROFILEW 113
#define EMR_ALPHABLEND 114
#define EMR_SETLAYOUT 115
#define EMR_TRANSPARENTBLT 116
#define EMR_RESERVED_117 117
#define EMR_GRADIENTFILL 118
#define EMR_SETLINKEDUFI 119
#define EMR_SETTEXTJUSTIFICATION 120
#define EMR_COLORMATCHTOTARGETW 121
#define EMR_CREATECOLORSPACEW 122
#define EMR_MIN 1
#define EMR_MAX 1
04
#define EMR_MAX 1
22
#define ENHMETA_SIGNATURE 1179469088
#define ENHMETA_STOCK_OBJECT 0x80000000
...
...
objects/enhmetafile.c
View file @
550b97e7
...
...
@@ -416,16 +416,18 @@ BOOL WINAPI PlayEnhMetaFileRecord(
}
case
EMR_SETWINDOWORGEX
:
{
/*
* FIXME: The call to SetWindowOrgEx prevents EMFs from being scrolled
* by an application. This is very BAD!!!
*/
#if 0
PEMRSETWINDOWORGEX pSetWindowOrgEx = (PEMRSETWINDOWORGEX) mr;
SetWindowOrgEx(hdc, pSetWindowOrgEx->ptlOrigin.x,
pSetWindowOrgEx->ptlOrigin.y, NULL);
#endif
break
;
XFORM
xform
;
PEMRSETWINDOWORGEX
pSetWindowOrgEx
=
(
PEMRSETWINDOWORGEX
)
mr
;
xform
.
eM11
=
1
;
xform
.
eM12
=
0
;
xform
.
eM21
=
0
;
xform
.
eM22
=
1
;
xform
.
eDx
=
-
pSetWindowOrgEx
->
ptlOrigin
.
x
;
xform
.
eDy
=
-
pSetWindowOrgEx
->
ptlOrigin
.
y
;
ModifyWorldTransform
(
hdc
,
&
xform
,
MWT_LEFTMULTIPLY
);
break
;
}
case
EMR_SETWINDOWEXTEX
:
{
...
...
@@ -1181,7 +1183,7 @@ BOOL WINAPI PlayEnhMetaFileRecord(
PEMRBITBLT
pBitBlt
=
(
PEMRBITBLT
)
mr
;
HDC
hdcSrc
=
CreateCompatibleDC
(
hdc
);
HBRUSH
hBrush
,
hBrushOld
;
HBITMAP
hBmp
,
hBmpOld
;
HBITMAP
hBmp
=
0
,
hBmpOld
=
0
;
BITMAPINFO
*
pbi
=
(
BITMAPINFO
*
)((
BYTE
*
)
mr
+
pBitBlt
->
offBmiSrc
);
SetWorldTransform
(
hdcSrc
,
&
pBitBlt
->
xformSrc
);
...
...
@@ -1194,9 +1196,13 @@ BOOL WINAPI PlayEnhMetaFileRecord(
SelectObject
(
hdcSrc
,
hBrushOld
);
DeleteObject
(
hBrush
);
hBmp
=
CreateDIBitmap
(
0
,
(
BITMAPINFOHEADER
*
)
pbi
,
CBM_INIT
,
(
BYTE
*
)
mr
+
pBitBlt
->
offBitsSrc
,
pbi
,
pBitBlt
->
iUsageSrc
);
hBmpOld
=
SelectObject
(
hdcSrc
,
hBmp
);
if
(
pBitBlt
->
offBmiSrc
>
0
)
{
hBmp
=
CreateDIBitmap
(
0
,
(
BITMAPINFOHEADER
*
)
pbi
,
CBM_INIT
,
(
BYTE
*
)
mr
+
pBitBlt
->
offBitsSrc
,
pbi
,
pBitBlt
->
iUsageSrc
);
hBmpOld
=
SelectObject
(
hdcSrc
,
hBmp
);
}
BitBlt
(
hdc
,
pBitBlt
->
xDest
,
pBitBlt
->
yDest
,
...
...
@@ -1206,8 +1212,12 @@ BOOL WINAPI PlayEnhMetaFileRecord(
pBitBlt
->
xSrc
,
pBitBlt
->
ySrc
,
pBitBlt
->
dwRop
);
SelectObject
(
hdcSrc
,
hBmpOld
);
DeleteObject
(
hBmp
);
if
(
pBitBlt
->
offBmiSrc
>
0
)
{
SelectObject
(
hdcSrc
,
hBmpOld
);
DeleteObject
(
hBmp
);
}
DeleteDC
(
hdcSrc
);
break
;
}
...
...
@@ -1217,7 +1227,7 @@ BOOL WINAPI PlayEnhMetaFileRecord(
PEMRSTRETCHBLT
pStretchBlt
=
(
PEMRSTRETCHBLT
)
mr
;
HDC
hdcSrc
=
CreateCompatibleDC
(
hdc
);
HBRUSH
hBrush
,
hBrushOld
;
HBITMAP
hBmp
,
hBmpOld
;
HBITMAP
hBmp
=
0
,
hBmpOld
=
0
;
BITMAPINFO
*
pbi
=
(
BITMAPINFO
*
)((
BYTE
*
)
mr
+
pStretchBlt
->
offBmiSrc
);
SetWorldTransform
(
hdcSrc
,
&
pStretchBlt
->
xformSrc
);
...
...
@@ -1230,9 +1240,13 @@ BOOL WINAPI PlayEnhMetaFileRecord(
SelectObject
(
hdcSrc
,
hBrushOld
);
DeleteObject
(
hBrush
);
hBmp
=
CreateDIBitmap
(
0
,
(
BITMAPINFOHEADER
*
)
pbi
,
CBM_INIT
,
(
BYTE
*
)
mr
+
pStretchBlt
->
offBitsSrc
,
pbi
,
pStretchBlt
->
iUsageSrc
);
hBmpOld
=
SelectObject
(
hdcSrc
,
hBmp
);
if
(
pStretchBlt
->
offBmiSrc
)
{
hBmp
=
CreateDIBitmap
(
0
,
(
BITMAPINFOHEADER
*
)
pbi
,
CBM_INIT
,
(
BYTE
*
)
mr
+
pStretchBlt
->
offBitsSrc
,
pbi
,
pStretchBlt
->
iUsageSrc
);
hBmpOld
=
SelectObject
(
hdcSrc
,
hBmp
);
}
StretchBlt
(
hdc
,
pStretchBlt
->
xDest
,
pStretchBlt
->
yDest
,
...
...
@@ -1244,8 +1258,14 @@ BOOL WINAPI PlayEnhMetaFileRecord(
pStretchBlt
->
cxSrc
,
pStretchBlt
->
cySrc
,
pStretchBlt
->
dwRop
);
SelectObject
(
hdcSrc
,
hBmpOld
);
DeleteObject
(
hBmp
);
if
(
pStretchBlt
->
offBmiSrc
)
{
SelectObject
(
hdcSrc
,
hBmpOld
);
DeleteObject
(
hBmp
);
}
DeleteDC
(
hdcSrc
);
break
;
}
...
...
@@ -1486,9 +1506,39 @@ BOOL WINAPI PlayEnhMetaFileRecord(
break
;
}
case
EMR_SETTEXTJUSTIFICATION
:
{
PEMRSETTEXTJUSTIFICATION
pSetTextJust
=
(
PEMRSETTEXTJUSTIFICATION
)
mr
;
SetTextJustification
(
hdc
,
pSetTextJust
->
nBreakExtra
,
pSetTextJust
->
nBreakCount
);
break
;
}
case
EMR_SETLAYOUT
:
{
PEMRSETLAYOUT
pSetLayout
=
(
PEMRSETLAYOUT
)
mr
;
SetLayout
(
hdc
,
pSetLayout
->
iMode
);
break
;
}
case
EMR_POLYDRAW16
:
case
EMR_GLSRECORD
:
case
EMR_GLSBOUNDEDRECORD
:
case
EMR_DRAWESCAPE
:
case
EMR_EXTESCAPE
:
case
EMR_STARTDOC
:
case
EMR_SMALLTEXTOUT
:
case
EMR_FORCEUFIMAPPING
:
case
EMR_NAMEDESCAPE
:
case
EMR_COLORCORRECTPALETTE
:
case
EMR_SETICMPROFILEA
:
case
EMR_SETICMPROFILEW
:
case
EMR_ALPHABLEND
:
case
EMR_TRANSPARENTBLT
:
case
EMR_GRADIENTFILL
:
case
EMR_SETLINKEDUFI
:
case
EMR_COLORMATCHTOTARGETW
:
case
EMR_CREATECOLORSPACEW
:
default:
/* From docs: If PlayEnhMetaFileRecord doesn't recognize a
record then ignore and return TRUE. */
...
...
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