fixed minor blip in Polygon algo

svn path=/trunk/; revision=5680
This commit is contained in:
Royce Mitchell III 2003-08-19 21:29:20 +00:00
parent 0152db0310
commit 23f865f379
2 changed files with 16 additions and 12 deletions

View file

@ -62,7 +62,7 @@ typedef struct RECTL
inline void DPRINT(...){}
#define SCREENX 25
#define SCREENY 25
#define SCREENY 15
char screen[SCREENY][SCREENX];
#define EDGE_CHAR '*'
@ -440,7 +440,7 @@ POLYGONFILL_UpdateScanline(FILL_EDGE* pEdge, int Scanline)
if ( 0 == pEdge->dy )
return;
ASSERT ( pEdge->FromY <= Scanline && pEdge->ToY >= Scanline );
ASSERT ( pEdge->FromY <= Scanline && pEdge->ToY > Scanline );
if ( pEdge->xmajor )
{
@ -512,7 +512,7 @@ POLYGONFILL_BuildActiveList ( int Scanline, FILL_EDGE_LIST* list, FILL_EDGE** Ac
{
FILL_EDGE* pEdge = list->Edges[i];
ASSERT(pEdge);
if ( pEdge->FromY <= Scanline && pEdge->ToY >= Scanline )
if ( pEdge->FromY <= Scanline && pEdge->ToY > Scanline )
{
POLYGONFILL_UpdateScanline ( pEdge, Scanline );
POLYGONFILL_ActiveListInsert ( ActiveHead, pEdge );
@ -828,7 +828,11 @@ void main()
{ 0, 0 },
{ 12, 4 },
{ 4, 8 },
#elif 1
#elif 0
{ 3, 0 },
{ 0, 3 },
{ 3, 6 },
#elif 0
{ 1, 1 },
{ 3, 1 },
{ 3, 3 },
@ -843,11 +847,11 @@ void main()
{ 4, 4 },
{ 0, 4 },
#else
{ 4, 16 },
{ 12, 4 },
{ 18, 16 },
{ 4, 8 },
{ 20, 8 }
{ 4, 12 },
{ 12, 0 },
{ 18, 12 },
{ 4, 4 },
{ 20, 4 }
#endif
};
const int pts_count = sizeof(pts)/sizeof(pts[0]);

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: polyfill.c,v 1.11 2003/08/17 17:32:58 royce Exp $
/* $Id: polyfill.c,v 1.12 2003/08/19 21:29:20 royce Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -317,7 +317,7 @@ POLYGONFILL_UpdateScanline(FILL_EDGE* pEdge, int Scanline)
if ( 0 == pEdge->dy )
return;
ASSERT ( pEdge->FromY <= Scanline && pEdge->ToY >= Scanline );
ASSERT ( pEdge->FromY <= Scanline && pEdge->ToY > Scanline );
if ( pEdge->xmajor )
{
@ -389,7 +389,7 @@ POLYGONFILL_BuildActiveList ( int Scanline, FILL_EDGE_LIST* list, FILL_EDGE** Ac
{
FILL_EDGE* pEdge = list->Edges[i];
ASSERT(pEdge);
if ( pEdge->FromY <= Scanline && pEdge->ToY >= Scanline )
if ( pEdge->FromY <= Scanline && pEdge->ToY > Scanline )
{
POLYGONFILL_UpdateScanline ( pEdge, Scanline );
POLYGONFILL_ActiveListInsert ( ActiveHead, pEdge );