update to xserver 21.1.12
This commit is contained in:
parent
c5d87f442b
commit
f0fd08c832
59 changed files with 449 additions and 209 deletions
|
@ -122,7 +122,7 @@ typedef struct _ScanLineListBlock {
|
|||
* to scanlines() : Must be an even number
|
||||
*/
|
||||
#define NUMPTSTOBUFFER 200
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* a few macros for the inner loops of the fill code where
|
||||
|
|
|
@ -50,7 +50,7 @@ from The Open Group.
|
|||
* overhead is out of the question.
|
||||
* See the author for a derivation if needed.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* In scan converting polygons, we want to choose those pixels
|
||||
* which are inside the polygon. Thus, we add .5 to the starting
|
||||
|
@ -95,7 +95,7 @@ from The Open Group.
|
|||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
#define BRESINCRPGON(d, minval, m, m1, incr1, incr2) { \
|
||||
if (m1 > 0) { \
|
||||
if (d > 0) { \
|
||||
|
@ -117,7 +117,7 @@ from The Open Group.
|
|||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* This structure contains all of the information needed
|
||||
* to run the bresenham algorithm.
|
||||
|
|
|
@ -109,7 +109,7 @@ end of the line, we will find the largest number of Y steps that
|
|||
satisfies the inequality. In that case, since we are representing
|
||||
the Y steps as (dy - N), we will actually want to solve for the
|
||||
smallest N in that equation.
|
||||
|
||||
|
||||
Case 1: X major, starting X coordinate moved by M steps
|
||||
|
||||
-2dx <= 2Mdy - 2Ndx - dx - B < 0
|
||||
|
@ -157,7 +157,7 @@ steps, so we want the highest N, so we use the < inequality:
|
|||
= floor((2Mdy + dx + B + 2dx - 1) / 2dx) - 1
|
||||
= floor((2Mdy + dx + B + 2dx - 1 - 2dx) / 2dx)
|
||||
= floor((2Mdy + dx + B - 1) / 2dx)
|
||||
|
||||
|
||||
Case 3: Y major, starting X coordinate moved by M steps
|
||||
|
||||
-2dy <= 2Ndx - 2Mdy - dy - B < 0
|
||||
|
@ -203,7 +203,7 @@ Same analysis as Case 4, but we want the smallest number of Y steps
|
|||
which means the largest N, so we use the <= inequality:
|
||||
|
||||
N = floor((2Mdy + dy - B) / 2dx)
|
||||
|
||||
|
||||
Now let's try the Y coordinates, we have the same 4 cases.
|
||||
|
||||
Case 5: X major, starting Y coordinate moved by N steps
|
||||
|
@ -248,7 +248,7 @@ Same derivations as Case 6, but we want the smallest # of X steps
|
|||
which means the largest M, so use the <= inequality:
|
||||
|
||||
M = floor((2Ndx + dx - B) / 2dy)
|
||||
|
||||
|
||||
Case 7: Y major, starting Y coordinate moved by N steps
|
||||
|
||||
-2dy <= 2Ndx - 2Mdy - dy - B < 0
|
||||
|
@ -293,7 +293,7 @@ steps which means the largest M, so we use the < inequality:
|
|||
= floor((2Ndx + dy + B + 2dy - 1) / 2dy) - 1
|
||||
= floor((2Ndx + dy + B + 2dy - 1 - 2dy) / 2dy)
|
||||
= floor((2Ndx + dy + B - 1) / 2dy)
|
||||
|
||||
|
||||
So, our equations are:
|
||||
|
||||
1: X major move x1 to x1+M floor((2Mdy + dx - B) / 2dx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue