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
62efee23
Commit
62efee23
authored
Oct 13, 1999
by
Stephane Lussier
Committed by
Alexandre Julliard
Oct 13, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed the clipping for the postscript driver and turned it on (by setting
PSDRV_SetDeviceClipping in the function table).
parent
c25e7153
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
6 deletions
+44
-6
clipping.c
graphics/psdrv/clipping.c
+20
-2
init.c
graphics/psdrv/init.c
+1
-1
ps.c
graphics/psdrv/ps.c
+20
-2
psdrv.h
include/psdrv.h
+3
-1
No files found.
graphics/psdrv/clipping.c
View file @
62efee23
...
@@ -42,7 +42,24 @@ VOID PSDRV_SetDeviceClipping( DC *dc )
...
@@ -42,7 +42,24 @@ VOID PSDRV_SetDeviceClipping( DC *dc )
GetRegionData
(
dc
->
w
.
hGCClipRgn
,
size
,
rgndata
);
GetRegionData
(
dc
->
w
.
hGCClipRgn
,
size
,
rgndata
);
if
(
rgndata
->
rdh
.
nCount
>
0
)
PSDRV_WriteInitClip
(
dc
);
/* check for NULL region */
if
(
rgndata
->
rdh
.
nCount
==
0
)
{
/* set an empty clip path. */
PSDRV_WriteRectClip
(
dc
,
0
,
0
,
0
,
0
);
}
/* optimize when it is a simple region */
else
if
(
rgndata
->
rdh
.
nCount
==
1
)
{
RECT
*
pRect
=
(
RECT
*
)
rgndata
->
Buffer
;
PSDRV_WriteRectClip
(
dc
,
pRect
->
left
,
pRect
->
top
,
pRect
->
right
-
pRect
->
left
,
pRect
->
bottom
-
pRect
->
top
);
}
else
{
{
INT
i
;
INT
i
;
RECT
*
pRect
=
(
RECT
*
)
rgndata
->
Buffer
;
RECT
*
pRect
=
(
RECT
*
)
rgndata
->
Buffer
;
...
@@ -60,9 +77,10 @@ VOID PSDRV_SetDeviceClipping( DC *dc )
...
@@ -60,9 +77,10 @@ VOID PSDRV_SetDeviceClipping( DC *dc )
PSDRV_WriteArrayPut
(
dc
,
szArrayName
,
i
*
4
+
3
,
PSDRV_WriteArrayPut
(
dc
,
szArrayName
,
i
*
4
+
3
,
pRect
->
bottom
-
pRect
->
top
);
pRect
->
bottom
-
pRect
->
top
);
}
}
PSDRV_WriteRectClip2
(
dc
,
szArrayName
);
}
}
PSDRV_WriteRectClip
(
dc
,
szArrayName
);
HeapFree
(
GetProcessHeap
(),
0
,
rgndata
);
HeapFree
(
GetProcessHeap
(),
0
,
rgndata
);
return
;
return
;
}
}
graphics/psdrv/init.c
View file @
62efee23
...
@@ -78,7 +78,7 @@ static const DC_FUNCTIONS PSDRV_Funcs =
...
@@ -78,7 +78,7 @@ static const DC_FUNCTIONS PSDRV_Funcs =
NULL
,
/* pSelectPalette */
NULL
,
/* pSelectPalette */
PSDRV_SetBkColor
,
/* pSetBkColor */
PSDRV_SetBkColor
,
/* pSetBkColor */
NULL
,
/* pSetBkMode */
NULL
,
/* pSetBkMode */
NULL
,
/* pSetDeviceClipping */
PSDRV_SetDeviceClipping
,
/* pSetDeviceClipping */
NULL
,
/* pSetDIBitsToDevice */
NULL
,
/* pSetDIBitsToDevice */
NULL
,
/* pSetMapMode (optional) */
NULL
,
/* pSetMapMode (optional) */
NULL
,
/* pSetMapperFlags */
NULL
,
/* pSetMapperFlags */
...
...
graphics/psdrv/ps.c
View file @
62efee23
...
@@ -161,10 +161,16 @@ static char psclosepath[] =
...
@@ -161,10 +161,16 @@ static char psclosepath[] =
static
char
psclip
[]
=
static
char
psclip
[]
=
"clip
\n
"
;
"clip
\n
"
;
static
char
psinitclip
[]
=
"initclip
\n
"
;
static
char
pseoclip
[]
=
static
char
pseoclip
[]
=
"eoclip
\n
"
;
"eoclip
\n
"
;
static
char
psrectclip
[]
=
static
char
psrectclip
[]
=
"%d %d %d %d rectclip
\n
"
;
static
char
psrectclip2
[]
=
"%s rectclip
\n
"
;
"%s rectclip
\n
"
;
static
char
pshatch
[]
=
static
char
pshatch
[]
=
...
@@ -702,6 +708,11 @@ BOOL PSDRV_WriteEOClip(DC *dc)
...
@@ -702,6 +708,11 @@ BOOL PSDRV_WriteEOClip(DC *dc)
return
PSDRV_WriteSpool
(
dc
,
pseoclip
,
sizeof
(
pseoclip
)
-
1
);
return
PSDRV_WriteSpool
(
dc
,
pseoclip
,
sizeof
(
pseoclip
)
-
1
);
}
}
BOOL
PSDRV_WriteInitClip
(
DC
*
dc
)
{
return
PSDRV_WriteSpool
(
dc
,
psinitclip
,
sizeof
(
psinitclip
)
-
1
);
}
BOOL
PSDRV_WriteHatch
(
DC
*
dc
)
BOOL
PSDRV_WriteHatch
(
DC
*
dc
)
{
{
return
PSDRV_WriteSpool
(
dc
,
pshatch
,
sizeof
(
pshatch
)
-
1
);
return
PSDRV_WriteSpool
(
dc
,
pshatch
,
sizeof
(
pshatch
)
-
1
);
...
@@ -911,14 +922,21 @@ BOOL PSDRV_WriteArrayDef(DC *dc, CHAR *pszArrayName, INT nSize)
...
@@ -911,14 +922,21 @@ BOOL PSDRV_WriteArrayDef(DC *dc, CHAR *pszArrayName, INT nSize)
return
PSDRV_WriteSpool
(
dc
,
buf
,
strlen
(
buf
));
return
PSDRV_WriteSpool
(
dc
,
buf
,
strlen
(
buf
));
}
}
BOOL
PSDRV_WriteRectClip
(
DC
*
dc
,
CHAR
*
pszArrayName
)
BOOL
PSDRV_WriteRectClip
(
DC
*
dc
,
INT
x
,
INT
y
,
INT
w
,
INT
h
)
{
{
char
buf
[
100
];
char
buf
[
100
];
sprintf
(
buf
,
psrectclip
,
pszArrayName
);
sprintf
(
buf
,
psrectclip
,
x
,
y
,
w
,
h
);
return
PSDRV_WriteSpool
(
dc
,
buf
,
strlen
(
buf
));
return
PSDRV_WriteSpool
(
dc
,
buf
,
strlen
(
buf
));
}
}
BOOL
PSDRV_WriteRectClip2
(
DC
*
dc
,
CHAR
*
pszArrayName
)
{
char
buf
[
100
];
sprintf
(
buf
,
psrectclip2
,
pszArrayName
);
return
PSDRV_WriteSpool
(
dc
,
buf
,
strlen
(
buf
));
}
BOOL
PSDRV_WritePatternDict
(
DC
*
dc
,
BITMAP
*
bm
,
BYTE
*
bits
)
BOOL
PSDRV_WritePatternDict
(
DC
*
dc
,
BITMAP
*
bm
,
BYTE
*
bits
)
{
{
...
...
include/psdrv.h
View file @
62efee23
...
@@ -289,8 +289,10 @@ extern BOOL PSDRV_WriteGSave(DC *dc);
...
@@ -289,8 +289,10 @@ extern BOOL PSDRV_WriteGSave(DC *dc);
extern
BOOL
PSDRV_WriteGRestore
(
DC
*
dc
);
extern
BOOL
PSDRV_WriteGRestore
(
DC
*
dc
);
extern
BOOL
PSDRV_WriteNewPath
(
DC
*
dc
);
extern
BOOL
PSDRV_WriteNewPath
(
DC
*
dc
);
extern
BOOL
PSDRV_WriteClosePath
(
DC
*
dc
);
extern
BOOL
PSDRV_WriteClosePath
(
DC
*
dc
);
extern
BOOL
PSDRV_WriteInitClip
(
DC
*
dc
);
extern
BOOL
PSDRV_WriteClip
(
DC
*
dc
);
extern
BOOL
PSDRV_WriteClip
(
DC
*
dc
);
extern
BOOL
PSDRV_WriteRectClip
(
DC
*
dc
,
CHAR
*
pszArrayName
);
extern
BOOL
PSDRV_WriteRectClip
(
DC
*
dc
,
INT
x
,
INT
y
,
INT
w
,
INT
h
);
extern
BOOL
PSDRV_WriteRectClip2
(
DC
*
dc
,
CHAR
*
pszArrayName
);
extern
BOOL
PSDRV_WriteEOClip
(
DC
*
dc
);
extern
BOOL
PSDRV_WriteEOClip
(
DC
*
dc
);
extern
BOOL
PSDRV_WriteHatch
(
DC
*
dc
);
extern
BOOL
PSDRV_WriteHatch
(
DC
*
dc
);
extern
BOOL
PSDRV_WriteRotate
(
DC
*
dc
,
float
ang
);
extern
BOOL
PSDRV_WriteRotate
(
DC
*
dc
,
float
ang
);
...
...
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