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
5c3b412c
Commit
5c3b412c
authored
Apr 12, 2023
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 12, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps: Handle EMR_FILLRGN record in spool files.
parent
a612ab6f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
11 deletions
+46
-11
printproc.c
dlls/wineps.drv/printproc.c
+46
-11
No files found.
dlls/wineps.drv/printproc.c
View file @
5c3b412c
...
@@ -41,6 +41,7 @@ struct pp_data
...
@@ -41,6 +41,7 @@ struct pp_data
WCHAR
*
doc_name
;
WCHAR
*
doc_name
;
WCHAR
*
out_file
;
WCHAR
*
out_file
;
PSDRV_PDEVICE
*
pdev
;
PSDRV_PDEVICE
*
pdev
;
DWORD
brush
;
struct
brush_pattern
*
patterns
;
struct
brush_pattern
*
patterns
;
};
};
...
@@ -692,6 +693,32 @@ static int poly_draw(PHYSDEV dev, const POINT *points, const BYTE *types, DWORD
...
@@ -692,6 +693,32 @@ static int poly_draw(PHYSDEV dev, const POINT *points, const BYTE *types, DWORD
return
TRUE
;
return
TRUE
;
}
}
static
HGDIOBJ
get_object_handle
(
struct
pp_data
*
data
,
HANDLETABLE
*
handletable
,
DWORD
i
,
struct
brush_pattern
**
pattern
)
{
if
(
i
&
0x80000000
)
{
*
pattern
=
NULL
;
return
GetStockObject
(
i
&
0x7fffffff
);
}
*
pattern
=
data
->
patterns
+
i
;
return
handletable
->
objectHandle
[
i
];
}
static
BOOL
fill_rgn
(
struct
pp_data
*
data
,
HANDLETABLE
*
htable
,
DWORD
brush
,
HRGN
rgn
)
{
struct
brush_pattern
*
pattern
;
HBRUSH
hbrush
;
int
ret
;
hbrush
=
get_object_handle
(
data
,
htable
,
brush
,
&
pattern
);
PSDRV_SelectBrush
(
&
data
->
pdev
->
dev
,
hbrush
,
pattern
);
ret
=
PSDRV_PaintRgn
(
&
data
->
pdev
->
dev
,
rgn
);
hbrush
=
get_object_handle
(
data
,
htable
,
data
->
brush
,
&
pattern
);
PSDRV_SelectBrush
(
&
data
->
pdev
->
dev
,
hbrush
,
pattern
);
return
ret
;
}
static
int
WINAPI
hmf_proc
(
HDC
hdc
,
HANDLETABLE
*
htable
,
static
int
WINAPI
hmf_proc
(
HDC
hdc
,
HANDLETABLE
*
htable
,
const
ENHMETARECORD
*
rec
,
int
n
,
LPARAM
arg
)
const
ENHMETARECORD
*
rec
,
int
n
,
LPARAM
arg
)
{
{
...
@@ -782,22 +809,19 @@ static int WINAPI hmf_proc(HDC hdc, HANDLETABLE *htable,
...
@@ -782,22 +809,19 @@ static int WINAPI hmf_proc(HDC hdc, HANDLETABLE *htable,
struct
brush_pattern
*
pattern
;
struct
brush_pattern
*
pattern
;
HGDIOBJ
obj
;
HGDIOBJ
obj
;
if
(
so
->
ihObject
&
0x80000000
)
obj
=
get_object_handle
(
data
,
htable
,
so
->
ihObject
,
&
pattern
);
{
obj
=
GetStockObject
(
so
->
ihObject
&
0x7fffffff
);
pattern
=
NULL
;
}
else
{
obj
=
(
htable
->
objectHandle
)[
so
->
ihObject
];
pattern
=
data
->
patterns
+
so
->
ihObject
;
}
SelectObject
(
data
->
pdev
->
dev
.
hdc
,
obj
);
SelectObject
(
data
->
pdev
->
dev
.
hdc
,
obj
);
switch
(
GetObjectType
(
obj
))
switch
(
GetObjectType
(
obj
))
{
{
case
OBJ_PEN
:
return
PSDRV_SelectPen
(
&
data
->
pdev
->
dev
,
obj
,
NULL
)
!=
NULL
;
case
OBJ_PEN
:
return
PSDRV_SelectPen
(
&
data
->
pdev
->
dev
,
obj
,
NULL
)
!=
NULL
;
case
OBJ_BRUSH
:
return
PSDRV_SelectBrush
(
&
data
->
pdev
->
dev
,
obj
,
pattern
)
!=
NULL
;
case
OBJ_BRUSH
:
if
(
PSDRV_SelectBrush
(
&
data
->
pdev
->
dev
,
obj
,
pattern
))
{
data
->
brush
=
so
->
ihObject
;
return
1
;
}
return
0
;
default:
default:
FIXME
(
"unhandled object type %ld
\n
"
,
GetObjectType
(
obj
));
FIXME
(
"unhandled object type %ld
\n
"
,
GetObjectType
(
obj
));
return
1
;
return
1
;
...
@@ -926,6 +950,17 @@ static int WINAPI hmf_proc(HDC hdc, HANDLETABLE *htable,
...
@@ -926,6 +950,17 @@ static int WINAPI hmf_proc(HDC hdc, HANDLETABLE *htable,
return
poly_draw
(
&
data
->
pdev
->
dev
,
pts
,
(
BYTE
*
)(
p
->
aptl
+
p
->
cptl
),
p
->
cptl
)
&&
return
poly_draw
(
&
data
->
pdev
->
dev
,
pts
,
(
BYTE
*
)(
p
->
aptl
+
p
->
cptl
),
p
->
cptl
)
&&
MoveToEx
(
data
->
pdev
->
dev
.
hdc
,
pts
[
p
->
cptl
-
1
].
x
,
pts
[
p
->
cptl
-
1
].
y
,
NULL
);
MoveToEx
(
data
->
pdev
->
dev
.
hdc
,
pts
[
p
->
cptl
-
1
].
x
,
pts
[
p
->
cptl
-
1
].
y
,
NULL
);
}
}
case
EMR_FILLRGN
:
{
const
EMRFILLRGN
*
p
=
(
const
EMRFILLRGN
*
)
rec
;
HRGN
rgn
;
int
ret
;
rgn
=
ExtCreateRegion
(
NULL
,
p
->
cbRgnData
,
(
const
RGNDATA
*
)
p
->
RgnData
);
ret
=
fill_rgn
(
data
,
htable
,
p
->
ihBrush
,
rgn
);
DeleteObject
(
rgn
);
return
ret
;
}
case
EMR_PAINTRGN
:
case
EMR_PAINTRGN
:
{
{
const
EMRPAINTRGN
*
p
=
(
const
EMRPAINTRGN
*
)
rec
;
const
EMRPAINTRGN
*
p
=
(
const
EMRPAINTRGN
*
)
rec
;
...
...
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