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
666f83bc
Commit
666f83bc
authored
Nov 16, 2011
by
Huw Davies
Committed by
Alexandre Julliard
Nov 16, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add a helper to retrieve the octant bias.
parent
48b1e663
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
objects.c
dlls/gdi32/dibdrv/objects.c
+8
-4
No files found.
dlls/gdi32/dibdrv/objects.c
View file @
666f83bc
...
...
@@ -308,6 +308,12 @@ static inline DWORD get_octant_mask(int dx, int dy)
return
1
<<
(
get_octant_number
(
dx
,
dy
)
-
1
);
}
static
inline
int
get_bias
(
DWORD
mask
)
{
/* Octants 3, 5, 6 and 8 take a bias */
return
(
mask
&
0xb4
)
?
1
:
0
;
}
static
void
solid_pen_line_callback
(
dibdrv_physdev
*
pdev
,
INT
x
,
INT
y
)
{
RECT
rect
;
...
...
@@ -653,8 +659,7 @@ static BOOL solid_pen_line(dibdrv_physdev *pdev, POINT *start, POINT *end)
params
.
dx
=
abs
(
dx
);
params
.
dy
=
abs
(
dy
);
params
.
octant
=
get_octant_mask
(
dx
,
dy
);
/* Octants 3, 5, 6 and 8 take a bias */
params
.
bias
=
(
params
.
octant
&
0xb4
)
?
1
:
0
;
params
.
bias
=
get_bias
(
params
.
octant
);
for
(
i
=
0
;
i
<
clip
->
numRects
;
i
++
)
{
...
...
@@ -926,8 +931,7 @@ static BOOL dashed_pen_line(dibdrv_physdev *pdev, POINT *start, POINT *end)
params
.
dx
=
abs
(
dx
);
params
.
dy
=
abs
(
dy
);
params
.
octant
=
get_octant_mask
(
dx
,
dy
);
/* Octants 3, 5, 6 and 8 take a bias */
params
.
bias
=
(
params
.
octant
&
0xb4
)
?
1
:
0
;
params
.
bias
=
get_bias
(
params
.
octant
);
for
(
i
=
0
;
i
<
clip
->
numRects
;
i
++
)
{
...
...
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