Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e364809a
Commit
e364809a
authored
Dec 28, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add support for 1-pixel wide geometric dashed pens.
parent
bbd7f4e0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
5 deletions
+19
-5
objects.c
dlls/gdi32/dibdrv/objects.c
+19
-5
No files found.
dlls/gdi32/dibdrv/objects.c
View file @
e364809a
...
@@ -1237,15 +1237,22 @@ static BOOL wide_pen_lines(dibdrv_physdev *pdev, int num, POINT *pts, BOOL close
...
@@ -1237,15 +1237,22 @@ static BOOL wide_pen_lines(dibdrv_physdev *pdev, int num, POINT *pts, BOOL close
return
TRUE
;
return
TRUE
;
}
}
static
const
dash_pattern
dash_patterns
[
5
]
=
static
const
dash_pattern
dash_patterns
_cosmetic
[
4
]
=
{
{
{
0
,
{
0
},
0
},
/* PS_SOLID - a pseudo-pattern used to initialise unpatterned pens. */
{
2
,
{
18
,
6
},
24
},
/* PS_DASH */
{
2
,
{
18
,
6
},
24
},
/* PS_DASH */
{
2
,
{
3
,
3
},
6
},
/* PS_DOT */
{
2
,
{
3
,
3
},
6
},
/* PS_DOT */
{
4
,
{
9
,
6
,
3
,
6
},
24
},
/* PS_DASHDOT */
{
4
,
{
9
,
6
,
3
,
6
},
24
},
/* PS_DASHDOT */
{
6
,
{
9
,
3
,
3
,
3
,
3
,
3
},
24
}
/* PS_DASHDOTDOT */
{
6
,
{
9
,
3
,
3
,
3
,
3
,
3
},
24
}
/* PS_DASHDOTDOT */
};
};
static
const
dash_pattern
dash_patterns_geometric
[
4
]
=
{
{
2
,
{
3
,
1
},
4
},
/* PS_DASH */
{
2
,
{
1
,
1
},
2
},
/* PS_DOT */
{
4
,
{
3
,
1
,
1
,
1
},
6
},
/* PS_DASHDOT */
{
6
,
{
3
,
1
,
1
,
1
,
1
,
1
},
8
}
/* PS_DASHDOTDOT */
};
static
inline
int
get_pen_device_width
(
dibdrv_physdev
*
pdev
,
int
width
)
static
inline
int
get_pen_device_width
(
dibdrv_physdev
*
pdev
,
int
width
)
{
{
POINT
pts
[
2
];
POINT
pts
[
2
];
...
@@ -1296,7 +1303,7 @@ HPEN dibdrv_SelectPen( PHYSDEV dev, HPEN hpen )
...
@@ -1296,7 +1303,7 @@ HPEN dibdrv_SelectPen( PHYSDEV dev, HPEN hpen )
logpen
.
lopnColor
=
GetDCPenColor
(
dev
->
hdc
);
logpen
.
lopnColor
=
GetDCPenColor
(
dev
->
hdc
);
pdev
->
pen_colorref
=
logpen
.
lopnColor
;
pdev
->
pen_colorref
=
logpen
.
lopnColor
;
pdev
->
pen_pattern
=
dash_patterns
[
PS_SOLID
]
;
memset
(
&
pdev
->
pen_pattern
,
0
,
sizeof
(
pdev
->
pen_pattern
)
)
;
pdev
->
defer
|=
DEFER_PEN
;
pdev
->
defer
|=
DEFER_PEN
;
...
@@ -1308,11 +1315,18 @@ HPEN dibdrv_SelectPen( PHYSDEV dev, HPEN hpen )
...
@@ -1308,11 +1315,18 @@ HPEN dibdrv_SelectPen( PHYSDEV dev, HPEN hpen )
case
PS_DOT
:
case
PS_DOT
:
case
PS_DASHDOT
:
case
PS_DASHDOT
:
case
PS_DASHDOTDOT
:
case
PS_DASHDOTDOT
:
if
(
logpen
.
lopnStyle
&
PS_GEOMETRIC
)
break
;
if
(
logpen
.
lopnStyle
&
PS_GEOMETRIC
)
{
if
(
pdev
->
pen_width
>
1
)
break
;
/* not supported yet */
pdev
->
pen_lines
=
dashed_pen_lines
;
pdev
->
pen_pattern
=
dash_patterns_geometric
[
pdev
->
pen_style
-
1
];
pdev
->
defer
&=
~
DEFER_PEN
;
break
;
}
if
(
pdev
->
pen_width
==
1
)
/* wide cosmetic pens are not dashed */
if
(
pdev
->
pen_width
==
1
)
/* wide cosmetic pens are not dashed */
{
{
pdev
->
pen_lines
=
dashed_pen_lines
;
pdev
->
pen_lines
=
dashed_pen_lines
;
pdev
->
pen_pattern
=
dash_patterns
[
pdev
->
pen_style
];
pdev
->
pen_pattern
=
dash_patterns
_cosmetic
[
pdev
->
pen_style
-
1
];
pdev
->
defer
&=
~
DEFER_PEN
;
pdev
->
defer
&=
~
DEFER_PEN
;
break
;
break
;
}
}
...
...
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