Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
224e51fc
Commit
224e51fc
authored
13 years ago
by
Huw Davies
Committed by
Alexandre Julliard
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
gdi32: Add an option to allow pen_lines to draw a closed figure.
parent
8342d504
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/gdi32/dibdrv/dibdrv.h
+1
-1
1 addition, 1 deletion
dlls/gdi32/dibdrv/dibdrv.h
dlls/gdi32/dibdrv/graphics.c
+5
-6
5 additions, 6 deletions
dlls/gdi32/dibdrv/graphics.c
dlls/gdi32/dibdrv/objects.c
+7
-3
7 additions, 3 deletions
dlls/gdi32/dibdrv/objects.c
with
13 additions
and
10 deletions
dlls/gdi32/dibdrv/dibdrv.h
+
1
−
1
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
;
...
...
This diff is collapsed.
Click to expand it.
dlls/gdi32/dibdrv/graphics.c
+
5
−
6
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 */
...
...
This diff is collapsed.
Click to expand it.
dlls/gdi32/dibdrv/objects.c
+
7
−
3
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
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment