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
effc55ea
Commit
effc55ea
authored
Jul 18, 1999
by
Luc Tourangeau
Committed by
Alexandre Julliard
Jul 18, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- implementation of SetDeviceClipping
- coordinate system origin fix
parent
db3aba29
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
103 additions
and
7 deletions
+103
-7
Makefile.in
graphics/psdrv/Makefile.in
+1
-0
clipping.c
graphics/psdrv/clipping.c
+51
-0
init.c
graphics/psdrv/init.c
+3
-4
ps.c
graphics/psdrv/ps.c
+44
-3
psdrv.h
include/psdrv.h
+4
-0
No files found.
graphics/psdrv/Makefile.in
View file @
effc55ea
...
...
@@ -10,6 +10,7 @@ C_SRCS = \
bitblt.c
\
bitmap.c
\
brush.c
\
clipping.c
\
color.c
\
driver.c
\
escape.c
\
...
...
graphics/psdrv/clipping.c
0 → 100644
View file @
effc55ea
/*
* PostScript clipping functions
*
* Copyright 1999 Luc Tourangau
*
*/
#include "gdi.h"
#include "psdrv.h"
#include "region.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
psdrv
)
/***********************************************************************
* PSDRV_SetDeviceClipping
*/
VOID
PSDRV_SetDeviceClipping
(
DC
*
dc
)
{
CHAR
szArrayName
[]
=
"clippath"
;
RGNOBJ
*
obj
=
(
RGNOBJ
*
)
GDI_GetObjPtr
(
dc
->
w
.
hGCClipRgn
,
REGION_MAGIC
);
if
(
!
obj
)
{
ERR_
(
psdrv
)(
"Rgn is 0. Please report this.
\n
"
);
return
;
}
TRACE_
(
psdrv
)(
"dc=%p"
,
dc
);
if
(
obj
->
rgn
->
numRects
>
0
)
{
INT
i
;
RECT
*
pRect
=
obj
->
rgn
->
rects
;
PSDRV_WriteArrayDef
(
dc
,
szArrayName
,
obj
->
rgn
->
numRects
*
4
);
for
(
i
=
0
;
i
<
obj
->
rgn
->
numRects
;
i
++
,
pRect
++
)
{
PSDRV_WriteArrayPut
(
dc
,
szArrayName
,
i
*
4
,
pRect
->
left
);
PSDRV_WriteArrayPut
(
dc
,
szArrayName
,
i
*
4
+
1
,
pRect
->
top
);
PSDRV_WriteArrayPut
(
dc
,
szArrayName
,
i
*
4
+
2
,
pRect
->
right
-
pRect
->
left
);
PSDRV_WriteArrayPut
(
dc
,
szArrayName
,
i
*
4
+
3
,
pRect
->
bottom
-
pRect
->
top
);
}
}
PSDRV_WriteRectClip
(
dc
,
szArrayName
);
}
graphics/psdrv/init.c
View file @
effc55ea
...
...
@@ -149,10 +149,9 @@ static PSDRV_DEVMODEA DefaultDevmode =
/* dmDriverVersion */
0x001
,
/* dmSize */
sizeof
(
DEVMODEA
),
/* dmDriverExtra */
0
,
/* dmFields */
DM_ORIENTATION
|
DM_PAPERSIZE
|
DM_PAPERLENGTH
|
DM_PAPERWIDTH
|
DM_SCALE
|
DM_COPIES
|
DM_DEFAULTSOURCE
|
DM_COLOR
|
DM_DUPLEX
|
DM_YRESOLUTION
|
DM_TTOPTION
,
/* dmFields */
DM_ORIENTATION
|
DM_PAPERSIZE
|
DM_SCALE
|
DM_COPIES
|
DM_DEFAULTSOURCE
|
DM_COLOR
|
DM_DUPLEX
|
DM_YRESOLUTION
|
DM_TTOPTION
,
{
/* u1 */
{
/* s1 */
/* dmOrientation */
DMORIENT_PORTRAIT
,
...
...
graphics/psdrv/ps.c
View file @
effc55ea
...
...
@@ -161,12 +161,24 @@ static char psclip[] =
static
char
pseoclip
[]
=
"eoclip
\n
"
;
static
char
psrectclip
[]
=
"%s rectclip
\n
"
;
static
char
pshatch
[]
=
"hatch
\n
"
;
static
char
psrotate
[]
=
/* ang */
"%.1f rotate
\n
"
;
static
char
psarrayget
[]
=
"%s %d get
\n
"
;
static
char
psarrayput
[]
=
"%s %d %ld put
\n
"
;
static
char
psarraydef
[]
=
"/%s %d array def
\n
"
;
char
*
PSDRV_ANSIVector
[
256
]
=
{
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
/* 0x00 */
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
...
...
@@ -552,9 +564,6 @@ BOOL PSDRV_WriteSetColor(DC *dc, PSCOLOR *color)
PSDRV_PDEVICE
*
physDev
=
(
PSDRV_PDEVICE
*
)
dc
->
physDev
;
char
buf
[
256
];
if
(
PSDRV_CmpColor
(
&
physDev
->
inkColor
,
color
))
return
TRUE
;
PSDRV_CopyColor
(
&
physDev
->
inkColor
,
color
);
switch
(
color
->
type
)
{
case
PSCOLOR_RGB
:
...
...
@@ -880,6 +889,38 @@ BOOL PSDRV_WriteDIBits32(DC *dc, const BYTE *bits, int number)
return
TRUE
;
}
BOOL
PSDRV_WriteArrayGet
(
DC
*
dc
,
CHAR
*
pszArrayName
,
INT
nIndex
)
{
char
buf
[
100
];
sprintf
(
buf
,
psarrayget
,
pszArrayName
,
nIndex
);
return
PSDRV_WriteSpool
(
dc
,
buf
,
strlen
(
buf
));
}
BOOL
PSDRV_WriteArrayPut
(
DC
*
dc
,
CHAR
*
pszArrayName
,
INT
nIndex
,
LONG
lObject
)
{
char
buf
[
100
];
sprintf
(
buf
,
psarrayput
,
pszArrayName
,
nIndex
,
lObject
);
return
PSDRV_WriteSpool
(
dc
,
buf
,
strlen
(
buf
));
}
BOOL
PSDRV_WriteArrayDef
(
DC
*
dc
,
CHAR
*
pszArrayName
,
INT
nSize
)
{
char
buf
[
100
];
sprintf
(
buf
,
psarraydef
,
pszArrayName
,
nSize
);
return
PSDRV_WriteSpool
(
dc
,
buf
,
strlen
(
buf
));
}
BOOL
PSDRV_WriteRectClip
(
DC
*
dc
,
CHAR
*
pszArrayName
)
{
char
buf
[
100
];
sprintf
(
buf
,
psrectclip
,
pszArrayName
);
return
PSDRV_WriteSpool
(
dc
,
buf
,
strlen
(
buf
));
}
BOOL
PSDRV_WritePatternDict
(
DC
*
dc
,
BITMAP
*
bm
,
BYTE
*
bits
)
{
...
...
include/psdrv.h
View file @
effc55ea
...
...
@@ -288,6 +288,7 @@ extern BOOL PSDRV_WriteGSave(DC *dc);
extern
BOOL
PSDRV_WriteGRestore
(
DC
*
dc
);
extern
BOOL
PSDRV_WriteClosePath
(
DC
*
dc
);
extern
BOOL
PSDRV_WriteClip
(
DC
*
dc
);
extern
BOOL
PSDRV_WriteRectClip
(
DC
*
dc
,
CHAR
*
pszArrayName
);
extern
BOOL
PSDRV_WriteEOClip
(
DC
*
dc
);
extern
BOOL
PSDRV_WriteHatch
(
DC
*
dc
);
extern
BOOL
PSDRV_WriteRotate
(
DC
*
dc
,
float
ang
);
...
...
@@ -303,6 +304,8 @@ extern BOOL PSDRV_WriteDIBits24(DC *dc, const BYTE *bits, int number);
extern
BOOL
PSDRV_WriteDIBits32
(
DC
*
dc
,
const
BYTE
*
bits
,
int
number
);
extern
int
PSDRV_WriteSpool
(
DC
*
dc
,
LPSTR
lpData
,
WORD
cch
);
extern
BOOL
PSDRV_WritePatternDict
(
DC
*
dc
,
BITMAP
*
bm
,
BYTE
*
bits
);
extern
BOOL
PSDRV_WriteArrayPut
(
DC
*
dc
,
CHAR
*
pszArrayName
,
INT
nIndex
,
LONG
lCoord
);
extern
BOOL
PSDRV_WriteArrayDef
(
DC
*
dc
,
CHAR
*
pszArrayName
,
INT
nSize
);
extern
BOOL
PSDRV_Arc
(
DC
*
dc
,
INT
left
,
INT
top
,
INT
right
,
INT
bottom
,
INT
xstart
,
INT
ystart
,
...
...
@@ -343,6 +346,7 @@ extern BOOL PSDRV_RoundRect(DC *dc, INT left, INT top, INT right,
INT
bottom
,
INT
ell_width
,
INT
ell_height
);
extern
HGDIOBJ
PSDRV_SelectObject
(
DC
*
dc
,
HGDIOBJ
handle
);
extern
COLORREF
PSDRV_SetBkColor
(
DC
*
dc
,
COLORREF
color
);
extern
VOID
PSDRV_SetDeviceClipping
(
DC
*
dc
);
extern
COLORREF
PSDRV_SetPixel
(
DC
*
dc
,
INT
x
,
INT
y
,
COLORREF
color
);
extern
COLORREF
PSDRV_SetTextColor
(
DC
*
dc
,
COLORREF
color
);
extern
INT
PSDRV_StretchDIBits
(
DC
*
dc
,
INT
xDst
,
INT
yDst
,
...
...
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