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
3471f0f5
Commit
3471f0f5
authored
Sep 19, 1999
by
Luc Tourangeau
Committed by
Alexandre Julliard
Sep 19, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented invisible pens.
parent
1bb98605
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
43 deletions
+62
-43
graphics.c
graphics/psdrv/graphics.c
+22
-7
pen.c
graphics/psdrv/pen.c
+38
-35
psdrv.h
include/psdrv.h
+2
-1
No files found.
graphics/psdrv/graphics.c
View file @
3471f0f5
...
@@ -48,7 +48,7 @@ BOOL PSDRV_LineTo(DC *dc, INT x, INT y)
...
@@ -48,7 +48,7 @@ BOOL PSDRV_LineTo(DC *dc, INT x, INT y)
PSDRV_WriteMoveTo
(
dc
,
XLPTODP
(
dc
,
dc
->
w
.
CursPosX
),
PSDRV_WriteMoveTo
(
dc
,
XLPTODP
(
dc
,
dc
->
w
.
CursPosX
),
YLPTODP
(
dc
,
dc
->
w
.
CursPosY
));
YLPTODP
(
dc
,
dc
->
w
.
CursPosY
));
PSDRV_WriteLineTo
(
dc
,
XLPTODP
(
dc
,
x
),
YLPTODP
(
dc
,
y
));
PSDRV_WriteLineTo
(
dc
,
XLPTODP
(
dc
,
x
),
YLPTODP
(
dc
,
y
));
PSDRV_
WriteStrok
e
(
dc
);
PSDRV_
DrawLin
e
(
dc
);
dc
->
w
.
CursPosX
=
x
;
dc
->
w
.
CursPosX
=
x
;
dc
->
w
.
CursPosY
=
y
;
dc
->
w
.
CursPosY
=
y
;
...
@@ -73,7 +73,7 @@ BOOL PSDRV_Rectangle( DC *dc, INT left, INT top, INT right,
...
@@ -73,7 +73,7 @@ BOOL PSDRV_Rectangle( DC *dc, INT left, INT top, INT right,
PSDRV_Brush
(
dc
,
0
);
PSDRV_Brush
(
dc
,
0
);
PSDRV_SetPen
(
dc
);
PSDRV_SetPen
(
dc
);
PSDRV_
WriteStrok
e
(
dc
);
PSDRV_
DrawLin
e
(
dc
);
return
TRUE
;
return
TRUE
;
}
}
...
@@ -113,7 +113,7 @@ BOOL PSDRV_RoundRect( DC *dc, INT left, INT top, INT right,
...
@@ -113,7 +113,7 @@ BOOL PSDRV_RoundRect( DC *dc, INT left, INT top, INT right,
PSDRV_Brush
(
dc
,
0
);
PSDRV_Brush
(
dc
,
0
);
PSDRV_SetPen
(
dc
);
PSDRV_SetPen
(
dc
);
PSDRV_
WriteStrok
e
(
dc
);
PSDRV_
DrawLin
e
(
dc
);
return
TRUE
;
return
TRUE
;
}
}
...
@@ -161,7 +161,7 @@ static BOOL PSDRV_DrawArc( DC *dc, INT left, INT top,
...
@@ -161,7 +161,7 @@ static BOOL PSDRV_DrawArc( DC *dc, INT left, INT top,
PSDRV_Brush
(
dc
,
0
);
PSDRV_Brush
(
dc
,
0
);
}
}
PSDRV_SetPen
(
dc
);
PSDRV_SetPen
(
dc
);
PSDRV_
WriteStrok
e
(
dc
);
PSDRV_
DrawLin
e
(
dc
);
return
TRUE
;
return
TRUE
;
}
}
...
@@ -213,11 +213,12 @@ BOOL PSDRV_Ellipse( DC *dc, INT left, INT top, INT right, INT bottom)
...
@@ -213,11 +213,12 @@ BOOL PSDRV_Ellipse( DC *dc, INT left, INT top, INT right, INT bottom)
w
=
XLSTODS
(
dc
,
(
right
-
left
));
w
=
XLSTODS
(
dc
,
(
right
-
left
));
h
=
YLSTODS
(
dc
,
(
bottom
-
top
));
h
=
YLSTODS
(
dc
,
(
bottom
-
top
));
PSDRV_WriteNewPath
(
dc
);
PSDRV_WriteArc
(
dc
,
x
,
y
,
w
,
h
,
0
.
0
,
360
.
0
);
PSDRV_WriteArc
(
dc
,
x
,
y
,
w
,
h
,
0
.
0
,
360
.
0
);
PSDRV_WriteClosePath
(
dc
);
PSDRV_WriteClosePath
(
dc
);
PSDRV_Brush
(
dc
,
0
);
PSDRV_Brush
(
dc
,
0
);
PSDRV_SetPen
(
dc
);
PSDRV_SetPen
(
dc
);
PSDRV_
WriteStrok
e
(
dc
);
PSDRV_
DrawLin
e
(
dc
);
return
TRUE
;
return
TRUE
;
}
}
...
@@ -242,7 +243,7 @@ BOOL PSDRV_PolyPolyline( DC *dc, const POINT* pts, const DWORD* counts,
...
@@ -242,7 +243,7 @@ BOOL PSDRV_PolyPolyline( DC *dc, const POINT* pts, const DWORD* counts,
}
}
}
}
PSDRV_SetPen
(
dc
);
PSDRV_SetPen
(
dc
);
PSDRV_
WriteStrok
e
(
dc
);
PSDRV_
DrawLin
e
(
dc
);
return
TRUE
;
return
TRUE
;
}
}
...
@@ -282,7 +283,7 @@ BOOL PSDRV_PolyPolygon( DC *dc, const POINT* pts, const INT* counts,
...
@@ -282,7 +283,7 @@ BOOL PSDRV_PolyPolygon( DC *dc, const POINT* pts, const INT* counts,
else
/* WINDING */
else
/* WINDING */
PSDRV_Brush
(
dc
,
0
);
PSDRV_Brush
(
dc
,
0
);
PSDRV_SetPen
(
dc
);
PSDRV_SetPen
(
dc
);
PSDRV_
WriteStrok
e
(
dc
);
PSDRV_
DrawLin
e
(
dc
);
return
TRUE
;
return
TRUE
;
}
}
...
@@ -313,3 +314,17 @@ COLORREF PSDRV_SetPixel( DC *dc, INT x, INT y, COLORREF color )
...
@@ -313,3 +314,17 @@ COLORREF PSDRV_SetPixel( DC *dc, INT x, INT y, COLORREF color )
PSDRV_WriteFill
(
dc
);
PSDRV_WriteFill
(
dc
);
return
color
;
return
color
;
}
}
/***********************************************************************
* PSDRV_DrawLine
*/
VOID
PSDRV_DrawLine
(
DC
*
dc
)
{
PSDRV_PDEVICE
*
physDev
=
(
PSDRV_PDEVICE
*
)
dc
->
physDev
;
if
(
physDev
->
pen
.
style
==
PS_NULL
)
PSDRV_WriteNewPath
(
dc
);
else
PSDRV_WriteStroke
(
dc
);
}
graphics/psdrv/pen.c
View file @
3471f0f5
...
@@ -33,36 +33,37 @@ extern HPEN PSDRV_PEN_SelectObject( DC * dc, HPEN hpen, PENOBJ * pen )
...
@@ -33,36 +33,37 @@ extern HPEN PSDRV_PEN_SelectObject( DC * dc, HPEN hpen, PENOBJ * pen )
physDev
->
pen
.
width
=
-
physDev
->
pen
.
width
;
physDev
->
pen
.
width
=
-
physDev
->
pen
.
width
;
PSDRV_CreateColor
(
physDev
,
&
physDev
->
pen
.
color
,
pen
->
logpen
.
lopnColor
);
PSDRV_CreateColor
(
physDev
,
&
physDev
->
pen
.
color
,
pen
->
logpen
.
lopnColor
);
physDev
->
pen
.
style
=
pen
->
logpen
.
lopnStyle
&
PS_STYLE_MASK
;
if
(
physDev
->
pen
.
width
>
1
)
{
/* dashes only for 0 or 1 pixel pens */
physDev
->
pen
.
dash
=
NULL
;
switch
(
physDev
->
pen
.
style
)
{
}
else
{
case
PS_DASH
:
switch
(
pen
->
logpen
.
lopnStyle
&
PS_STYLE_MASK
)
{
physDev
->
pen
.
dash
=
PEN_dash
;
case
PS_DASH
:
break
;
physDev
->
pen
.
dash
=
PEN_dash
;
break
;
case
PS_DOT
:
physDev
->
pen
.
dash
=
PEN_dot
;
case
PS_DOT
:
break
;
physDev
->
pen
.
dash
=
PEN_dot
;
break
;
case
PS_DASHDOT
:
physDev
->
pen
.
dash
=
PEN_dashdot
;
case
PS_DASHDOT
:
break
;
physDev
->
pen
.
dash
=
PEN_dashdot
;
break
;
case
PS_DASHDOTDOT
:
physDev
->
pen
.
dash
=
PEN_dashdotdot
;
case
PS_DASHDOTDOT
:
break
;
physDev
->
pen
.
dash
=
PEN_dashdotdot
;
break
;
case
PS_ALTERNATE
:
physDev
->
pen
.
dash
=
PEN_alternate
;
case
PS_ALTERNATE
:
break
;
physDev
->
pen
.
dash
=
PEN_alternate
;
break
;
default:
physDev
->
pen
.
dash
=
NULL
;
default:
}
physDev
->
pen
.
dash
=
NULL
;
break
;
if
((
physDev
->
pen
.
width
>
1
)
&&
(
physDev
->
pen
.
dash
!=
NULL
))
{
}
physDev
->
pen
.
style
=
PS_SOLID
;
}
physDev
->
pen
.
dash
=
NULL
;
}
physDev
->
pen
.
set
=
FALSE
;
physDev
->
pen
.
set
=
FALSE
;
return
prevpen
;
return
prevpen
;
...
@@ -78,11 +79,13 @@ BOOL PSDRV_SetPen(DC *dc)
...
@@ -78,11 +79,13 @@ BOOL PSDRV_SetPen(DC *dc)
{
{
PSDRV_PDEVICE
*
physDev
=
(
PSDRV_PDEVICE
*
)
dc
->
physDev
;
PSDRV_PDEVICE
*
physDev
=
(
PSDRV_PDEVICE
*
)
dc
->
physDev
;
PSDRV_WriteSetColor
(
dc
,
&
physDev
->
pen
.
color
);
if
(
physDev
->
pen
.
style
!=
PS_NULL
)
{
PSDRV_WriteSetColor
(
dc
,
&
physDev
->
pen
.
color
);
if
(
!
physDev
->
pen
.
set
)
{
PSDRV_WriteSetPen
(
dc
);
if
(
!
physDev
->
pen
.
set
)
{
physDev
->
pen
.
set
=
TRUE
;
PSDRV_WriteSetPen
(
dc
);
physDev
->
pen
.
set
=
TRUE
;
}
}
}
return
TRUE
;
return
TRUE
;
...
...
include/psdrv.h
View file @
3471f0f5
...
@@ -205,6 +205,7 @@ typedef struct {
...
@@ -205,6 +205,7 @@ typedef struct {
}
PSBRUSH
;
}
PSBRUSH
;
typedef
struct
{
typedef
struct
{
INT
style
;
INT
width
;
INT
width
;
char
*
dash
;
char
*
dash
;
PSCOLOR
color
;
PSCOLOR
color
;
...
@@ -369,7 +370,7 @@ extern DWORD PSDRV_DeviceCapabilities(LPSTR lpszDriver, LPCSTR lpszDevice,
...
@@ -369,7 +370,7 @@ extern DWORD PSDRV_DeviceCapabilities(LPSTR lpszDriver, LPCSTR lpszDevice,
LPCSTR
lpszPort
,
LPCSTR
lpszPort
,
WORD
fwCapability
,
LPSTR
lpszOutput
,
WORD
fwCapability
,
LPSTR
lpszOutput
,
LPDEVMODEA
lpdm
);
LPDEVMODEA
lpdm
);
VOID
PSDRV_DrawLine
(
DC
*
dc
);
#endif
#endif
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