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
2b8de930
Commit
2b8de930
authored
Apr 27, 2023
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 28, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Implicitly call StartPage while drawing on printer DC.
parent
70d84f70
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
14 deletions
+3
-14
dc.c
dlls/gdi32/dc.c
+0
-0
emfdc.c
dlls/gdi32/emfdc.c
+0
-14
gdi_private.h
dlls/gdi32/gdi_private.h
+2
-0
text.c
dlls/gdi32/text.c
+1
-0
No files found.
dlls/gdi32/dc.c
View file @
2b8de930
This diff is collapsed.
Click to expand it.
dlls/gdi32/emfdc.c
View file @
2b8de930
...
...
@@ -44,12 +44,6 @@ struct emf
DWORD
palette_size
;
DWORD
palette_used
;
PALETTEENTRY
*
palette
;
enum
{
DOCUMENT_NOT_STARTED
,
NEEDS_START_PAGE
,
NEEDS_END_PAGE
}
document_state
;
};
typedef
enum
...
...
@@ -2505,7 +2499,6 @@ static void emf_reset( DC_ATTR *dc_attr, const RECT *rect )
emf
->
dc_pen
=
0
;
emf
->
path
=
FALSE
;
emf
->
palette_used
=
0
;
emf
->
document_state
=
DOCUMENT_NOT_STARTED
;
dc_attr
->
emf_bounds
.
left
=
dc_attr
->
emf_bounds
.
top
=
0
;
dc_attr
->
emf_bounds
.
right
=
dc_attr
->
emf_bounds
.
bottom
=
-
1
;
...
...
@@ -2772,13 +2765,11 @@ BOOL spool_start_doc( DC_ATTR *dc_attr, HANDLE hspool, const DOCINFOW *doc_info
emf
=
emf_create
(
dc_attr_handle
(
dc_attr
),
NULL
,
NULL
);
if
(
!
emf
)
return
FALSE
;
emf
->
document_state
=
NEEDS_START_PAGE
;
return
TRUE
;
}
int
spool_start_page
(
DC_ATTR
*
dc_attr
,
HANDLE
hspool
)
{
struct
emf
*
emf
=
get_dc_emf
(
dc_attr
);
HDC
hdc
=
dc_attr_handle
(
dc_attr
);
POINT
pos
=
{
0
};
XFORM
xform
;
...
...
@@ -2813,7 +2804,6 @@ int spool_start_page( DC_ATTR *dc_attr, HANDLE hspool )
if
(
xform
.
eM11
!=
1
||
xform
.
eM22
!=
1
||
xform
.
eM12
||
xform
.
eM21
||
xform
.
eDx
||
xform
.
eDy
)
EMFDC_SetWorldTransform
(
dc_attr
,
&
xform
);
emf
->
document_state
=
NEEDS_END_PAGE
;
return
StartPagePrinter
(
hspool
);
}
...
...
@@ -2847,7 +2837,6 @@ int spool_end_page( DC_ATTR *dc_attr, HANDLE hspool )
if
(
!
WritePrinter
(
hspool
,
&
metafile_ext
,
sizeof
(
metafile_ext
),
&
written
))
return
0
;
emf_reset
(
dc_attr
,
NULL
);
emf
->
document_state
=
NEEDS_START_PAGE
;
return
EndPagePrinter
(
hspool
);
}
...
...
@@ -2861,11 +2850,8 @@ int spool_abort_doc( DC_ATTR *dc_attr, HANDLE hspool )
int
spool_end_doc
(
DC_ATTR
*
dc_attr
,
HANDLE
hspool
)
{
struct
emf
*
emf
=
get_dc_emf
(
dc_attr
);
TRACE
(
"(%p %p)
\n
"
,
dc_attr
,
hspool
);
if
(
emf
->
document_state
==
NEEDS_END_PAGE
)
spool_end_page
(
dc_attr
,
hspool
);
EMFDC_DeleteDC
(
dc_attr
);
return
EndDocPrinter
(
hspool
);
}
dlls/gdi32/gdi_private.h
View file @
2b8de930
...
...
@@ -287,6 +287,8 @@ extern int spool_end_page( DC_ATTR *dc_attr, HANDLE hspool ) DECLSPEC_HIDDEN;
extern
int
spool_end_doc
(
DC_ATTR
*
dc_attr
,
HANDLE
hspool
)
DECLSPEC_HIDDEN
;
extern
int
spool_abort_doc
(
DC_ATTR
*
dc_attr
,
HANDLE
hspool
)
DECLSPEC_HIDDEN
;
extern
void
print_call_start_page
(
DC_ATTR
*
dc_attr
)
DECLSPEC_HIDDEN
;
static
inline
int
get_dib_stride
(
int
width
,
int
bpp
)
{
return
((
width
*
bpp
+
31
)
>>
3
)
&
~
3
;
...
...
dlls/gdi32/text.c
View file @
2b8de930
...
...
@@ -939,6 +939,7 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags, const RECT *rect,
if
(
count
>
INT_MAX
)
return
FALSE
;
if
(
is_meta_dc
(
hdc
))
return
METADC_ExtTextOut
(
hdc
,
x
,
y
,
flags
,
rect
,
str
,
count
,
dx
);
if
(
!
(
dc_attr
=
get_dc_attr
(
hdc
)))
return
FALSE
;
if
(
dc_attr
->
print
)
print_call_start_page
(
dc_attr
);
if
(
dc_attr
->
emf
&&
!
EMFDC_ExtTextOut
(
dc_attr
,
x
,
y
,
flags
,
rect
,
str
,
count
,
dx
))
return
FALSE
;
...
...
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