|
this is wat i tried..but still having problem
if(dx = 0) // vertical line
{
if( y1 > y2)
{
// y1 above y2
for(int count = y2; count <= y1; count ++)
{
SetPixel(x2,count,color[0],color[1],color[2]);
}
}
else
{
// y1 below y2
for(int count = y1; count <= y2; count ++)
{
SetPixel(x1,count,color[0],color[1],color[2]);
}
}
}
|