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
224e51fc
Commit
224e51fc
authored
Nov 24, 2011
by
Huw Davies
Committed by
Alexandre Julliard
Nov 24, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add an option to allow pen_lines to draw a closed figure.
parent
8342d504
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
10 deletions
+13
-10
dibdrv.h
dlls/gdi32/dibdrv/dibdrv.h
+1
-1
graphics.c
dlls/gdi32/dibdrv/graphics.c
+5
-6
objects.c
dlls/gdi32/dibdrv/objects.c
+7
-3
No files found.
dlls/gdi32/dibdrv/dibdrv.h
View file @
224e51fc
...
...
@@ -87,7 +87,7 @@ typedef struct dibdrv_physdev
DWORD
pen_color
,
pen_and
,
pen_xor
;
dash_pattern
pen_pattern
;
dash_pos
dash_pos
;
BOOL
(
*
pen_lines
)(
struct
dibdrv_physdev
*
pdev
,
int
num
,
POINT
*
pts
);
BOOL
(
*
pen_lines
)(
struct
dibdrv_physdev
*
pdev
,
int
num
,
POINT
*
pts
,
BOOL
close
);
/* brush */
UINT
brush_style
;
...
...
dlls/gdi32/dibdrv/graphics.c
View file @
224e51fc
...
...
@@ -431,7 +431,7 @@ BOOL dibdrv_LineTo( PHYSDEV dev, INT x, INT y )
reset_dash_origin
(
pdev
);
if
(
defer_pen
(
pdev
)
||
!
pdev
->
pen_lines
(
pdev
,
2
,
pts
))
if
(
defer_pen
(
pdev
)
||
!
pdev
->
pen_lines
(
pdev
,
2
,
pts
,
FALSE
))
return
next
->
funcs
->
pLineTo
(
next
,
x
,
y
);
return
TRUE
;
...
...
@@ -528,7 +528,7 @@ BOOL dibdrv_PolyPolyline( PHYSDEV dev, const POINT* pt, const DWORD* counts, DWO
LPtoDP
(
dev
->
hdc
,
points
,
counts
[
i
]
);
reset_dash_origin
(
pdev
);
pdev
->
pen_lines
(
pdev
,
counts
[
i
],
points
);
pdev
->
pen_lines
(
pdev
,
counts
[
i
],
points
,
FALSE
);
}
HeapFree
(
GetProcessHeap
(),
0
,
points
);
...
...
@@ -553,7 +553,7 @@ BOOL dibdrv_Polyline( PHYSDEV dev, const POINT* pt, INT count )
LPtoDP
(
dev
->
hdc
,
points
,
count
);
reset_dash_origin
(
pdev
);
pdev
->
pen_lines
(
pdev
,
count
,
points
);
pdev
->
pen_lines
(
pdev
,
count
,
points
,
FALSE
);
HeapFree
(
GetProcessHeap
(),
0
,
points
);
return
TRUE
;
...
...
@@ -567,7 +567,7 @@ BOOL dibdrv_Rectangle( PHYSDEV dev, INT left, INT top, INT right, INT bottom )
PHYSDEV
next
=
GET_NEXT_PHYSDEV
(
dev
,
pRectangle
);
dibdrv_physdev
*
pdev
=
get_dibdrv_pdev
(
dev
);
RECT
rect
=
get_device_rect
(
dev
->
hdc
,
left
,
top
,
right
,
bottom
,
TRUE
);
POINT
pts
[
5
];
POINT
pts
[
4
];
TRACE
(
"(%p, %d, %d, %d, %d)
\n
"
,
dev
,
left
,
top
,
right
,
bottom
);
...
...
@@ -583,9 +583,8 @@ BOOL dibdrv_Rectangle( PHYSDEV dev, INT left, INT top, INT right, INT bottom )
pts
[
0
].
y
=
pts
[
1
].
y
=
rect
.
top
;
pts
[
1
].
x
=
pts
[
2
].
x
=
rect
.
left
;
pts
[
2
].
y
=
pts
[
3
].
y
=
rect
.
bottom
-
1
;
pts
[
4
]
=
pts
[
0
];
pdev
->
pen_lines
(
pdev
,
5
,
pts
);
pdev
->
pen_lines
(
pdev
,
4
,
pts
,
TRUE
);
/* FIXME: Will need updating when we support wide pens */
...
...
dlls/gdi32/dibdrv/objects.c
View file @
224e51fc
...
...
@@ -696,7 +696,7 @@ static BOOL solid_pen_line(dibdrv_physdev *pdev, POINT *start, POINT *end)
return
TRUE
;
}
static
BOOL
solid_pen_lines
(
dibdrv_physdev
*
pdev
,
int
num
,
POINT
*
pts
)
static
BOOL
solid_pen_lines
(
dibdrv_physdev
*
pdev
,
int
num
,
POINT
*
pts
,
BOOL
close
)
{
int
i
;
...
...
@@ -705,6 +705,8 @@ static BOOL solid_pen_lines(dibdrv_physdev *pdev, int num, POINT *pts)
if
(
!
solid_pen_line
(
pdev
,
pts
+
i
,
pts
+
i
+
1
))
return
FALSE
;
if
(
close
)
return
solid_pen_line
(
pdev
,
pts
+
num
-
1
,
pts
);
return
TRUE
;
}
...
...
@@ -996,7 +998,7 @@ static BOOL dashed_pen_line(dibdrv_physdev *pdev, POINT *start, POINT *end)
return
TRUE
;
}
static
BOOL
dashed_pen_lines
(
dibdrv_physdev
*
pdev
,
int
num
,
POINT
*
pts
)
static
BOOL
dashed_pen_lines
(
dibdrv_physdev
*
pdev
,
int
num
,
POINT
*
pts
,
BOOL
close
)
{
int
i
;
...
...
@@ -1005,10 +1007,12 @@ static BOOL dashed_pen_lines(dibdrv_physdev *pdev, int num, POINT *pts)
if
(
!
dashed_pen_line
(
pdev
,
pts
+
i
,
pts
+
i
+
1
))
return
FALSE
;
if
(
close
)
return
dashed_pen_line
(
pdev
,
pts
+
num
-
1
,
pts
);
return
TRUE
;
}
static
BOOL
null_pen_lines
(
dibdrv_physdev
*
pdev
,
int
num
,
POINT
*
pts
)
static
BOOL
null_pen_lines
(
dibdrv_physdev
*
pdev
,
int
num
,
POINT
*
pts
,
BOOL
close
)
{
return
TRUE
;
}
...
...
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