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
e0cdf885
Commit
e0cdf885
authored
Mar 23, 2023
by
Piotr Caban
Committed by
Alexandre Julliard
Mar 23, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps: Handle brush selection in spool files.
parent
8d2f5f22
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
1 deletion
+35
-1
printproc.c
dlls/wineps.drv/printproc.c
+35
-1
No files found.
dlls/wineps.drv/printproc.c
View file @
e0cdf885
...
...
@@ -40,6 +40,7 @@ struct pp_data
WCHAR
*
doc_name
;
WCHAR
*
out_file
;
PSDRV_PDEVICE
*
pdev
;
struct
brush_pattern
*
patterns
;
};
typedef
enum
...
...
@@ -138,9 +139,40 @@ static int WINAPI hmf_proc(HDC hdc, HANDLETABLE *htable,
switch
(
rec
->
iType
)
{
case
EMR_HEADER
:
return
PSDRV_StartPage
(
&
data
->
pdev
->
dev
);
{
const
ENHMETAHEADER
*
header
=
(
const
ENHMETAHEADER
*
)
rec
;
data
->
patterns
=
calloc
(
sizeof
(
*
data
->
patterns
),
header
->
nHandles
);
return
data
->
patterns
&&
PSDRV_StartPage
(
&
data
->
pdev
->
dev
);
}
case
EMR_EOF
:
return
PSDRV_EndPage
(
&
data
->
pdev
->
dev
);
case
EMR_SELECTOBJECT
:
{
const
EMRSELECTOBJECT
*
so
=
(
const
EMRSELECTOBJECT
*
)
rec
;
struct
brush_pattern
*
pattern
;
HGDIOBJ
obj
;
if
(
so
->
ihObject
&
0x80000000
)
{
obj
=
GetStockObject
(
so
->
ihObject
&
0x7fffffff
);
pattern
=
NULL
;
}
else
{
obj
=
(
htable
->
objectHandle
)[
so
->
ihObject
];
pattern
=
data
->
patterns
+
so
->
ihObject
;
}
SelectObject
(
data
->
pdev
->
dev
.
hdc
,
obj
);
switch
(
GetObjectType
(
obj
))
{
case
OBJ_BRUSH
:
return
PSDRV_SelectBrush
(
&
data
->
pdev
->
dev
,
obj
,
pattern
)
!=
NULL
;
default:
FIXME
(
"unhandled object type %ld
\n
"
,
GetObjectType
(
obj
));
return
1
;
}
}
default:
FIXME
(
"unsupported record: %ld
\n
"
,
rec
->
iType
);
}
...
...
@@ -187,6 +219,8 @@ static BOOL print_metafile(struct pp_data *data, HANDLE hdata)
ret
=
EnumEnhMetaFile
(
NULL
,
hmf
,
hmf_proc
,
(
void
*
)
data
,
NULL
);
DeleteEnhMetaFile
(
hmf
);
free
(
data
->
patterns
);
data
->
patterns
=
NULL
;
return
ret
;
}
...
...
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