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
54397f15
Commit
54397f15
authored
May 06, 2011
by
Huw Davies
Committed by
Alexandre Julliard
May 06, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add support for patterned pens.
parent
572e0f01
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
1 deletion
+38
-1
objects.c
dlls/gdi32/dibdrv/objects.c
+30
-1
gdi_private.h
dlls/gdi32/gdi_private.h
+8
-0
No files found.
dlls/gdi32/dibdrv/objects.c
View file @
54397f15
...
...
@@ -544,6 +544,19 @@ static BOOL solid_pen_line(dibdrv_physdev *pdev, POINT *start, POINT *end)
return
TRUE
;
}
static
BOOL
dashed_pen_line
(
dibdrv_physdev
*
pdev
,
POINT
*
start
,
POINT
*
end
)
{
return
FALSE
;
}
static
const
dash_pattern
dash_patterns
[
4
]
=
{
{
2
,
{
18
,
6
},
24
},
/* PS_DASH */
{
2
,
{
3
,
3
},
6
},
/* PS_DOT */
{
4
,
{
9
,
6
,
3
,
6
},
24
},
/* PS_DASHDOT */
{
6
,
{
9
,
3
,
3
,
3
,
3
,
3
},
24
}
/* PS_DASHDOTDOT */
};
/***********************************************************************
* dibdrv_SelectPen
*/
...
...
@@ -552,6 +565,7 @@ HPEN CDECL dibdrv_SelectPen( PHYSDEV dev, HPEN hpen )
PHYSDEV
next
=
GET_NEXT_PHYSDEV
(
dev
,
pSelectPen
);
dibdrv_physdev
*
pdev
=
get_dibdrv_pdev
(
dev
);
LOGPEN
logpen
;
DWORD
style
;
TRACE
(
"(%p, %p)
\n
"
,
dev
,
hpen
);
...
...
@@ -583,14 +597,29 @@ HPEN CDECL dibdrv_SelectPen( PHYSDEV dev, HPEN hpen )
pdev
->
defer
|=
DEFER_PEN
;
switch
(
logpen
.
lopnStyle
&
PS_STYLE_MASK
)
style
=
logpen
.
lopnStyle
&
PS_STYLE_MASK
;
switch
(
style
)
{
case
PS_SOLID
:
if
(
logpen
.
lopnStyle
&
PS_GEOMETRIC
)
break
;
if
(
logpen
.
lopnWidth
.
x
>
1
)
break
;
pdev
->
pen_line
=
solid_pen_line
;
pdev
->
pen_pattern
.
count
=
0
;
pdev
->
defer
&=
~
DEFER_PEN
;
break
;
case
PS_DASH
:
case
PS_DOT
:
case
PS_DASHDOT
:
case
PS_DASHDOTDOT
:
if
(
logpen
.
lopnStyle
&
PS_GEOMETRIC
)
break
;
if
(
logpen
.
lopnWidth
.
x
>
1
)
break
;
pdev
->
pen_line
=
dashed_pen_line
;
pdev
->
pen_pattern
=
dash_patterns
[
style
-
PS_DASH
];
pdev
->
defer
&=
~
DEFER_PEN
;
break
;
default:
break
;
}
...
...
dlls/gdi32/gdi_private.h
View file @
54397f15
...
...
@@ -92,6 +92,13 @@ typedef struct
const
struct
primitive_funcs
*
funcs
;
}
dib_info
;
typedef
struct
{
DWORD
count
;
DWORD
dashes
[
16
];
/* 16 is the maximium number for a PS_USERSTYLE pen */
DWORD
total_len
;
/* total length of the dashes, should be multiplied by 2 if there are an odd number of dash lengths */
}
dash_pattern
;
typedef
struct
dibdrv_physdev
{
struct
gdi_physdev
dev
;
...
...
@@ -103,6 +110,7 @@ typedef struct dibdrv_physdev
/* pen */
DWORD
pen_color
,
pen_and
,
pen_xor
;
BOOL
(
*
pen_line
)(
struct
dibdrv_physdev
*
pdev
,
POINT
*
start
,
POINT
*
end
);
dash_pattern
pen_pattern
;
/* brush */
UINT
brush_style
;
...
...
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