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
0f40ad8a
Commit
0f40ad8a
authored
13 years ago
by
Huw Davies
Committed by
Alexandre Julliard
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
gdi32: Move to using a multi-line pen object-level function.
parent
1e83fd00
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/graphics.c
+4
-6
4 additions, 6 deletions
dlls/gdi32/dibdrv/graphics.c
dlls/gdi32/dibdrv/objects.c
+28
-4
28 additions, 4 deletions
dlls/gdi32/dibdrv/objects.c
dlls/gdi32/gdi_private.h
+1
-1
1 addition, 1 deletion
dlls/gdi32/gdi_private.h
with
33 additions
and
11 deletions
dlls/gdi32/dibdrv/graphics.c
+
4
−
6
View file @
0f40ad8a
...
...
@@ -73,7 +73,7 @@ BOOL dibdrv_LineTo( PHYSDEV dev, INT x, INT y )
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
TRUE
;
...
...
@@ -154,7 +154,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
[
4
];
POINT
pts
[
5
];
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 )
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_line
(
pdev
,
pts
,
pts
+
1
);
pdev
->
pen_line
(
pdev
,
pts
+
1
,
pts
+
2
);
pdev
->
pen_line
(
pdev
,
pts
+
2
,
pts
+
3
);
pdev
->
pen_line
(
pdev
,
pts
+
3
,
pts
);
pdev
->
pen_lines
(
pdev
,
5
,
pts
);
/* FIXME: Will need updating when we support wide pens */
...
...
This diff is collapsed.
Click to expand it.
dlls/gdi32/dibdrv/objects.c
+
28
−
4
View file @
0f40ad8a
...
...
@@ -647,6 +647,18 @@ 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
)
{
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
)
{
pdev
->
dash_pos
.
cur_dash
=
0
;
...
...
@@ -920,7 +932,19 @@ static BOOL dashed_pen_line(dibdrv_physdev *pdev, POINT *start, POINT *end)
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
;
}
...
...
@@ -984,7 +1008,7 @@ HPEN dibdrv_SelectPen( PHYSDEV dev, HPEN hpen )
case
PS_SOLID
:
if
(
logpen
.
lopnStyle
&
PS_GEOMETRIC
)
break
;
if
(
logpen
.
lopnWidth
.
x
>
1
)
break
;
pdev
->
pen_line
=
solid_pen_line
;
pdev
->
pen_line
s
=
solid_pen_line
s
;
pdev
->
defer
&=
~
DEFER_PEN
;
break
;
...
...
@@ -994,13 +1018,13 @@ HPEN dibdrv_SelectPen( PHYSDEV dev, HPEN hpen )
case
PS_DASHDOTDOT
:
if
(
logpen
.
lopnStyle
&
PS_GEOMETRIC
)
break
;
if
(
logpen
.
lopnWidth
.
x
>
1
)
break
;
pdev
->
pen_line
=
dashed_pen_line
;
pdev
->
pen_line
s
=
dashed_pen_line
s
;
pdev
->
pen_pattern
=
dash_patterns
[
style
];
pdev
->
defer
&=
~
DEFER_PEN
;
break
;
case
PS_NULL
:
pdev
->
pen_line
=
null_pen_line
;
pdev
->
pen_line
s
=
null_pen_line
s
;
pdev
->
defer
&=
~
DEFER_PEN
;
break
;
...
...
This diff is collapsed.
Click to expand it.
dlls/gdi32/gdi_private.h
+
1
−
1
View file @
0f40ad8a
...
...
@@ -136,7 +136,7 @@ typedef struct dibdrv_physdev
DWORD
pen_color
,
pen_and
,
pen_xor
;
dash_pattern
pen_pattern
;
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 */
UINT
brush_style
;
...
...
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