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)
PSDRV_WriteMoveTo
(
dc
,
XLPTODP
(
dc
,
dc
->
w
.
CursPosX
),
YLPTODP
(
dc
,
dc
->
w
.
CursPosY
));
PSDRV_WriteLineTo
(
dc
,
XLPTODP
(
dc
,
x
),
YLPTODP
(
dc
,
y
));
PSDRV_
WriteStrok
e
(
dc
);
PSDRV_
DrawLin
e
(
dc
);
dc
->
w
.
CursPosX
=
x
;
dc
->
w
.
CursPosY
=
y
;
...
...
@@ -73,7 +73,7 @@ BOOL PSDRV_Rectangle( DC *dc, INT left, INT top, INT right,
PSDRV_Brush
(
dc
,
0
);
PSDRV_SetPen
(
dc
);
PSDRV_
WriteStrok
e
(
dc
);
PSDRV_
DrawLin
e
(
dc
);
return
TRUE
;
}
...
...
@@ -113,7 +113,7 @@ BOOL PSDRV_RoundRect( DC *dc, INT left, INT top, INT right,
PSDRV_Brush
(
dc
,
0
);
PSDRV_SetPen
(
dc
);
PSDRV_
WriteStrok
e
(
dc
);
PSDRV_
DrawLin
e
(
dc
);
return
TRUE
;
}
...
...
@@ -161,7 +161,7 @@ static BOOL PSDRV_DrawArc( DC *dc, INT left, INT top,
PSDRV_Brush
(
dc
,
0
);
}
PSDRV_SetPen
(
dc
);
PSDRV_
WriteStrok
e
(
dc
);
PSDRV_
DrawLin
e
(
dc
);
return
TRUE
;
}
...
...
@@ -213,11 +213,12 @@ BOOL PSDRV_Ellipse( DC *dc, INT left, INT top, INT right, INT bottom)
w
=
XLSTODS
(
dc
,
(
right
-
left
));
h
=
YLSTODS
(
dc
,
(
bottom
-
top
));
PSDRV_WriteNewPath
(
dc
);
PSDRV_WriteArc
(
dc
,
x
,
y
,
w
,
h
,
0
.
0
,
360
.
0
);
PSDRV_WriteClosePath
(
dc
);
PSDRV_Brush
(
dc
,
0
);
PSDRV_SetPen
(
dc
);
PSDRV_
WriteStrok
e
(
dc
);
PSDRV_
DrawLin
e
(
dc
);
return
TRUE
;
}
...
...
@@ -242,7 +243,7 @@ BOOL PSDRV_PolyPolyline( DC *dc, const POINT* pts, const DWORD* counts,
}
}
PSDRV_SetPen
(
dc
);
PSDRV_
WriteStrok
e
(
dc
);
PSDRV_
DrawLin
e
(
dc
);
return
TRUE
;
}
...
...
@@ -282,7 +283,7 @@ BOOL PSDRV_PolyPolygon( DC *dc, const POINT* pts, const INT* counts,
else
/* WINDING */
PSDRV_Brush
(
dc
,
0
);
PSDRV_SetPen
(
dc
);
PSDRV_
WriteStrok
e
(
dc
);
PSDRV_
DrawLin
e
(
dc
);
return
TRUE
;
}
...
...
@@ -313,3 +314,17 @@ COLORREF PSDRV_SetPixel( DC *dc, INT x, INT y, COLORREF color )
PSDRV_WriteFill
(
dc
);
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 )
physDev
->
pen
.
width
=
-
physDev
->
pen
.
width
;
PSDRV_CreateColor
(
physDev
,
&
physDev
->
pen
.
color
,
pen
->
logpen
.
lopnColor
);
if
(
physDev
->
pen
.
width
>
1
)
{
/* dashes only for 0 or 1 pixel pens */
physDev
->
pen
.
dash
=
NULL
;
}
else
{
switch
(
pen
->
logpen
.
lopnStyle
&
PS_STYLE_MASK
)
{
case
PS_DASH
:
physDev
->
pen
.
dash
=
PEN_dash
;
break
;
case
PS_DOT
:
physDev
->
pen
.
dash
=
PEN_dot
;
break
;
case
PS_DASHDOT
:
physDev
->
pen
.
dash
=
PEN_dashdot
;
break
;
case
PS_DASHDOTDOT
:
physDev
->
pen
.
dash
=
PEN_dashdotdot
;
break
;
case
PS_ALTERNATE
:
physDev
->
pen
.
dash
=
PEN_alternate
;
break
;
default:
physDev
->
pen
.
dash
=
NULL
;
break
;
}
}
physDev
->
pen
.
style
=
pen
->
logpen
.
lopnStyle
&
PS_STYLE_MASK
;
switch
(
physDev
->
pen
.
style
)
{
case
PS_DASH
:
physDev
->
pen
.
dash
=
PEN_dash
;
break
;
case
PS_DOT
:
physDev
->
pen
.
dash
=
PEN_dot
;
break
;
case
PS_DASHDOT
:
physDev
->
pen
.
dash
=
PEN_dashdot
;
break
;
case
PS_DASHDOTDOT
:
physDev
->
pen
.
dash
=
PEN_dashdotdot
;
break
;
case
PS_ALTERNATE
:
physDev
->
pen
.
dash
=
PEN_alternate
;
break
;
default:
physDev
->
pen
.
dash
=
NULL
;
}
if
((
physDev
->
pen
.
width
>
1
)
&&
(
physDev
->
pen
.
dash
!=
NULL
))
{
physDev
->
pen
.
style
=
PS_SOLID
;
physDev
->
pen
.
dash
=
NULL
;
}
physDev
->
pen
.
set
=
FALSE
;
return
prevpen
;
...
...
@@ -78,11 +79,13 @@ BOOL PSDRV_SetPen(DC *dc)
{
PSDRV_PDEVICE
*
physDev
=
(
PSDRV_PDEVICE
*
)
dc
->
physDev
;
PSDRV_WriteSetColor
(
dc
,
&
physDev
->
pen
.
color
);
if
(
!
physDev
->
pen
.
set
)
{
PSDRV_WriteSetPen
(
dc
);
physDev
->
pen
.
set
=
TRUE
;
if
(
physDev
->
pen
.
style
!=
PS_NULL
)
{
PSDRV_WriteSetColor
(
dc
,
&
physDev
->
pen
.
color
);
if
(
!
physDev
->
pen
.
set
)
{
PSDRV_WriteSetPen
(
dc
);
physDev
->
pen
.
set
=
TRUE
;
}
}
return
TRUE
;
...
...
include/psdrv.h
View file @
3471f0f5
...
...
@@ -205,6 +205,7 @@ typedef struct {
}
PSBRUSH
;
typedef
struct
{
INT
style
;
INT
width
;
char
*
dash
;
PSCOLOR
color
;
...
...
@@ -369,7 +370,7 @@ extern DWORD PSDRV_DeviceCapabilities(LPSTR lpszDriver, LPCSTR lpszDevice,
LPCSTR
lpszPort
,
WORD
fwCapability
,
LPSTR
lpszOutput
,
LPDEVMODEA
lpdm
);
VOID
PSDRV_DrawLine
(
DC
*
dc
);
#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