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
3fca78fb
Commit
3fca78fb
authored
May 17, 2023
by
Piotr Caban
Committed by
Alexandre Julliard
May 19, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps: Remove unused fields from print_ctx.
parent
e70aa825
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
72 deletions
+6
-72
color.c
dlls/wineps.drv/color.c
+0
-28
init.c
dlls/wineps.drv/init.c
+6
-36
ps.c
dlls/wineps.drv/ps.c
+0
-1
psdrv.h
dlls/wineps.drv/psdrv.h
+0
-7
No files found.
dlls/wineps.drv/color.c
View file @
3fca78fb
...
...
@@ -24,34 +24,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
psdrv
);
/**********************************************************************
* PSDRV_CopyColor
*
* Copies col2 into col1. Return FALSE on error.
*/
BOOL
PSDRV_CopyColor
(
PSCOLOR
*
col1
,
PSCOLOR
*
col2
)
{
switch
(
col2
->
type
)
{
case
PSCOLOR_GRAY
:
col1
->
value
.
gray
.
i
=
col2
->
value
.
gray
.
i
;
break
;
case
PSCOLOR_RGB
:
col1
->
value
.
rgb
.
r
=
col2
->
value
.
rgb
.
r
;
col1
->
value
.
rgb
.
g
=
col2
->
value
.
rgb
.
g
;
col1
->
value
.
rgb
.
b
=
col2
->
value
.
rgb
.
b
;
break
;
default:
ERR
(
"Unknown colour type %d
\n
"
,
col1
->
type
);
return
FALSE
;
}
col1
->
type
=
col2
->
type
;
return
TRUE
;
}
PSRGB
rgb_to_grayscale_scale
(
void
)
{
static
const
PSRGB
scale
=
{
0
.
3
,
0
.
59
,
0
.
11
};
...
...
dlls/wineps.drv/init.c
View file @
3fca78fb
...
...
@@ -412,7 +412,7 @@ static void PSDRV_UpdateDevCaps( print_ctx *ctx )
{
PAGESIZE
*
page
;
RESOLUTION
*
res
;
INT
width
=
0
,
height
=
0
,
resx
=
0
,
resy
=
0
;
INT
resx
=
0
,
resy
=
0
;
dump_devmode
(
&
ctx
->
Devmode
->
dmPublic
);
...
...
@@ -460,63 +460,33 @@ static void PSDRV_UpdateDevCaps( print_ctx *ctx )
if
(
&
page
->
entry
==
&
ctx
->
pi
->
ppd
->
PageSizes
)
{
FIXME
(
"Can't find page
\n
"
);
SetRectEmpty
(
&
ctx
->
ImageableArea
);
ctx
->
PageSize
.
cx
=
0
;
ctx
->
PageSize
.
cy
=
0
;
}
else
if
(
page
->
ImageableArea
)
{
/* ctx sizes in device units; ppd sizes in 1/72" */
SetRect
(
&
ctx
->
ImageableArea
,
page
->
ImageableArea
->
llx
*
ctx
->
logPixelsX
/
72
,
page
->
ImageableArea
->
ury
*
ctx
->
logPixelsY
/
72
,
page
->
ImageableArea
->
urx
*
ctx
->
logPixelsX
/
72
,
page
->
ImageableArea
->
lly
*
ctx
->
logPixelsY
/
72
);
ctx
->
PageSize
.
cx
=
page
->
PaperDimension
->
x
*
ctx
->
logPixelsX
/
72
;
ctx
->
PageSize
.
cy
=
page
->
PaperDimension
->
y
*
ctx
->
logPixelsY
/
72
;
}
else
{
ctx
->
ImageableArea
.
left
=
ctx
->
ImageableArea
.
bottom
=
0
;
ctx
->
ImageableArea
.
right
=
ctx
->
PageSize
.
cx
=
ctx
->
ImageableArea
.
right
=
page
->
PaperDimension
->
x
*
ctx
->
logPixelsX
/
72
;
ctx
->
ImageableArea
.
top
=
ctx
->
PageSize
.
cy
=
ctx
->
ImageableArea
.
top
=
page
->
PaperDimension
->
y
*
ctx
->
logPixelsY
/
72
;
}
}
else
if
((
ctx
->
Devmode
->
dmPublic
.
dmFields
&
DM_PAPERLENGTH
)
&&
(
ctx
->
Devmode
->
dmPublic
.
dmFields
&
DM_PAPERWIDTH
))
{
/* ctx sizes in device units; Devmode sizes in 1/10 mm */
ctx
->
ImageableArea
.
left
=
ctx
->
ImageableArea
.
bottom
=
0
;
ctx
->
ImageableArea
.
right
=
ctx
->
PageSize
.
cx
=
ctx
->
ImageableArea
.
right
=
ctx
->
Devmode
->
dmPublic
.
dmPaperWidth
*
ctx
->
logPixelsX
/
254
;
ctx
->
ImageableArea
.
top
=
ctx
->
PageSize
.
cy
=
ctx
->
ImageableArea
.
top
=
ctx
->
Devmode
->
dmPublic
.
dmPaperLength
*
ctx
->
logPixelsY
/
254
;
}
else
{
FIXME
(
"Odd dmFields %lx
\n
"
,
ctx
->
Devmode
->
dmPublic
.
dmFields
);
SetRectEmpty
(
&
ctx
->
ImageableArea
);
ctx
->
PageSize
.
cx
=
0
;
ctx
->
PageSize
.
cy
=
0
;
}
TRACE
(
"ImageableArea = %s: PageSize = %ldx%ld
\n
"
,
wine_dbgstr_rect
(
&
ctx
->
ImageableArea
),
ctx
->
PageSize
.
cx
,
ctx
->
PageSize
.
cy
);
/* these are in device units */
width
=
ctx
->
ImageableArea
.
right
-
ctx
->
ImageableArea
.
left
;
height
=
ctx
->
ImageableArea
.
top
-
ctx
->
ImageableArea
.
bottom
;
if
(
ctx
->
Devmode
->
dmPublic
.
dmOrientation
==
DMORIENT_PORTRAIT
)
{
ctx
->
horzRes
=
width
;
ctx
->
vertRes
=
height
;
}
else
{
ctx
->
horzRes
=
height
;
ctx
->
vertRes
=
width
;
}
/* these are in mm */
ctx
->
horzSize
=
(
ctx
->
horzRes
*
25
.
4
)
/
ctx
->
logPixelsX
;
ctx
->
vertSize
=
(
ctx
->
vertRes
*
25
.
4
)
/
ctx
->
logPixelsY
;
TRACE
(
"devcaps: horzSize = %dmm, vertSize = %dmm, "
"horzRes = %d, vertRes = %d
\n
"
,
ctx
->
horzSize
,
ctx
->
vertSize
,
ctx
->
horzRes
,
ctx
->
vertRes
);
TRACE
(
"ImageableArea = %s
\n
"
,
wine_dbgstr_rect
(
&
ctx
->
ImageableArea
));
}
print_ctx
*
create_print_ctx
(
HDC
hdc
,
const
WCHAR
*
device
,
...
...
dlls/wineps.drv/ps.c
View file @
3fca78fb
...
...
@@ -635,7 +635,6 @@ BOOL PSDRV_WriteSetColor(print_ctx *ctx, PSCOLOR *color)
{
char
buf
[
256
];
PSDRV_CopyColor
(
&
ctx
->
inkColor
,
color
);
switch
(
color
->
type
)
{
case
PSCOLOR_RGB
:
push_lc_numeric
(
"C"
);
...
...
dlls/wineps.drv/psdrv.h
View file @
3fca78fb
...
...
@@ -338,20 +338,14 @@ typedef struct
PSPEN
pen
;
PSBRUSH
brush
;
PSCOLOR
bkColor
;
PSCOLOR
inkColor
;
/* Last colour set */
JOB
job
;
PSDRV_DEVMODE
*
Devmode
;
PRINTERINFO
*
pi
;
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
;
int
vertSize
;
int
logPixelsX
;
int
logPixelsY
;
...
...
@@ -446,7 +440,6 @@ extern void PSDRV_AddClip( print_ctx *ctx, HRGN hrgn ) DECLSPEC_HIDDEN;
extern
void
PSDRV_SetClip
(
print_ctx
*
ctx
)
DECLSPEC_HIDDEN
;
extern
void
PSDRV_ResetClip
(
print_ctx
*
ctx
)
DECLSPEC_HIDDEN
;
extern
BOOL
PSDRV_CopyColor
(
PSCOLOR
*
col1
,
PSCOLOR
*
col2
)
DECLSPEC_HIDDEN
;
extern
void
PSDRV_CreateColor
(
print_ctx
*
ctx
,
PSCOLOR
*
pscolor
,
COLORREF
wincolor
)
DECLSPEC_HIDDEN
;
extern
PSRGB
rgb_to_grayscale_scale
(
void
)
DECLSPEC_HIDDEN
;
...
...
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