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
72804fca
Commit
72804fca
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 drawing vertical patterned lines.
parent
6976cee4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
95 additions
and
0 deletions
+95
-0
objects.c
dlls/gdi32/dibdrv/objects.c
+77
-0
dib.c
dlls/gdi32/tests/dib.c
+18
-0
No files found.
dlls/gdi32/dibdrv/objects.c
View file @
72804fca
...
...
@@ -670,6 +670,83 @@ static BOOL dashed_pen_line(dibdrv_physdev *pdev, POINT *start, POINT *end)
pdev
->
dash_pos
=
start_pos
;
skip_dash
(
pdev
,
right
-
left
+
1
);
}
else
if
(
start
->
x
==
end
->
x
)
/* vline */
{
BOOL
t_to_b
;
INT
top
,
bottom
,
cur_y
;
rect
.
left
=
start
->
x
;
rect
.
right
=
start
->
x
+
1
;
if
(
start
->
y
<=
end
->
y
)
{
top
=
start
->
y
;
bottom
=
end
->
y
-
1
;
t_to_b
=
TRUE
;
}
else
{
top
=
end
->
y
+
1
;
bottom
=
start
->
y
;
t_to_b
=
FALSE
;
}
for
(
i
=
0
;
i
<
clip
->
numRects
;
i
++
)
{
if
(
clip
->
rects
[
i
].
top
>
bottom
)
break
;
if
(
clip
->
rects
[
i
].
bottom
<=
top
)
continue
;
if
(
clip
->
rects
[
i
].
right
>
start
->
x
&&
clip
->
rects
[
i
].
left
<=
start
->
x
)
{
int
clipped_top
=
max
(
clip
->
rects
[
i
].
top
,
top
);
int
clipped_bottom
=
min
(
clip
->
rects
[
i
].
bottom
-
1
,
bottom
);
pdev
->
dash_pos
=
start_pos
;
if
(
t_to_b
)
{
cur_y
=
clipped_top
;
if
(
cur_y
!=
top
)
skip_dash
(
pdev
,
clipped_top
-
top
);
while
(
cur_y
<=
clipped_bottom
)
{
get_dash_colors
(
pdev
,
&
and
,
&
xor
);
dash_len
=
pdev
->
dash_pos
.
left_in_dash
;
if
(
cur_y
+
dash_len
>
clipped_bottom
+
1
)
dash_len
=
clipped_bottom
-
cur_y
+
1
;
rect
.
top
=
cur_y
;
rect
.
bottom
=
cur_y
+
dash_len
;
pdev
->
dib
.
funcs
->
solid_rects
(
&
pdev
->
dib
,
1
,
&
rect
,
and
,
xor
);
cur_y
+=
dash_len
;
skip_dash
(
pdev
,
dash_len
);
}
}
else
{
cur_y
=
clipped_bottom
;
if
(
cur_y
!=
bottom
)
skip_dash
(
pdev
,
bottom
-
clipped_bottom
);
while
(
cur_y
>=
clipped_top
)
{
get_dash_colors
(
pdev
,
&
and
,
&
xor
);
dash_len
=
pdev
->
dash_pos
.
left_in_dash
;
if
(
cur_y
-
dash_len
<
clipped_top
-
1
)
dash_len
=
cur_y
-
clipped_top
+
1
;
rect
.
top
=
cur_y
-
dash_len
+
1
;
rect
.
bottom
=
cur_y
+
1
;
pdev
->
dib
.
funcs
->
solid_rects
(
&
pdev
->
dib
,
1
,
&
rect
,
and
,
xor
);
cur_y
-=
dash_len
;
skip_dash
(
pdev
,
dash_len
);
}
}
}
}
pdev
->
dash_pos
=
start_pos
;
skip_dash
(
pdev
,
bottom
-
top
+
1
);
}
else
{
ret
=
FALSE
;
...
...
dlls/gdi32/tests/dib.c
View file @
72804fca
...
...
@@ -86,6 +86,8 @@ static const char *sha1_graphics_a8r8g8b8[] =
"f2af53dd073a09b1031d0032d28da35c82adc566"
,
"eb5a963a6f7b25533ddfb8915e70865d037bd156"
,
"c387917268455017aa0b28bed73aa6554044bbb3"
,
"dcae44fee010dbf7a107797a503923fd8b1abe2e"
,
"6c530622a025d872a642e8f950867884d7b136cb"
,
NULL
};
...
...
@@ -375,6 +377,22 @@ static void draw_graphics(HDC hdc, BITMAPINFO *bmi, BYTE *bits, const char ***sh
compare_hash
(
bmi
,
bits
,
sha1
,
"clipped dashed hlines r -> l"
);
memset
(
bits
,
0xcc
,
dib_size
);
for
(
i
=
0
;
i
<
sizeof
(
vline_clips
)
/
sizeof
(
vline_clips
[
0
]);
i
++
)
{
MoveToEx
(
hdc
,
vline_clips
[
i
].
left
,
vline_clips
[
i
].
top
,
NULL
);
LineTo
(
hdc
,
vline_clips
[
i
].
right
,
vline_clips
[
i
].
bottom
);
}
compare_hash
(
bmi
,
bits
,
sha1
,
"clipped dashed vlines"
);
memset
(
bits
,
0xcc
,
dib_size
);
for
(
i
=
0
;
i
<
sizeof
(
vline_clips
)
/
sizeof
(
vline_clips
[
0
]);
i
++
)
{
MoveToEx
(
hdc
,
vline_clips
[
i
].
right
,
vline_clips
[
i
].
bottom
-
1
,
NULL
);
LineTo
(
hdc
,
vline_clips
[
i
].
left
,
vline_clips
[
i
].
top
-
1
);
}
compare_hash
(
bmi
,
bits
,
sha1
,
"clipped dashed vlines b -> t"
);
memset
(
bits
,
0xcc
,
dib_size
);
ExtSelectClipRgn
(
hdc
,
NULL
,
RGN_COPY
);
SelectObject
(
hdc
,
orig_brush
);
...
...
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