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
b88f7246
Commit
b88f7246
authored
Apr 06, 2002
by
Huw D M Davies
Committed by
Alexandre Julliard
Apr 06, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement ResetDC and PHYSICALOFFSET[X|Y] devcaps.
Fixes to MergeDevmodes.
parent
7526fc5f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
24 deletions
+40
-24
driver.c
dlls/wineps/driver.c
+23
-13
init.c
dlls/wineps/init.c
+0
-0
ps.c
dlls/wineps/ps.c
+10
-10
psdrv.h
dlls/wineps/psdrv.h
+6
-1
wineps.spec
dlls/wineps/wineps.spec
+1
-0
No files found.
dlls/wineps/driver.c
View file @
b88f7246
...
...
@@ -45,11 +45,17 @@ void PSDRV_MergeDevmodes(PSDRV_DEVMODEA *dm1, PSDRV_DEVMODEA *dm2,
{
/* some sanity checks here on dm2 */
if
(
dm2
->
dmPublic
.
dmFields
&
DM_ORIENTATION
)
if
(
dm2
->
dmPublic
.
dmFields
&
DM_ORIENTATION
)
{
dm1
->
dmPublic
.
u1
.
s1
.
dmOrientation
=
dm2
->
dmPublic
.
u1
.
s1
.
dmOrientation
;
TRACE
(
"Changing orientation to %d (%s)
\n
"
,
dm1
->
dmPublic
.
u1
.
s1
.
dmOrientation
,
dm1
->
dmPublic
.
u1
.
s1
.
dmOrientation
==
DMORIENT_PORTRAIT
?
"Portrait"
:
(
dm1
->
dmPublic
.
u1
.
s1
.
dmOrientation
==
DMORIENT_LANDSCAPE
?
"Landscape"
:
"unknown"
));
}
/* NB PaperWidth is always < PaperLength */
if
(
dm2
->
dmPublic
.
dmFields
&
DM_PAPERSIZE
)
{
PAGESIZE
*
page
;
...
...
@@ -63,6 +69,8 @@ void PSDRV_MergeDevmodes(PSDRV_DEVMODEA *dm1, PSDRV_DEVMODEA *dm2,
254
.
0
/
72
.
0
;
dm1
->
dmPublic
.
u1
.
s1
.
dmPaperLength
=
page
->
PaperDimension
->
y
*
254
.
0
/
72
.
0
;
dm1
->
dmPublic
.
dmFields
&=
~
(
DM_PAPERLENGTH
|
DM_PAPERWIDTH
);
dm1
->
dmPublic
.
dmFields
|=
DM_PAPERSIZE
;
TRACE
(
"Changing page to %s %d x %d
\n
"
,
page
->
FullName
,
dm1
->
dmPublic
.
u1
.
s1
.
dmPaperWidth
,
dm1
->
dmPublic
.
u1
.
s1
.
dmPaperLength
);
...
...
@@ -70,20 +78,22 @@ void PSDRV_MergeDevmodes(PSDRV_DEVMODEA *dm1, PSDRV_DEVMODEA *dm2,
TRACE
(
"Trying to change to unsupported pagesize %d
\n
"
,
dm2
->
dmPublic
.
u1
.
s1
.
dmPaperSize
);
}
}
if
(
dm2
->
dmPublic
.
dmFields
&
DM_PAPERLENGTH
)
{
}
else
if
((
dm2
->
dmPublic
.
dmFields
&
DM_PAPERLENGTH
)
&&
(
dm2
->
dmPublic
.
dmFields
&
DM_PAPERWIDTH
))
{
dm1
->
dmPublic
.
u1
.
s1
.
dmPaperLength
=
dm2
->
dmPublic
.
u1
.
s1
.
dmPaperLength
;
TRACE
(
"Changing PaperLength to %d
\n
"
,
dm2
->
dmPublic
.
u1
.
s1
.
dmPaperLength
);
FIXME
(
"Changing PaperLength. Do we adjust PaperSize?
\n
"
);
}
if
(
dm2
->
dmPublic
.
dmFields
&
DM_PAPERWIDTH
)
{
dm1
->
dmPublic
.
u1
.
s1
.
dmPaperWidth
=
dm2
->
dmPublic
.
u1
.
s1
.
dmPaperWidth
;
TRACE
(
"Changing PaperWidth to %d
\n
"
,
TRACE
(
"Changing PaperLength|Width to %dx%d
\n
"
,
dm2
->
dmPublic
.
u1
.
s1
.
dmPaperLength
,
dm2
->
dmPublic
.
u1
.
s1
.
dmPaperWidth
);
FIXME
(
"Changing PaperWidth. Do we adjust PaperSize?
\n
"
);
dm1
->
dmPublic
.
dmFields
&=
~
DM_PAPERSIZE
;
dm1
->
dmPublic
.
dmFields
|=
(
DM_PAPERLENGTH
|
DM_PAPERWIDTH
);
}
else
if
(
dm2
->
dmPublic
.
dmFields
&
(
DM_PAPERLENGTH
|
DM_PAPERWIDTH
))
{
/* You might think that this would be allowed if dm1 is in custom size
mode, but apparently Windows reverts to standard paper mode even in
this case */
FIXME
(
"Trying to change only paperlength or paperwidth
\n
"
);
dm1
->
dmPublic
.
dmFields
&=
~
(
DM_PAPERLENGTH
|
DM_PAPERWIDTH
);
dm1
->
dmPublic
.
dmFields
|=
DM_PAPERSIZE
;
}
if
(
dm2
->
dmPublic
.
dmFields
&
DM_SCALE
)
{
...
...
dlls/wineps/init.c
View file @
b88f7246
This diff is collapsed.
Click to expand it.
dlls/wineps/ps.c
View file @
b88f7246
...
...
@@ -237,10 +237,10 @@ INT PSDRV_WriteHeader( PSDRV_PDEVICE *physDev, LPCSTR title )
/* BBox co-ords are in default user co-ord system so urx < ury even in
landscape mode */
llx
=
physDev
->
PageSize
.
left
*
72
.
0
/
physDev
->
logPixelsX
;
lly
=
physDev
->
PageSize
.
bottom
*
72
.
0
/
physDev
->
logPixelsY
;
urx
=
physDev
->
PageSize
.
right
*
72
.
0
/
physDev
->
logPixelsX
;
ury
=
physDev
->
PageSize
.
top
*
72
.
0
/
physDev
->
logPixelsY
;
llx
=
physDev
->
ImageableArea
.
left
*
72
.
0
/
physDev
->
logPixelsX
;
lly
=
physDev
->
ImageableArea
.
bottom
*
72
.
0
/
physDev
->
logPixelsY
;
urx
=
physDev
->
ImageableArea
.
right
*
72
.
0
/
physDev
->
logPixelsX
;
ury
=
physDev
->
ImageableArea
.
top
*
72
.
0
/
physDev
->
logPixelsY
;
if
(
physDev
->
Devmode
->
dmPublic
.
u1
.
s1
.
dmOrientation
==
DMORIENT_LANDSCAPE
)
{
orient
=
"Landscape"
;
...
...
@@ -346,17 +346,17 @@ INT PSDRV_WriteNewPage( PSDRV_PDEVICE *physDev )
if
(
physDev
->
Devmode
->
dmPublic
.
u1
.
s1
.
dmOrientation
==
DMORIENT_LANDSCAPE
)
{
if
(
physDev
->
pi
->
ppd
->
LandscapeOrientation
==
-
90
)
{
xtrans
=
physDev
->
PageSize
.
right
;
ytrans
=
physDev
->
PageSize
.
top
;
xtrans
=
physDev
->
ImageableArea
.
right
;
ytrans
=
physDev
->
ImageableArea
.
top
;
rotation
=
90
;
}
else
{
xtrans
=
physDev
->
PageSize
.
left
;
ytrans
=
physDev
->
PageSize
.
bottom
;
xtrans
=
physDev
->
ImageableArea
.
left
;
ytrans
=
physDev
->
ImageableArea
.
bottom
;
rotation
=
-
90
;
}
}
else
{
xtrans
=
physDev
->
PageSize
.
left
;
ytrans
=
physDev
->
PageSize
.
top
;
xtrans
=
physDev
->
ImageableArea
.
left
;
ytrans
=
physDev
->
ImageableArea
.
top
;
rotation
=
0
;
}
...
...
dlls/wineps/psdrv.h
View file @
b88f7246
...
...
@@ -277,7 +277,12 @@ typedef struct {
JOB
job
;
PSDRV_DEVMODEA
*
Devmode
;
PRINTERINFO
*
pi
;
RECT
PageSize
;
/* Imageable area in device co-ords */
SIZE
PageSize
;
/* Physical page size in device units */
RECT
ImageableArea
;
/* Imageable area in device units */
/* NB both PageSize and ImageableArea
are not rotated in landscape mode,
so PageSize.cx is generally
< PageSize.cy */
int
horzRes
;
/* device caps */
int
vertRes
;
int
horzSize
;
...
...
dlls/wineps/wineps.spec
View file @
b88f7246
...
...
@@ -38,6 +38,7 @@ debug_channels (psdrv)
@ cdecl Polygon(ptr ptr long) PSDRV_Polygon
@ cdecl Polyline(ptr ptr long) PSDRV_Polyline
@ cdecl Rectangle(ptr long long long long) PSDRV_Rectangle
@ cdecl ResetDC(ptr ptr) PSDRV_ResetDC
@ cdecl RoundRect(ptr long long long long long long) PSDRV_RoundRect
@ cdecl SelectBitmap(ptr long) PSDRV_SelectBitmap
@ cdecl SelectBrush(ptr long) PSDRV_SelectBrush
...
...
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