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
0f40ad8a
Commit
0f40ad8a
authored
Aug 19, 2011
by
Huw Davies
Committed by
Alexandre Julliard
Aug 22, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Move to using a multi-line pen object-level function.
parent
1e83fd00
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
11 deletions
+33
-11
graphics.c
dlls/gdi32/dibdrv/graphics.c
+4
-6
objects.c
dlls/gdi32/dibdrv/objects.c
+28
-4
gdi_private.h
dlls/gdi32/gdi_private.h
+1
-1
No files found.
dlls/gdi32/dibdrv/graphics.c
View file @
0f40ad8a
...
@@ -73,7 +73,7 @@ BOOL dibdrv_LineTo( PHYSDEV dev, INT x, INT y )
...
@@ -73,7 +73,7 @@ BOOL dibdrv_LineTo( PHYSDEV dev, INT x, INT y )
reset_dash_origin
(
pdev
);
reset_dash_origin
(
pdev
);
if
(
defer_pen
(
pdev
)
||
!
pdev
->
pen_line
(
pdev
,
pts
,
pts
+
1
))
if
(
defer_pen
(
pdev
)
||
!
pdev
->
pen_line
s
(
pdev
,
2
,
pts
))
return
next
->
funcs
->
pLineTo
(
next
,
x
,
y
);
return
next
->
funcs
->
pLineTo
(
next
,
x
,
y
);
return
TRUE
;
return
TRUE
;
...
@@ -154,7 +154,7 @@ BOOL dibdrv_Rectangle( PHYSDEV dev, INT left, INT top, INT right, INT bottom )
...
@@ -154,7 +154,7 @@ BOOL dibdrv_Rectangle( PHYSDEV dev, INT left, INT top, INT right, INT bottom )
PHYSDEV
next
=
GET_NEXT_PHYSDEV
(
dev
,
pRectangle
);
PHYSDEV
next
=
GET_NEXT_PHYSDEV
(
dev
,
pRectangle
);
dibdrv_physdev
*
pdev
=
get_dibdrv_pdev
(
dev
);
dibdrv_physdev
*
pdev
=
get_dibdrv_pdev
(
dev
);
RECT
rect
=
get_device_rect
(
dev
->
hdc
,
left
,
top
,
right
,
bottom
,
TRUE
);
RECT
rect
=
get_device_rect
(
dev
->
hdc
,
left
,
top
,
right
,
bottom
,
TRUE
);
POINT
pts
[
4
];
POINT
pts
[
5
];
TRACE
(
"(%p, %d, %d, %d, %d)
\n
"
,
dev
,
left
,
top
,
right
,
bottom
);
TRACE
(
"(%p, %d, %d, %d, %d)
\n
"
,
dev
,
left
,
top
,
right
,
bottom
);
...
@@ -170,11 +170,9 @@ BOOL dibdrv_Rectangle( PHYSDEV dev, INT left, INT top, INT right, INT bottom )
...
@@ -170,11 +170,9 @@ BOOL dibdrv_Rectangle( PHYSDEV dev, INT left, INT top, INT right, INT bottom )
pts
[
0
].
y
=
pts
[
1
].
y
=
rect
.
top
;
pts
[
0
].
y
=
pts
[
1
].
y
=
rect
.
top
;
pts
[
1
].
x
=
pts
[
2
].
x
=
rect
.
left
;
pts
[
1
].
x
=
pts
[
2
].
x
=
rect
.
left
;
pts
[
2
].
y
=
pts
[
3
].
y
=
rect
.
bottom
-
1
;
pts
[
2
].
y
=
pts
[
3
].
y
=
rect
.
bottom
-
1
;
pts
[
4
]
=
pts
[
0
];
pdev
->
pen_line
(
pdev
,
pts
,
pts
+
1
);
pdev
->
pen_lines
(
pdev
,
5
,
pts
);
pdev
->
pen_line
(
pdev
,
pts
+
1
,
pts
+
2
);
pdev
->
pen_line
(
pdev
,
pts
+
2
,
pts
+
3
);
pdev
->
pen_line
(
pdev
,
pts
+
3
,
pts
);
/* FIXME: Will need updating when we support wide pens */
/* FIXME: Will need updating when we support wide pens */
...
...
dlls/gdi32/dibdrv/objects.c
View file @
0f40ad8a
...
@@ -647,6 +647,18 @@ static BOOL solid_pen_line(dibdrv_physdev *pdev, POINT *start, POINT *end)
...
@@ -647,6 +647,18 @@ static BOOL solid_pen_line(dibdrv_physdev *pdev, POINT *start, POINT *end)
return
TRUE
;
return
TRUE
;
}
}
static
BOOL
solid_pen_lines
(
dibdrv_physdev
*
pdev
,
int
num
,
POINT
*
pts
)
{
int
i
;
assert
(
num
>=
2
);
for
(
i
=
0
;
i
<
num
-
1
;
i
++
)
if
(
!
solid_pen_line
(
pdev
,
pts
+
i
,
pts
+
i
+
1
))
return
FALSE
;
return
TRUE
;
}
void
reset_dash_origin
(
dibdrv_physdev
*
pdev
)
void
reset_dash_origin
(
dibdrv_physdev
*
pdev
)
{
{
pdev
->
dash_pos
.
cur_dash
=
0
;
pdev
->
dash_pos
.
cur_dash
=
0
;
...
@@ -920,7 +932,19 @@ static BOOL dashed_pen_line(dibdrv_physdev *pdev, POINT *start, POINT *end)
...
@@ -920,7 +932,19 @@ static BOOL dashed_pen_line(dibdrv_physdev *pdev, POINT *start, POINT *end)
return
TRUE
;
return
TRUE
;
}
}
static
BOOL
null_pen_line
(
dibdrv_physdev
*
pdev
,
POINT
*
start
,
POINT
*
end
)
static
BOOL
dashed_pen_lines
(
dibdrv_physdev
*
pdev
,
int
num
,
POINT
*
pts
)
{
int
i
;
assert
(
num
>=
2
);
for
(
i
=
0
;
i
<
num
-
1
;
i
++
)
if
(
!
dashed_pen_line
(
pdev
,
pts
+
i
,
pts
+
i
+
1
))
return
FALSE
;
return
TRUE
;
}
static
BOOL
null_pen_lines
(
dibdrv_physdev
*
pdev
,
int
num
,
POINT
*
pts
)
{
{
return
TRUE
;
return
TRUE
;
}
}
...
@@ -984,7 +1008,7 @@ HPEN dibdrv_SelectPen( PHYSDEV dev, HPEN hpen )
...
@@ -984,7 +1008,7 @@ HPEN dibdrv_SelectPen( PHYSDEV dev, HPEN hpen )
case
PS_SOLID
:
case
PS_SOLID
:
if
(
logpen
.
lopnStyle
&
PS_GEOMETRIC
)
break
;
if
(
logpen
.
lopnStyle
&
PS_GEOMETRIC
)
break
;
if
(
logpen
.
lopnWidth
.
x
>
1
)
break
;
if
(
logpen
.
lopnWidth
.
x
>
1
)
break
;
pdev
->
pen_line
=
solid_pen_line
;
pdev
->
pen_line
s
=
solid_pen_lines
;
pdev
->
defer
&=
~
DEFER_PEN
;
pdev
->
defer
&=
~
DEFER_PEN
;
break
;
break
;
...
@@ -994,13 +1018,13 @@ HPEN dibdrv_SelectPen( PHYSDEV dev, HPEN hpen )
...
@@ -994,13 +1018,13 @@ HPEN dibdrv_SelectPen( PHYSDEV dev, HPEN hpen )
case
PS_DASHDOTDOT
:
case
PS_DASHDOTDOT
:
if
(
logpen
.
lopnStyle
&
PS_GEOMETRIC
)
break
;
if
(
logpen
.
lopnStyle
&
PS_GEOMETRIC
)
break
;
if
(
logpen
.
lopnWidth
.
x
>
1
)
break
;
if
(
logpen
.
lopnWidth
.
x
>
1
)
break
;
pdev
->
pen_line
=
dashed_pen_line
;
pdev
->
pen_line
s
=
dashed_pen_lines
;
pdev
->
pen_pattern
=
dash_patterns
[
style
];
pdev
->
pen_pattern
=
dash_patterns
[
style
];
pdev
->
defer
&=
~
DEFER_PEN
;
pdev
->
defer
&=
~
DEFER_PEN
;
break
;
break
;
case
PS_NULL
:
case
PS_NULL
:
pdev
->
pen_line
=
null_pen_line
;
pdev
->
pen_line
s
=
null_pen_lines
;
pdev
->
defer
&=
~
DEFER_PEN
;
pdev
->
defer
&=
~
DEFER_PEN
;
break
;
break
;
...
...
dlls/gdi32/gdi_private.h
View file @
0f40ad8a
...
@@ -136,7 +136,7 @@ typedef struct dibdrv_physdev
...
@@ -136,7 +136,7 @@ typedef struct dibdrv_physdev
DWORD
pen_color
,
pen_and
,
pen_xor
;
DWORD
pen_color
,
pen_and
,
pen_xor
;
dash_pattern
pen_pattern
;
dash_pattern
pen_pattern
;
dash_pos
dash_pos
;
dash_pos
dash_pos
;
BOOL
(
*
pen_line
)(
struct
dibdrv_physdev
*
pdev
,
POINT
*
start
,
POINT
*
end
);
BOOL
(
*
pen_line
s
)(
struct
dibdrv_physdev
*
pdev
,
int
num
,
POINT
*
pts
);
/* brush */
/* brush */
UINT
brush_style
;
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