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
faba25c6
Commit
faba25c6
authored
May 08, 2023
by
Piotr Caban
Committed by
Alexandre Julliard
May 11, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps: Remove gdi_physdev from print_ctx structure.
parent
ab98b134
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
67 additions
and
67 deletions
+67
-67
bitmap.c
dlls/wineps.drv/bitmap.c
+1
-1
brush.c
dlls/wineps.drv/brush.c
+4
-4
builtin.c
dlls/wineps.drv/builtin.c
+2
-2
clipping.c
dlls/wineps.drv/clipping.c
+3
-3
download.c
dlls/wineps.drv/download.c
+13
-13
escape.c
dlls/wineps.drv/escape.c
+3
-3
font.c
dlls/wineps.drv/font.c
+1
-1
graphics.c
dlls/wineps.drv/graphics.c
+26
-26
init.c
dlls/wineps.drv/init.c
+1
-1
pen.c
dlls/wineps.drv/pen.c
+2
-2
printproc.c
dlls/wineps.drv/printproc.c
+0
-0
ps.c
dlls/wineps.drv/ps.c
+2
-2
psdrv.h
dlls/wineps.drv/psdrv.h
+1
-1
text.c
dlls/wineps.drv/text.c
+4
-4
type1.c
dlls/wineps.drv/type1.c
+2
-2
type42.c
dlls/wineps.drv/type42.c
+2
-2
No files found.
dlls/wineps.drv/bitmap.c
View file @
faba25c6
...
@@ -110,7 +110,7 @@ static BOOL PSDRV_WriteImageMaskHeader(print_ctx *ctx, const BITMAPINFO *info, I
...
@@ -110,7 +110,7 @@ static BOOL PSDRV_WriteImageMaskHeader(print_ctx *ctx, const BITMAPINFO *info, I
*/
*/
if
(
!
info
->
bmiHeader
.
biClrUsed
)
if
(
!
info
->
bmiHeader
.
biClrUsed
)
{
{
PSDRV_CreateColor
(
ctx
,
&
foregnd
,
GetTextColor
(
ctx
->
dev
.
hdc
)
);
PSDRV_CreateColor
(
ctx
,
&
foregnd
,
GetTextColor
(
ctx
->
hdc
)
);
bkgnd
=
ctx
->
bkColor
;
bkgnd
=
ctx
->
bkColor
;
}
}
else
else
...
...
dlls/wineps.drv/brush.c
View file @
faba25c6
...
@@ -36,7 +36,7 @@ HBRUSH CDECL PSDRV_SelectBrush( print_ctx *ctx, HBRUSH hbrush, const struct brus
...
@@ -36,7 +36,7 @@ HBRUSH CDECL PSDRV_SelectBrush( print_ctx *ctx, HBRUSH hbrush, const struct brus
TRACE
(
"hbrush = %p
\n
"
,
hbrush
);
TRACE
(
"hbrush = %p
\n
"
,
hbrush
);
if
(
hbrush
==
GetStockObject
(
DC_BRUSH
))
if
(
hbrush
==
GetStockObject
(
DC_BRUSH
))
logbrush
.
lbColor
=
GetDCBrushColor
(
ctx
->
dev
.
hdc
);
logbrush
.
lbColor
=
GetDCBrushColor
(
ctx
->
hdc
);
switch
(
logbrush
.
lbStyle
)
{
switch
(
logbrush
.
lbStyle
)
{
...
@@ -71,7 +71,7 @@ HBRUSH CDECL PSDRV_SelectBrush( print_ctx *ctx, HBRUSH hbrush, const struct brus
...
@@ -71,7 +71,7 @@ HBRUSH CDECL PSDRV_SelectBrush( print_ctx *ctx, HBRUSH hbrush, const struct brus
*/
*/
COLORREF
CDECL
PSDRV_SetDCBrushColor
(
print_ctx
*
ctx
,
COLORREF
color
)
COLORREF
CDECL
PSDRV_SetDCBrushColor
(
print_ctx
*
ctx
,
COLORREF
color
)
{
{
if
(
GetCurrentObject
(
ctx
->
dev
.
hdc
,
OBJ_BRUSH
)
==
GetStockObject
(
DC_BRUSH
))
if
(
GetCurrentObject
(
ctx
->
hdc
,
OBJ_BRUSH
)
==
GetStockObject
(
DC_BRUSH
))
{
{
PSDRV_CreateColor
(
ctx
,
&
ctx
->
brush
.
color
,
color
);
PSDRV_CreateColor
(
ctx
,
&
ctx
->
brush
.
color
,
color
);
ctx
->
brush
.
set
=
FALSE
;
ctx
->
brush
.
set
=
FALSE
;
...
@@ -90,7 +90,7 @@ static BOOL PSDRV_SetBrush( print_ctx *ctx )
...
@@ -90,7 +90,7 @@ static BOOL PSDRV_SetBrush( print_ctx *ctx )
LOGBRUSH
logbrush
;
LOGBRUSH
logbrush
;
BOOL
ret
=
TRUE
;
BOOL
ret
=
TRUE
;
if
(
!
GetObjectA
(
GetCurrentObject
(
ctx
->
dev
.
hdc
,
OBJ_BRUSH
),
sizeof
(
logbrush
),
&
logbrush
))
if
(
!
GetObjectA
(
GetCurrentObject
(
ctx
->
hdc
,
OBJ_BRUSH
),
sizeof
(
logbrush
),
&
logbrush
))
{
{
ERR
(
"Can't get BRUSHOBJ
\n
"
);
ERR
(
"Can't get BRUSHOBJ
\n
"
);
return
FALSE
;
return
FALSE
;
...
@@ -155,7 +155,7 @@ BOOL PSDRV_Brush(print_ctx *ctx, BOOL EO)
...
@@ -155,7 +155,7 @@ BOOL PSDRV_Brush(print_ctx *ctx, BOOL EO)
if
(
ctx
->
pathdepth
)
if
(
ctx
->
pathdepth
)
return
FALSE
;
return
FALSE
;
if
(
!
GetObjectA
(
GetCurrentObject
(
ctx
->
dev
.
hdc
,
OBJ_BRUSH
),
sizeof
(
logbrush
),
&
logbrush
))
if
(
!
GetObjectA
(
GetCurrentObject
(
ctx
->
hdc
,
OBJ_BRUSH
),
sizeof
(
logbrush
),
&
logbrush
))
{
{
ERR
(
"Can't get BRUSHOBJ
\n
"
);
ERR
(
"Can't get BRUSHOBJ
\n
"
);
return
FALSE
;
return
FALSE
;
...
...
dlls/wineps.drv/builtin.c
View file @
faba25c6
...
@@ -41,7 +41,7 @@ BOOL PSDRV_WriteSetBuiltinFont(print_ctx *ctx)
...
@@ -41,7 +41,7 @@ BOOL PSDRV_WriteSetBuiltinFont(print_ctx *ctx)
struct
font_info
font_info
;
struct
font_info
font_info
;
matrix
size
;
matrix
size
;
ExtEscape
(
ctx
->
dev
.
hdc
,
PSDRV_GET_BUILTIN_FONT_INFO
,
0
,
NULL
,
ExtEscape
(
ctx
->
hdc
,
PSDRV_GET_BUILTIN_FONT_INFO
,
0
,
NULL
,
sizeof
(
font_info
),
(
char
*
)
&
font_info
);
sizeof
(
font_info
),
(
char
*
)
&
font_info
);
size
.
xx
=
font_info
.
size
.
cx
;
size
.
xx
=
font_info
.
size
.
cx
;
size
.
yy
=
font_info
.
size
.
cy
;
size
.
yy
=
font_info
.
size
.
cy
;
...
@@ -57,7 +57,7 @@ BOOL PSDRV_WriteBuiltinGlyphShow(print_ctx *ctx, LPCWSTR str, INT count)
...
@@ -57,7 +57,7 @@ BOOL PSDRV_WriteBuiltinGlyphShow(print_ctx *ctx, LPCWSTR str, INT count)
for
(
i
=
0
;
i
<
count
;
++
i
)
for
(
i
=
0
;
i
<
count
;
++
i
)
{
{
ExtEscape
(
ctx
->
dev
.
hdc
,
PSDRV_GET_GLYPH_NAME
,
sizeof
(
str
[
i
]),
(
const
char
*
)
&
str
[
i
],
sizeof
(
name
),
name
);
ExtEscape
(
ctx
->
hdc
,
PSDRV_GET_GLYPH_NAME
,
sizeof
(
str
[
i
]),
(
const
char
*
)
&
str
[
i
],
sizeof
(
name
),
name
);
PSDRV_WriteGlyphShow
(
ctx
,
name
);
PSDRV_WriteGlyphShow
(
ctx
,
name
);
}
}
...
...
dlls/wineps.drv/clipping.c
View file @
faba25c6
...
@@ -80,7 +80,7 @@ void PSDRV_SetClip( print_ctx *ctx )
...
@@ -80,7 +80,7 @@ void PSDRV_SetClip( print_ctx *ctx )
{
{
HRGN
hrgn
;
HRGN
hrgn
;
TRACE
(
"hdc=%p
\n
"
,
ctx
->
dev
.
hdc
);
TRACE
(
"hdc=%p
\n
"
,
ctx
->
hdc
);
if
(
ctx
->
pathdepth
)
{
if
(
ctx
->
pathdepth
)
{
TRACE
(
"inside a path, so not clipping
\n
"
);
TRACE
(
"inside a path, so not clipping
\n
"
);
...
@@ -88,7 +88,7 @@ void PSDRV_SetClip( print_ctx *ctx )
...
@@ -88,7 +88,7 @@ void PSDRV_SetClip( print_ctx *ctx )
}
}
hrgn
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
hrgn
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
if
(
GetRandomRgn
(
ctx
->
dev
.
hdc
,
hrgn
,
3
)
==
1
)
/* clip && meta */
if
(
GetRandomRgn
(
ctx
->
hdc
,
hrgn
,
3
)
==
1
)
/* clip && meta */
{
{
PSDRV_WriteGSave
(
ctx
);
PSDRV_WriteGSave
(
ctx
);
PSDRV_AddClip
(
ctx
,
hrgn
);
PSDRV_AddClip
(
ctx
,
hrgn
);
...
@@ -107,7 +107,7 @@ void PSDRV_ResetClip( print_ctx *ctx )
...
@@ -107,7 +107,7 @@ void PSDRV_ResetClip( print_ctx *ctx )
if
(
ctx
->
pathdepth
)
return
;
if
(
ctx
->
pathdepth
)
return
;
hrgn
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
hrgn
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
if
(
GetRandomRgn
(
ctx
->
dev
.
hdc
,
hrgn
,
3
)
==
1
)
/* clip && meta */
if
(
GetRandomRgn
(
ctx
->
hdc
,
hrgn
,
3
)
==
1
)
/* clip && meta */
PSDRV_WriteGRestore
(
ctx
);
PSDRV_WriteGRestore
(
ctx
);
DeleteObject
(
hrgn
);
DeleteObject
(
hrgn
);
}
}
dlls/wineps.drv/download.c
View file @
faba25c6
...
@@ -57,7 +57,7 @@ static void get_download_name(print_ctx *ctx, LPOUTLINETEXTMETRICA potm, char **
...
@@ -57,7 +57,7 @@ static void get_download_name(print_ctx *ctx, LPOUTLINETEXTMETRICA potm, char **
char
*
p
;
char
*
p
;
DWORD
size
;
DWORD
size
;
size
=
GetFontData
(
ctx
->
dev
.
hdc
,
MS_MAKE_TAG
(
'n'
,
'a'
,
'm'
,
'e'
),
0
,
NULL
,
0
);
size
=
GetFontData
(
ctx
->
hdc
,
MS_MAKE_TAG
(
'n'
,
'a'
,
'm'
,
'e'
),
0
,
NULL
,
0
);
if
(
size
!=
0
&&
size
!=
GDI_ERROR
)
if
(
size
!=
0
&&
size
!=
GDI_ERROR
)
{
{
BYTE
*
name
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
BYTE
*
name
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
...
@@ -75,7 +75,7 @@ static void get_download_name(print_ctx *ctx, LPOUTLINETEXTMETRICA potm, char **
...
@@ -75,7 +75,7 @@ static void get_download_name(print_ctx *ctx, LPOUTLINETEXTMETRICA potm, char **
USHORT
offset
;
USHORT
offset
;
}
*
name_record
;
}
*
name_record
;
GetFontData
(
ctx
->
dev
.
hdc
,
MS_MAKE_TAG
(
'n'
,
'a'
,
'm'
,
'e'
),
0
,
name
,
size
);
GetFontData
(
ctx
->
hdc
,
MS_MAKE_TAG
(
'n'
,
'a'
,
'm'
,
'e'
),
0
,
name
,
size
);
count
=
GET_BE_WORD
(
name
+
2
);
count
=
GET_BE_WORD
(
name
+
2
);
strings
=
name
+
GET_BE_WORD
(
name
+
4
);
strings
=
name
+
GET_BE_WORD
(
name
+
4
);
name_record
=
(
struct
name_record
*
)(
name
+
6
);
name_record
=
(
struct
name_record
*
)(
name
+
6
);
...
@@ -266,7 +266,7 @@ BOOL PSDRV_WriteSetDownloadFont(print_ctx *ctx, BOOL vertical)
...
@@ -266,7 +266,7 @@ BOOL PSDRV_WriteSetDownloadFont(print_ctx *ctx, BOOL vertical)
{
{
char
*
ps_name
;
char
*
ps_name
;
LPOUTLINETEXTMETRICA
potm
;
LPOUTLINETEXTMETRICA
potm
;
DWORD
len
=
GetOutlineTextMetricsA
(
ctx
->
dev
.
hdc
,
0
,
NULL
);
DWORD
len
=
GetOutlineTextMetricsA
(
ctx
->
hdc
,
0
,
NULL
);
DOWNLOAD
*
pdl
;
DOWNLOAD
*
pdl
;
LOGFONTW
lf
;
LOGFONTW
lf
;
UINT
ppem
;
UINT
ppem
;
...
@@ -275,24 +275,24 @@ BOOL PSDRV_WriteSetDownloadFont(print_ctx *ctx, BOOL vertical)
...
@@ -275,24 +275,24 @@ BOOL PSDRV_WriteSetDownloadFont(print_ctx *ctx, BOOL vertical)
assert
(
ctx
->
font
.
fontloc
==
Download
);
assert
(
ctx
->
font
.
fontloc
==
Download
);
if
(
!
GetObjectW
(
GetCurrentObject
(
ctx
->
dev
.
hdc
,
OBJ_FONT
),
sizeof
(
lf
),
&
lf
))
if
(
!
GetObjectW
(
GetCurrentObject
(
ctx
->
hdc
,
OBJ_FONT
),
sizeof
(
lf
),
&
lf
))
return
FALSE
;
return
FALSE
;
potm
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
potm
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
if
(
!
potm
)
if
(
!
potm
)
return
FALSE
;
return
FALSE
;
GetOutlineTextMetricsA
(
ctx
->
dev
.
hdc
,
len
,
potm
);
GetOutlineTextMetricsA
(
ctx
->
hdc
,
len
,
potm
);
get_download_name
(
ctx
,
potm
,
&
ps_name
,
vertical
);
get_download_name
(
ctx
,
potm
,
&
ps_name
,
vertical
);
ctx
->
font
.
fontinfo
.
Download
=
is_font_downloaded
(
ctx
,
ps_name
);
ctx
->
font
.
fontinfo
.
Download
=
is_font_downloaded
(
ctx
,
ps_name
);
ppem
=
calc_ppem_for_height
(
ctx
->
dev
.
hdc
,
lf
.
lfHeight
);
ppem
=
calc_ppem_for_height
(
ctx
->
hdc
,
lf
.
lfHeight
);
/* Retrieve the world -> device transform */
/* Retrieve the world -> device transform */
GetTransform
(
ctx
->
dev
.
hdc
,
0x204
,
&
xform
);
GetTransform
(
ctx
->
hdc
,
0x204
,
&
xform
);
if
(
GetGraphicsMode
(
ctx
->
dev
.
hdc
)
==
GM_COMPATIBLE
)
if
(
GetGraphicsMode
(
ctx
->
hdc
)
==
GM_COMPATIBLE
)
{
{
if
(
xform
.
eM22
<
0
)
ctx
->
font
.
escapement
=
-
ctx
->
font
.
escapement
;
if
(
xform
.
eM22
<
0
)
ctx
->
font
.
escapement
=
-
ctx
->
font
.
escapement
;
xform
.
eM11
=
xform
.
eM22
=
fabs
(
xform
.
eM22
);
xform
.
eM11
=
xform
.
eM22
=
fabs
(
xform
.
eM22
);
...
@@ -306,7 +306,7 @@ BOOL PSDRV_WriteSetDownloadFont(print_ctx *ctx, BOOL vertical)
...
@@ -306,7 +306,7 @@ BOOL PSDRV_WriteSetDownloadFont(print_ctx *ctx, BOOL vertical)
if
(
ctx
->
font
.
fontinfo
.
Download
==
NULL
)
{
if
(
ctx
->
font
.
fontinfo
.
Download
==
NULL
)
{
RECT
bbox
;
RECT
bbox
;
UINT
emsize
=
get_bbox
(
ctx
->
dev
.
hdc
,
&
bbox
);
UINT
emsize
=
get_bbox
(
ctx
->
hdc
,
&
bbox
);
if
(
!
emsize
)
{
if
(
!
emsize
)
{
HeapFree
(
GetProcessHeap
(),
0
,
ps_name
);
HeapFree
(
GetProcessHeap
(),
0
,
ps_name
);
...
@@ -335,7 +335,7 @@ BOOL PSDRV_WriteSetDownloadFont(print_ctx *ctx, BOOL vertical)
...
@@ -335,7 +335,7 @@ BOOL PSDRV_WriteSetDownloadFont(print_ctx *ctx, BOOL vertical)
if
(
pdl
->
type
==
Type42
)
{
if
(
pdl
->
type
==
Type42
)
{
char
g_name
[
MAX_G_NAME
+
1
];
char
g_name
[
MAX_G_NAME
+
1
];
get_glyph_name
(
ctx
->
dev
.
hdc
,
0
,
g_name
);
get_glyph_name
(
ctx
->
hdc
,
0
,
g_name
);
T42_download_glyph
(
ctx
,
pdl
,
0
,
g_name
);
T42_download_glyph
(
ctx
,
pdl
,
0
,
g_name
);
}
}
}
}
...
@@ -345,7 +345,7 @@ BOOL PSDRV_WriteSetDownloadFont(print_ctx *ctx, BOOL vertical)
...
@@ -345,7 +345,7 @@ BOOL PSDRV_WriteSetDownloadFont(print_ctx *ctx, BOOL vertical)
escapement
+=
900
;
escapement
+=
900
;
PSDRV_WriteSetFont
(
ctx
,
ps_name
,
ctx
->
font
.
size
,
escapement
,
PSDRV_WriteSetFont
(
ctx
,
ps_name
,
ctx
->
font
.
size
,
escapement
,
is_fake_italic
(
ctx
->
dev
.
hdc
));
is_fake_italic
(
ctx
->
hdc
));
HeapFree
(
GetProcessHeap
(),
0
,
ps_name
);
HeapFree
(
GetProcessHeap
(),
0
,
ps_name
);
HeapFree
(
GetProcessHeap
(),
0
,
potm
);
HeapFree
(
GetProcessHeap
(),
0
,
potm
);
...
@@ -746,7 +746,7 @@ BOOL PSDRV_WriteDownloadGlyphShow(print_ctx *ctx, const WORD *glyphs,
...
@@ -746,7 +746,7 @@ BOOL PSDRV_WriteDownloadGlyphShow(print_ctx *ctx, const WORD *glyphs,
switch
(
ctx
->
font
.
fontinfo
.
Download
->
type
)
{
switch
(
ctx
->
font
.
fontinfo
.
Download
->
type
)
{
case
Type42
:
case
Type42
:
for
(
i
=
0
;
i
<
count
;
i
++
)
{
for
(
i
=
0
;
i
<
count
;
i
++
)
{
get_glyph_name
(
ctx
->
dev
.
hdc
,
glyphs
[
i
],
g_name
);
get_glyph_name
(
ctx
->
hdc
,
glyphs
[
i
],
g_name
);
T42_download_glyph
(
ctx
,
ctx
->
font
.
fontinfo
.
Download
,
glyphs
[
i
],
g_name
);
T42_download_glyph
(
ctx
,
ctx
->
font
.
fontinfo
.
Download
,
glyphs
[
i
],
g_name
);
PSDRV_WriteGlyphShow
(
ctx
,
g_name
);
PSDRV_WriteGlyphShow
(
ctx
,
g_name
);
}
}
...
@@ -754,7 +754,7 @@ BOOL PSDRV_WriteDownloadGlyphShow(print_ctx *ctx, const WORD *glyphs,
...
@@ -754,7 +754,7 @@ BOOL PSDRV_WriteDownloadGlyphShow(print_ctx *ctx, const WORD *glyphs,
case
Type1
:
case
Type1
:
for
(
i
=
0
;
i
<
count
;
i
++
)
{
for
(
i
=
0
;
i
<
count
;
i
++
)
{
get_glyph_name
(
ctx
->
dev
.
hdc
,
glyphs
[
i
],
g_name
);
get_glyph_name
(
ctx
->
hdc
,
glyphs
[
i
],
g_name
);
T1_download_glyph
(
ctx
,
ctx
->
font
.
fontinfo
.
Download
,
glyphs
[
i
],
g_name
);
T1_download_glyph
(
ctx
,
ctx
->
font
.
fontinfo
.
Download
,
glyphs
[
i
],
g_name
);
PSDRV_WriteGlyphShow
(
ctx
,
g_name
);
PSDRV_WriteGlyphShow
(
ctx
,
g_name
);
}
}
...
...
dlls/wineps.drv/escape.c
View file @
faba25c6
...
@@ -55,7 +55,7 @@ INT CDECL PSDRV_ExtEscape( print_ctx *ctx, INT nEscape, INT cbInput, LPCVOID in_
...
@@ -55,7 +55,7 @@ INT CDECL PSDRV_ExtEscape( print_ctx *ctx, INT nEscape, INT cbInput, LPCVOID in_
INT
cbOutput
,
LPVOID
out_data
)
INT
cbOutput
,
LPVOID
out_data
)
{
{
TRACE
(
"%p,%d,%d,%p,%d,%p
\n
"
,
TRACE
(
"%p,%d,%d,%p,%d,%p
\n
"
,
ctx
->
dev
.
hdc
,
nEscape
,
cbInput
,
in_data
,
cbOutput
,
out_data
);
ctx
->
hdc
,
nEscape
,
cbInput
,
in_data
,
cbOutput
,
out_data
);
switch
(
nEscape
)
switch
(
nEscape
)
{
{
...
@@ -152,7 +152,7 @@ INT CDECL PSDRV_ExtEscape( print_ctx *ctx, INT nEscape, INT cbInput, LPCVOID in_
...
@@ -152,7 +152,7 @@ INT CDECL PSDRV_ExtEscape( print_ctx *ctx, INT nEscape, INT cbInput, LPCVOID in_
*/
*/
INT
CDECL
PSDRV_StartPage
(
print_ctx
*
ctx
)
INT
CDECL
PSDRV_StartPage
(
print_ctx
*
ctx
)
{
{
TRACE
(
"%p
\n
"
,
ctx
->
dev
.
hdc
);
TRACE
(
"%p
\n
"
,
ctx
->
hdc
);
if
(
!
ctx
->
job
.
OutOfPage
)
{
if
(
!
ctx
->
job
.
OutOfPage
)
{
FIXME
(
"Already started a page?
\n
"
);
FIXME
(
"Already started a page?
\n
"
);
...
@@ -173,7 +173,7 @@ INT CDECL PSDRV_StartPage( print_ctx *ctx )
...
@@ -173,7 +173,7 @@ INT CDECL PSDRV_StartPage( print_ctx *ctx )
*/
*/
INT
CDECL
PSDRV_EndPage
(
print_ctx
*
ctx
)
INT
CDECL
PSDRV_EndPage
(
print_ctx
*
ctx
)
{
{
TRACE
(
"%p
\n
"
,
ctx
->
dev
.
hdc
);
TRACE
(
"%p
\n
"
,
ctx
->
hdc
);
if
(
ctx
->
job
.
OutOfPage
)
{
if
(
ctx
->
job
.
OutOfPage
)
{
FIXME
(
"Already ended a page?
\n
"
);
FIXME
(
"Already ended a page?
\n
"
);
...
...
dlls/wineps.drv/font.c
View file @
faba25c6
...
@@ -42,7 +42,7 @@ HFONT CDECL PSDRV_SelectFont( print_ctx *ctx, HFONT hfont, UINT *aa_flags )
...
@@ -42,7 +42,7 @@ HFONT CDECL PSDRV_SelectFont( print_ctx *ctx, HFONT hfont, UINT *aa_flags )
{
{
struct
font_info
font_info
;
struct
font_info
font_info
;
if
(
ExtEscape
(
ctx
->
dev
.
hdc
,
PSDRV_GET_BUILTIN_FONT_INFO
,
0
,
NULL
,
if
(
ExtEscape
(
ctx
->
hdc
,
PSDRV_GET_BUILTIN_FONT_INFO
,
0
,
NULL
,
sizeof
(
font_info
),
(
char
*
)
&
font_info
))
sizeof
(
font_info
),
(
char
*
)
&
font_info
))
{
{
ctx
->
font
.
fontloc
=
Builtin
;
ctx
->
font
.
fontloc
=
Builtin
;
...
...
dlls/wineps.drv/graphics.c
View file @
faba25c6
...
@@ -44,7 +44,7 @@ INT PSDRV_XWStoDS( print_ctx *ctx, INT width )
...
@@ -44,7 +44,7 @@ INT PSDRV_XWStoDS( print_ctx *ctx, INT width )
pt
[
0
].
y
=
0
;
pt
[
0
].
y
=
0
;
pt
[
1
].
x
=
width
;
pt
[
1
].
x
=
width
;
pt
[
1
].
y
=
0
;
pt
[
1
].
y
=
0
;
LPtoDP
(
ctx
->
dev
.
hdc
,
pt
,
2
);
LPtoDP
(
ctx
->
hdc
,
pt
,
2
);
return
pt
[
1
].
x
-
pt
[
0
].
x
;
return
pt
[
1
].
x
-
pt
[
0
].
x
;
}
}
...
@@ -71,10 +71,10 @@ BOOL CDECL PSDRV_LineTo(print_ctx *ctx, INT x, INT y)
...
@@ -71,10 +71,10 @@ BOOL CDECL PSDRV_LineTo(print_ctx *ctx, INT x, INT y)
TRACE
(
"%d %d
\n
"
,
x
,
y
);
TRACE
(
"%d %d
\n
"
,
x
,
y
);
GetCurrentPositionEx
(
ctx
->
dev
.
hdc
,
pt
);
GetCurrentPositionEx
(
ctx
->
hdc
,
pt
);
pt
[
1
].
x
=
x
;
pt
[
1
].
x
=
x
;
pt
[
1
].
y
=
y
;
pt
[
1
].
y
=
y
;
LPtoDP
(
ctx
->
dev
.
hdc
,
pt
,
2
);
LPtoDP
(
ctx
->
hdc
,
pt
,
2
);
PSDRV_SetPen
(
ctx
);
PSDRV_SetPen
(
ctx
);
...
@@ -98,12 +98,12 @@ BOOL CDECL PSDRV_Rectangle( print_ctx *ctx, INT left, INT top, INT right, INT bo
...
@@ -98,12 +98,12 @@ BOOL CDECL PSDRV_Rectangle( print_ctx *ctx, INT left, INT top, INT right, INT bo
TRACE
(
"%d %d - %d %d
\n
"
,
left
,
top
,
right
,
bottom
);
TRACE
(
"%d %d - %d %d
\n
"
,
left
,
top
,
right
,
bottom
);
SetRect
(
&
rect
,
left
,
top
,
right
,
bottom
);
SetRect
(
&
rect
,
left
,
top
,
right
,
bottom
);
LPtoDP
(
ctx
->
dev
.
hdc
,
(
POINT
*
)
&
rect
,
2
);
LPtoDP
(
ctx
->
hdc
,
(
POINT
*
)
&
rect
,
2
);
/* Windows does something truly hacky here. If we're in passthrough mode
/* Windows does something truly hacky here. If we're in passthrough mode
and our rop is R2_NOP, then we output the string below. This is used in
and our rop is R2_NOP, then we output the string below. This is used in
Office 2k when inserting eps files */
Office 2k when inserting eps files */
if
(
ctx
->
job
.
passthrough_state
==
passthrough_active
&&
GetROP2
(
ctx
->
dev
.
hdc
)
==
R2_NOP
)
if
(
ctx
->
job
.
passthrough_state
==
passthrough_active
&&
GetROP2
(
ctx
->
hdc
)
==
R2_NOP
)
{
{
char
buf
[
256
];
char
buf
[
256
];
...
@@ -135,7 +135,7 @@ BOOL CDECL PSDRV_RoundRect( print_ctx *ctx, INT left, INT top, INT right,
...
@@ -135,7 +135,7 @@ BOOL CDECL PSDRV_RoundRect( print_ctx *ctx, INT left, INT top, INT right,
SetRect
(
&
rect
[
0
],
left
,
top
,
right
,
bottom
);
SetRect
(
&
rect
[
0
],
left
,
top
,
right
,
bottom
);
SetRect
(
&
rect
[
1
],
0
,
0
,
ell_width
,
ell_height
);
SetRect
(
&
rect
[
1
],
0
,
0
,
ell_width
,
ell_height
);
LPtoDP
(
ctx
->
dev
.
hdc
,
(
POINT
*
)
rect
,
4
);
LPtoDP
(
ctx
->
hdc
,
(
POINT
*
)
rect
,
4
);
left
=
rect
[
0
].
left
;
left
=
rect
[
0
].
left
;
top
=
rect
[
0
].
top
;
top
=
rect
[
0
].
top
;
...
@@ -188,13 +188,13 @@ static BOOL PSDRV_DrawArc( print_ctx *ctx, INT left, INT top,
...
@@ -188,13 +188,13 @@ static BOOL PSDRV_DrawArc( print_ctx *ctx, INT left, INT top,
POINT
start
,
end
;
POINT
start
,
end
;
SetRect
(
&
rect
,
left
,
top
,
right
,
bottom
);
SetRect
(
&
rect
,
left
,
top
,
right
,
bottom
);
LPtoDP
(
ctx
->
dev
.
hdc
,
(
POINT
*
)
&
rect
,
2
);
LPtoDP
(
ctx
->
hdc
,
(
POINT
*
)
&
rect
,
2
);
start
.
x
=
xstart
;
start
.
x
=
xstart
;
start
.
y
=
ystart
;
start
.
y
=
ystart
;
end
.
x
=
xend
;
end
.
x
=
xend
;
end
.
y
=
yend
;
end
.
y
=
yend
;
LPtoDP
(
ctx
->
dev
.
hdc
,
&
start
,
1
);
LPtoDP
(
ctx
->
hdc
,
&
start
,
1
);
LPtoDP
(
ctx
->
dev
.
hdc
,
&
end
,
1
);
LPtoDP
(
ctx
->
hdc
,
&
end
,
1
);
x
=
(
rect
.
left
+
rect
.
right
)
/
2
;
x
=
(
rect
.
left
+
rect
.
right
)
/
2
;
y
=
(
rect
.
top
+
rect
.
bottom
)
/
2
;
y
=
(
rect
.
top
+
rect
.
bottom
)
/
2
;
...
@@ -223,7 +223,7 @@ static BOOL PSDRV_DrawArc( print_ctx *ctx, INT left, INT top,
...
@@ -223,7 +223,7 @@ static BOOL PSDRV_DrawArc( print_ctx *ctx, INT left, INT top,
else
else
PSDRV_WriteNewPath
(
ctx
);
PSDRV_WriteNewPath
(
ctx
);
if
(
GetArcDirection
(
ctx
->
dev
.
hdc
)
==
AD_COUNTERCLOCKWISE
)
if
(
GetArcDirection
(
ctx
->
hdc
)
==
AD_COUNTERCLOCKWISE
)
PSDRV_WriteArc
(
ctx
,
x
,
y
,
w
,
h
,
start_angle
,
end_angle
);
PSDRV_WriteArc
(
ctx
,
x
,
y
,
w
,
h
,
start_angle
,
end_angle
);
else
else
PSDRV_WriteArc
(
ctx
,
x
,
y
,
w
,
h
,
end_angle
,
start_angle
);
PSDRV_WriteArc
(
ctx
,
x
,
y
,
w
,
h
,
end_angle
,
start_angle
);
...
@@ -278,7 +278,7 @@ BOOL CDECL PSDRV_Ellipse( print_ctx *ctx, INT left, INT top, INT right, INT bott
...
@@ -278,7 +278,7 @@ BOOL CDECL PSDRV_Ellipse( print_ctx *ctx, INT left, INT top, INT right, INT bott
TRACE
(
"%d %d - %d %d
\n
"
,
left
,
top
,
right
,
bottom
);
TRACE
(
"%d %d - %d %d
\n
"
,
left
,
top
,
right
,
bottom
);
SetRect
(
&
rect
,
left
,
top
,
right
,
bottom
);
SetRect
(
&
rect
,
left
,
top
,
right
,
bottom
);
LPtoDP
(
ctx
->
dev
.
hdc
,
(
POINT
*
)
&
rect
,
2
);
LPtoDP
(
ctx
->
hdc
,
(
POINT
*
)
&
rect
,
2
);
x
=
(
rect
.
left
+
rect
.
right
)
/
2
;
x
=
(
rect
.
left
+
rect
.
right
)
/
2
;
y
=
(
rect
.
top
+
rect
.
bottom
)
/
2
;
y
=
(
rect
.
top
+
rect
.
bottom
)
/
2
;
...
@@ -312,7 +312,7 @@ BOOL CDECL PSDRV_PolyPolyline( print_ctx *ctx, const POINT* pts, const DWORD* co
...
@@ -312,7 +312,7 @@ BOOL CDECL PSDRV_PolyPolyline( print_ctx *ctx, const POINT* pts, const DWORD* co
for
(
polyline
=
total
=
0
;
polyline
<
polylines
;
polyline
++
)
total
+=
counts
[
polyline
];
for
(
polyline
=
total
=
0
;
polyline
<
polylines
;
polyline
++
)
total
+=
counts
[
polyline
];
if
(
!
(
dev_pts
=
HeapAlloc
(
GetProcessHeap
(),
0
,
total
*
sizeof
(
*
dev_pts
)
)))
return
FALSE
;
if
(
!
(
dev_pts
=
HeapAlloc
(
GetProcessHeap
(),
0
,
total
*
sizeof
(
*
dev_pts
)
)))
return
FALSE
;
memcpy
(
dev_pts
,
pts
,
total
*
sizeof
(
*
dev_pts
)
);
memcpy
(
dev_pts
,
pts
,
total
*
sizeof
(
*
dev_pts
)
);
LPtoDP
(
ctx
->
dev
.
hdc
,
dev_pts
,
total
);
LPtoDP
(
ctx
->
hdc
,
dev_pts
,
total
);
pt
=
dev_pts
;
pt
=
dev_pts
;
...
@@ -348,7 +348,7 @@ BOOL CDECL PSDRV_PolyPolygon( print_ctx *ctx, const POINT* pts, const INT* count
...
@@ -348,7 +348,7 @@ BOOL CDECL PSDRV_PolyPolygon( print_ctx *ctx, const POINT* pts, const INT* count
for
(
polygon
=
total
=
0
;
polygon
<
polygons
;
polygon
++
)
total
+=
counts
[
polygon
];
for
(
polygon
=
total
=
0
;
polygon
<
polygons
;
polygon
++
)
total
+=
counts
[
polygon
];
if
(
!
(
dev_pts
=
HeapAlloc
(
GetProcessHeap
(),
0
,
total
*
sizeof
(
*
dev_pts
)
)))
return
FALSE
;
if
(
!
(
dev_pts
=
HeapAlloc
(
GetProcessHeap
(),
0
,
total
*
sizeof
(
*
dev_pts
)
)))
return
FALSE
;
memcpy
(
dev_pts
,
pts
,
total
*
sizeof
(
*
dev_pts
)
);
memcpy
(
dev_pts
,
pts
,
total
*
sizeof
(
*
dev_pts
)
);
LPtoDP
(
ctx
->
dev
.
hdc
,
dev_pts
,
total
);
LPtoDP
(
ctx
->
hdc
,
dev_pts
,
total
);
pt
=
dev_pts
;
pt
=
dev_pts
;
...
@@ -365,7 +365,7 @@ BOOL CDECL PSDRV_PolyPolygon( print_ctx *ctx, const POINT* pts, const INT* count
...
@@ -365,7 +365,7 @@ BOOL CDECL PSDRV_PolyPolygon( print_ctx *ctx, const POINT* pts, const INT* count
}
}
HeapFree
(
GetProcessHeap
(),
0
,
dev_pts
);
HeapFree
(
GetProcessHeap
(),
0
,
dev_pts
);
if
(
GetPolyFillMode
(
ctx
->
dev
.
hdc
)
==
ALTERNATE
)
if
(
GetPolyFillMode
(
ctx
->
hdc
)
==
ALTERNATE
)
PSDRV_Brush
(
ctx
,
1
);
PSDRV_Brush
(
ctx
,
1
);
else
/* WINDING */
else
/* WINDING */
PSDRV_Brush
(
ctx
,
0
);
PSDRV_Brush
(
ctx
,
0
);
...
@@ -383,7 +383,7 @@ static BOOL poly_bezier( print_ctx *ctx, const POINT *pt0, const POINT *pts, DWO
...
@@ -383,7 +383,7 @@ static BOOL poly_bezier( print_ctx *ctx, const POINT *pt0, const POINT *pts, DWO
TRACE
(
"
\n
"
);
TRACE
(
"
\n
"
);
dev_pts
[
0
]
=
*
pt0
;
dev_pts
[
0
]
=
*
pt0
;
LPtoDP
(
ctx
->
dev
.
hdc
,
dev_pts
,
1
);
LPtoDP
(
ctx
->
hdc
,
dev_pts
,
1
);
PSDRV_WriteSpool
(
ctx
,
"%PolyBezier
\n
"
,
12
);
PSDRV_WriteSpool
(
ctx
,
"%PolyBezier
\n
"
,
12
);
PSDRV_SetPen
(
ctx
);
PSDRV_SetPen
(
ctx
);
...
@@ -392,7 +392,7 @@ static BOOL poly_bezier( print_ctx *ctx, const POINT *pt0, const POINT *pts, DWO
...
@@ -392,7 +392,7 @@ static BOOL poly_bezier( print_ctx *ctx, const POINT *pt0, const POINT *pts, DWO
for
(
i
=
0
;
i
<
count
;
i
+=
3
)
for
(
i
=
0
;
i
<
count
;
i
+=
3
)
{
{
memcpy
(
dev_pts
,
pts
,
sizeof
(
dev_pts
)
);
memcpy
(
dev_pts
,
pts
,
sizeof
(
dev_pts
)
);
LPtoDP
(
ctx
->
dev
.
hdc
,
dev_pts
,
3
);
LPtoDP
(
ctx
->
hdc
,
dev_pts
,
3
);
PSDRV_WriteCurveTo
(
ctx
,
dev_pts
);
PSDRV_WriteCurveTo
(
ctx
,
dev_pts
);
}
}
PSDRV_DrawLine
(
ctx
);
PSDRV_DrawLine
(
ctx
);
...
@@ -416,7 +416,7 @@ BOOL CDECL PSDRV_PolyBezierTo( print_ctx *ctx, const POINT *pts, DWORD count )
...
@@ -416,7 +416,7 @@ BOOL CDECL PSDRV_PolyBezierTo( print_ctx *ctx, const POINT *pts, DWORD count )
{
{
POINT
pt0
;
POINT
pt0
;
GetCurrentPositionEx
(
ctx
->
dev
.
hdc
,
&
pt0
);
GetCurrentPositionEx
(
ctx
->
hdc
,
&
pt0
);
return
poly_bezier
(
ctx
,
&
pt0
,
pts
,
count
);
return
poly_bezier
(
ctx
,
&
pt0
,
pts
,
count
);
}
}
...
@@ -431,7 +431,7 @@ COLORREF CDECL PSDRV_SetPixel( print_ctx *ctx, INT x, INT y, COLORREF color )
...
@@ -431,7 +431,7 @@ COLORREF CDECL PSDRV_SetPixel( print_ctx *ctx, INT x, INT y, COLORREF color )
pt
.
x
=
x
;
pt
.
x
=
x
;
pt
.
y
=
y
;
pt
.
y
=
y
;
LPtoDP
(
ctx
->
dev
.
hdc
,
&
pt
,
1
);
LPtoDP
(
ctx
->
hdc
,
&
pt
,
1
);
PSDRV_SetClip
(
ctx
);
PSDRV_SetClip
(
ctx
);
/* we bracket the setcolor in gsave/grestore so that we don't trash
/* we bracket the setcolor in gsave/grestore so that we don't trash
...
@@ -455,7 +455,7 @@ BOOL CDECL PSDRV_PaintRgn( print_ctx *ctx, HRGN hrgn )
...
@@ -455,7 +455,7 @@ BOOL CDECL PSDRV_PaintRgn( print_ctx *ctx, HRGN hrgn )
RECT
*
pRect
;
RECT
*
pRect
;
DWORD
size
,
i
;
DWORD
size
,
i
;
TRACE
(
"hdc=%p
\n
"
,
ctx
->
dev
.
hdc
);
TRACE
(
"hdc=%p
\n
"
,
ctx
->
hdc
);
size
=
GetRegionData
(
hrgn
,
0
,
NULL
);
size
=
GetRegionData
(
hrgn
,
0
,
NULL
);
rgndata
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
rgndata
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
...
@@ -468,7 +468,7 @@ BOOL CDECL PSDRV_PaintRgn( print_ctx *ctx, HRGN hrgn )
...
@@ -468,7 +468,7 @@ BOOL CDECL PSDRV_PaintRgn( print_ctx *ctx, HRGN hrgn )
if
(
rgndata
->
rdh
.
nCount
==
0
)
if
(
rgndata
->
rdh
.
nCount
==
0
)
goto
end
;
goto
end
;
LPtoDP
(
ctx
->
dev
.
hdc
,
(
POINT
*
)
rgndata
->
Buffer
,
rgndata
->
rdh
.
nCount
*
2
);
LPtoDP
(
ctx
->
hdc
,
(
POINT
*
)
rgndata
->
Buffer
,
rgndata
->
rdh
.
nCount
*
2
);
PSDRV_SetClip
(
ctx
);
PSDRV_SetClip
(
ctx
);
for
(
i
=
0
,
pRect
=
(
RECT
*
)
rgndata
->
Buffer
;
i
<
rgndata
->
rdh
.
nCount
;
i
++
,
pRect
++
)
for
(
i
=
0
,
pRect
=
(
RECT
*
)
rgndata
->
Buffer
;
i
<
rgndata
->
rdh
.
nCount
;
i
++
,
pRect
++
)
...
@@ -487,19 +487,19 @@ static BOOL paint_path( print_ctx *ctx, BOOL stroke, BOOL fill )
...
@@ -487,19 +487,19 @@ static BOOL paint_path( print_ctx *ctx, BOOL stroke, BOOL fill )
{
{
POINT
*
points
;
POINT
*
points
;
BYTE
*
types
;
BYTE
*
types
;
int
i
,
size
=
GetPath
(
ctx
->
dev
.
hdc
,
NULL
,
NULL
,
0
);
int
i
,
size
=
GetPath
(
ctx
->
hdc
,
NULL
,
NULL
,
0
);
if
(
size
==
-
1
)
return
FALSE
;
if
(
size
==
-
1
)
return
FALSE
;
if
(
!
size
)
if
(
!
size
)
{
{
AbortPath
(
ctx
->
dev
.
hdc
);
AbortPath
(
ctx
->
hdc
);
return
TRUE
;
return
TRUE
;
}
}
points
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
*
sizeof
(
*
points
)
);
points
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
*
sizeof
(
*
points
)
);
types
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
*
sizeof
(
*
types
)
);
types
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
*
sizeof
(
*
types
)
);
if
(
!
points
||
!
types
)
goto
done
;
if
(
!
points
||
!
types
)
goto
done
;
if
(
GetPath
(
ctx
->
dev
.
hdc
,
points
,
types
,
size
)
==
-
1
)
goto
done
;
if
(
GetPath
(
ctx
->
hdc
,
points
,
types
,
size
)
==
-
1
)
goto
done
;
LPtoDP
(
ctx
->
dev
.
hdc
,
points
,
size
);
LPtoDP
(
ctx
->
hdc
,
points
,
size
);
if
(
stroke
)
PSDRV_SetPen
(
ctx
);
if
(
stroke
)
PSDRV_SetPen
(
ctx
);
PSDRV_SetClip
(
ctx
);
PSDRV_SetClip
(
ctx
);
...
@@ -523,11 +523,11 @@ static BOOL paint_path( print_ctx *ctx, BOOL stroke, BOOL fill )
...
@@ -523,11 +523,11 @@ static BOOL paint_path( print_ctx *ctx, BOOL stroke, BOOL fill )
break
;
break
;
}
}
}
}
if
(
fill
)
PSDRV_Brush
(
ctx
,
GetPolyFillMode
(
ctx
->
dev
.
hdc
)
==
ALTERNATE
);
if
(
fill
)
PSDRV_Brush
(
ctx
,
GetPolyFillMode
(
ctx
->
hdc
)
==
ALTERNATE
);
if
(
stroke
)
PSDRV_DrawLine
(
ctx
);
if
(
stroke
)
PSDRV_DrawLine
(
ctx
);
else
PSDRV_WriteNewPath
(
ctx
);
else
PSDRV_WriteNewPath
(
ctx
);
PSDRV_ResetClip
(
ctx
);
PSDRV_ResetClip
(
ctx
);
AbortPath
(
ctx
->
dev
.
hdc
);
AbortPath
(
ctx
->
hdc
);
done:
done:
HeapFree
(
GetProcessHeap
(),
0
,
points
);
HeapFree
(
GetProcessHeap
(),
0
,
points
);
...
...
dlls/wineps.drv/init.c
View file @
faba25c6
...
@@ -372,7 +372,7 @@ print_ctx *create_print_ctx( HDC hdc, const WCHAR *device,
...
@@ -372,7 +372,7 @@ print_ctx *create_print_ctx( HDC hdc, const WCHAR *device,
}
}
PSDRV_UpdateDevCaps
(
ctx
);
PSDRV_UpdateDevCaps
(
ctx
);
ctx
->
dev
.
hdc
=
hdc
;
ctx
->
hdc
=
hdc
;
SelectObject
(
hdc
,
GetStockObject
(
DEVICE_DEFAULT_FONT
));
SelectObject
(
hdc
,
GetStockObject
(
DEVICE_DEFAULT_FONT
));
return
ctx
;
return
ctx
;
}
}
...
...
dlls/wineps.drv/pen.c
View file @
faba25c6
...
@@ -68,7 +68,7 @@ HPEN CDECL PSDRV_SelectPen( print_ctx *ctx, HPEN hpen, const struct brush_patter
...
@@ -68,7 +68,7 @@ HPEN CDECL PSDRV_SelectPen( print_ctx *ctx, HPEN hpen, const struct brush_patter
if
(
ctx
->
pen
.
width
<
0
)
ctx
->
pen
.
width
=
-
ctx
->
pen
.
width
;
if
(
ctx
->
pen
.
width
<
0
)
ctx
->
pen
.
width
=
-
ctx
->
pen
.
width
;
}
}
if
(
hpen
==
GetStockObject
(
DC_PEN
))
if
(
hpen
==
GetStockObject
(
DC_PEN
))
logpen
.
lopnColor
=
GetDCPenColor
(
ctx
->
dev
.
hdc
);
logpen
.
lopnColor
=
GetDCPenColor
(
ctx
->
hdc
);
switch
(
logpen
.
lopnStyle
&
PS_JOIN_MASK
)
switch
(
logpen
.
lopnStyle
&
PS_JOIN_MASK
)
{
{
...
@@ -142,7 +142,7 @@ HPEN CDECL PSDRV_SelectPen( print_ctx *ctx, HPEN hpen, const struct brush_patter
...
@@ -142,7 +142,7 @@ HPEN CDECL PSDRV_SelectPen( print_ctx *ctx, HPEN hpen, const struct brush_patter
*/
*/
COLORREF
CDECL
PSDRV_SetDCPenColor
(
print_ctx
*
ctx
,
COLORREF
color
)
COLORREF
CDECL
PSDRV_SetDCPenColor
(
print_ctx
*
ctx
,
COLORREF
color
)
{
{
if
(
GetCurrentObject
(
ctx
->
dev
.
hdc
,
OBJ_PEN
)
==
GetStockObject
(
DC_PEN
))
if
(
GetCurrentObject
(
ctx
->
hdc
,
OBJ_PEN
)
==
GetStockObject
(
DC_PEN
))
PSDRV_CreateColor
(
ctx
,
&
ctx
->
pen
.
color
,
color
);
PSDRV_CreateColor
(
ctx
,
&
ctx
->
pen
.
color
,
color
);
return
color
;
return
color
;
}
}
...
...
dlls/wineps.drv/printproc.c
View file @
faba25c6
This diff is collapsed.
Click to expand it.
dlls/wineps.drv/ps.c
View file @
faba25c6
...
@@ -976,8 +976,8 @@ BOOL PSDRV_WriteDIBPatternDict(print_ctx *ctx, const BITMAPINFO *bmi, BYTE *bits
...
@@ -976,8 +976,8 @@ BOOL PSDRV_WriteDIBPatternDict(print_ctx *ctx, const BITMAPINFO *bmi, BYTE *bits
PSDRV_WriteSpool
(
ctx
,
"def
\n
"
,
4
);
PSDRV_WriteSpool
(
ctx
,
"def
\n
"
,
4
);
PSDRV_WriteIndexColorSpaceBegin
(
ctx
,
1
);
PSDRV_WriteIndexColorSpaceBegin
(
ctx
,
1
);
map
[
0
]
=
GetTextColor
(
ctx
->
dev
.
hdc
);
map
[
0
]
=
GetTextColor
(
ctx
->
hdc
);
map
[
1
]
=
GetBkColor
(
ctx
->
dev
.
hdc
);
map
[
1
]
=
GetBkColor
(
ctx
->
hdc
);
PSDRV_WriteRGB
(
ctx
,
map
,
2
);
PSDRV_WriteRGB
(
ctx
,
map
,
2
);
PSDRV_WriteIndexColorSpaceEnd
(
ctx
);
PSDRV_WriteIndexColorSpaceEnd
(
ctx
);
...
...
dlls/wineps.drv/psdrv.h
View file @
faba25c6
...
@@ -356,7 +356,7 @@ typedef struct {
...
@@ -356,7 +356,7 @@ typedef struct {
typedef
struct
typedef
struct
{
{
struct
gdi_physdev
dev
;
HDC
hdc
;
PSFONT
font
;
/* Current PS font */
PSFONT
font
;
/* Current PS font */
DOWNLOAD
*
downloaded_fonts
;
DOWNLOAD
*
downloaded_fonts
;
PSPEN
pen
;
PSPEN
pen
;
...
...
dlls/wineps.drv/text.c
View file @
faba25c6
...
@@ -65,7 +65,7 @@ static Run* build_vertical_runs(print_ctx *ctx, UINT flags, LPCWSTR str, UINT co
...
@@ -65,7 +65,7 @@ static Run* build_vertical_runs(print_ctx *ctx, UINT flags, LPCWSTR str, UINT co
int
index
=
0
;
int
index
=
0
;
LOGFONTW
lf
;
LOGFONTW
lf
;
if
(
count
&&
str
&&
(
!
(
flags
&
ETO_GLYPH_INDEX
))
&&
GetObjectW
(
GetCurrentObject
(
ctx
->
dev
.
hdc
,
OBJ_FONT
),
sizeof
(
lf
),
&
lf
)
&&
(
lf
.
lfFaceName
[
0
]
==
'@'
))
if
(
count
&&
str
&&
(
!
(
flags
&
ETO_GLYPH_INDEX
))
&&
GetObjectW
(
GetCurrentObject
(
ctx
->
hdc
,
OBJ_FONT
),
sizeof
(
lf
),
&
lf
)
&&
(
lf
.
lfFaceName
[
0
]
==
'@'
))
{
{
last_vert
=
check_unicode_tategaki
(
str
[
0
]);
last_vert
=
check_unicode_tategaki
(
str
[
0
]);
start
=
end
=
0
;
start
=
end
=
0
;
...
@@ -84,14 +84,14 @@ static Run* build_vertical_runs(print_ctx *ctx, UINT flags, LPCWSTR str, UINT co
...
@@ -84,14 +84,14 @@ static Run* build_vertical_runs(print_ctx *ctx, UINT flags, LPCWSTR str, UINT co
if
(
run
[
index
].
vertical
)
if
(
run
[
index
].
vertical
)
{
{
TEXTMETRICW
tm
;
TEXTMETRICW
tm
;
GetTextMetricsW
(
ctx
->
dev
.
hdc
,
&
tm
);
GetTextMetricsW
(
ctx
->
hdc
,
&
tm
);
offset
+=
PSDRV_XWStoDS
(
ctx
,
tm
.
tmAscent
-
tm
.
tmInternalLeading
);
offset
+=
PSDRV_XWStoDS
(
ctx
,
tm
.
tmAscent
-
tm
.
tmInternalLeading
);
}
}
if
(
start
>
0
)
if
(
start
>
0
)
{
{
SIZE
size
;
SIZE
size
;
GetTextExtentPointW
(
ctx
->
dev
.
hdc
,
str
,
start
,
&
size
);
GetTextExtentPointW
(
ctx
->
hdc
,
str
,
start
,
&
size
);
offset
+=
PSDRV_XWStoDS
(
ctx
,
size
.
cx
);
offset
+=
PSDRV_XWStoDS
(
ctx
,
size
.
cx
);
}
}
...
@@ -215,7 +215,7 @@ static BOOL PSDRV_Text(print_ctx *ctx, INT x, INT y, UINT flags, LPCWSTR str,
...
@@ -215,7 +215,7 @@ static BOOL PSDRV_Text(print_ctx *ctx, INT x, INT y, UINT flags, LPCWSTR str,
if
(
ctx
->
font
.
fontloc
==
Download
&&
!
(
flags
&
ETO_GLYPH_INDEX
))
if
(
ctx
->
font
.
fontloc
==
Download
&&
!
(
flags
&
ETO_GLYPH_INDEX
))
{
{
glyphs
=
HeapAlloc
(
GetProcessHeap
(),
0
,
count
*
sizeof
(
WORD
)
);
glyphs
=
HeapAlloc
(
GetProcessHeap
(),
0
,
count
*
sizeof
(
WORD
)
);
GetGlyphIndicesW
(
ctx
->
dev
.
hdc
,
str
,
count
,
glyphs
,
0
);
GetGlyphIndicesW
(
ctx
->
hdc
,
str
,
count
,
glyphs
,
0
);
str
=
glyphs
;
str
=
glyphs
;
}
}
...
...
dlls/wineps.drv/type1.c
View file @
faba25c6
...
@@ -568,9 +568,9 @@ BOOL T1_download_glyph(print_ctx *ctx, DOWNLOAD *pdl, DWORD index, char *glyph_n
...
@@ -568,9 +568,9 @@ BOOL T1_download_glyph(print_ctx *ctx, DOWNLOAD *pdl, DWORD index, char *glyph_n
outline
.
flags
=
NULL
;
outline
.
flags
=
NULL
;
outline
.
end_pts
=
NULL
;
outline
.
end_pts
=
NULL
;
outline
.
pts
=
NULL
;
outline
.
pts
=
NULL
;
get_hmetrics
(
ctx
->
dev
.
hdc
,
index
,
&
outline
.
lsb
,
&
outline
.
advance
);
get_hmetrics
(
ctx
->
hdc
,
index
,
&
outline
.
lsb
,
&
outline
.
advance
);
if
(
!
append_glyph_outline
(
ctx
->
dev
.
hdc
,
index
,
&
outline
))
return
FALSE
;
if
(
!
append_glyph_outline
(
ctx
->
hdc
,
index
,
&
outline
))
return
FALSE
;
charstring
=
str_init
(
100
);
charstring
=
str_init
(
100
);
curpos
.
x
=
outline
.
lsb
;
curpos
.
x
=
outline
.
lsb
;
...
...
dlls/wineps.drv/type42.c
View file @
faba25c6
...
@@ -175,7 +175,7 @@ TYPE42 *T42_download_header(print_ctx *ctx, char *ps_name,
...
@@ -175,7 +175,7 @@ TYPE42 *T42_download_header(print_ctx *ctx, char *ps_name,
t42
->
num_of_written_tables
=
0
;
t42
->
num_of_written_tables
=
0
;
for
(
i
=
0
;
i
<
num_of_tables
;
i
++
)
{
for
(
i
=
0
;
i
<
num_of_tables
;
i
++
)
{
LoadTable
(
ctx
->
dev
.
hdc
,
t42
->
tables
+
i
);
LoadTable
(
ctx
->
hdc
,
t42
->
tables
+
i
);
if
(
t42
->
tables
[
i
].
len
>
0xffff
&&
t42
->
tables
[
i
].
write
)
break
;
if
(
t42
->
tables
[
i
].
len
>
0xffff
&&
t42
->
tables
[
i
].
write
)
break
;
if
(
t42
->
tables
[
i
].
write
)
t42
->
num_of_written_tables
++
;
if
(
t42
->
tables
[
i
].
write
)
t42
->
num_of_written_tables
++
;
if
(
t42
->
tables
[
i
].
MS_tag
==
MS_MAKE_TAG
(
'l'
,
'o'
,
'c'
,
'a'
))
if
(
t42
->
tables
[
i
].
MS_tag
==
MS_MAKE_TAG
(
'l'
,
'o'
,
'c'
,
'a'
))
...
@@ -328,7 +328,7 @@ BOOL T42_download_glyph(print_ctx *ctx, DOWNLOAD *pdl, DWORD index,
...
@@ -328,7 +328,7 @@ BOOL T42_download_glyph(print_ctx *ctx, DOWNLOAD *pdl, DWORD index,
sg_index
=
GET_BE_WORD
(
sg_start
+
2
);
sg_index
=
GET_BE_WORD
(
sg_start
+
2
);
TRACE
(
"Sending subglyph %04lx for glyph %04lx
\n
"
,
sg_index
,
index
);
TRACE
(
"Sending subglyph %04lx for glyph %04lx
\n
"
,
sg_index
,
index
);
get_glyph_name
(
ctx
->
dev
.
hdc
,
sg_index
,
sg_name
);
get_glyph_name
(
ctx
->
hdc
,
sg_index
,
sg_name
);
T42_download_glyph
(
ctx
,
pdl
,
sg_index
,
sg_name
);
T42_download_glyph
(
ctx
,
pdl
,
sg_index
,
sg_name
);
sg_start
+=
4
;
sg_start
+=
4
;
if
(
sg_flags
&
ARG_1_AND_2_ARE_WORDS
)
if
(
sg_flags
&
ARG_1_AND_2_ARE_WORDS
)
...
...
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