HexEdit/AerialView.cpp
void CAerialView::draw_pixel(CDC* pDC, int pnum, int x, int y, COLORREF clr1, COLORREF clr2, int horz /*=0*/, int vert)
{
	// Work out which pixel of the ant we are drawing.
	// Note we add ANT_SIZE below as modulus (%) does not behave as expected for -ve numbers.
	int anum = (int(pnum*bfactor_) + ANT_SIZE - timer_count_)%ANT_SIZE;
	if (actual_dpix_ < 7)
	{
		// When zoomed out quickly draw a single pixel
		if (anum < 4)
			pDC->SetPixel(bdr_left_ + x, bdr_top_ + y, clr1);
		else if (anum >= 6 && anum < 10)
			pDC->SetPixel(bdr_left_ + x, bdr_top_ + y, clr2);
		// else we do not drawn anything (transparent)
	}
	else
		for (int ii = 0; ii < actual_dpix_/4; ++ii)
		{
			if (anum < 4)
				pDC->SetPixel(bdr_left_ + x + ii*horz, bdr_top_ + y + ii*vert, clr1);
			else if (anum >= 6 && anum < 10)
				pDC->SetPixel(bdr_left_ + x + ii*horz, bdr_top_ + y + ii*vert, clr2);
			// else we do not drawn anything (transparent)
		}
}
// Draw a pixel of a marching ants display on top of the bitmap.
// This uses pnum (param 2) and the current value of timer_count_ (see OnTimer)
// to decide the colour of the pixels.
// x and y are the coordinates of the pixel (device coords) offset from top/left border.

Draw a pixel of a marching ants display on top of the bitmap.
This uses pnum (param 2) and the current value of timer_count_
to decide the colour of the pixels.
x and y are the coordinates of the pixel (device coords) offset from top/left border.
Draw a pixel of a marching ants display on top of the bitmap . This uses pnum ( param 2 ) and the current value of timer_count_ to decide the colour of the pixels . x and y are the coordinates of the pixel ( device coords ) offset from top / left border .
void CAerialView::draw_pixel(CDC* pDC, int pnum, int x, int y, COLORREF clr1, COLORREF clr2, int horz , int vert)
{
	int anum = (int(pnum*bfactor_) + ANT_SIZE - timer_count_)%ANT_SIZE;
	if (actual_dpix_ < 7)
	{
		if (anum < 4)
			pDC->SetPixel(bdr_left_ + x, bdr_top_ + y, clr1);
		else if (anum >= 6 && anum < 10)
			pDC->SetPixel(bdr_left_ + x, bdr_top_ + y, clr2);
	}
	else
		for (int ii = 0; ii < actual_dpix_/4; ++ii)
		{
			if (anum < 4)
				pDC->SetPixel(bdr_left_ + x + ii*horz, bdr_top_ + y + ii*vert, clr1);
			else if (anum >= 6 && anum < 10)
				pDC->SetPixel(bdr_left_ + x + ii*horz, bdr_top_ + y + ii*vert, clr2);
		}
}
void CAerialView :: draw_pixel ( CDC * pDC , int pnum , int x , int y , COLORREF clr1 , COLORREF clr2 , int horz , int vert ) { int anum = ( int ( pnum * bfactor_ ) + ANT_SIZE - timer_count_ ) % ANT_SIZE ; if ( actual_dpix_ < 7 ) { if ( anum < 4 ) pDC -> SetPixel ( bdr_left_ + x , bdr_top_ + y , clr1 ) ; else if ( anum >= 6 && anum < 10 ) pDC -> SetPixel ( bdr_left_ + x , bdr_top_ + y , clr2 ) ; } else for ( int ii = 0 ; ii < actual_dpix_ / 4 ; ++ ii ) { if ( anum < 4 ) pDC -> SetPixel ( bdr_left_ + x + ii * horz , bdr_top_ + y + ii * vert , clr1 ) ; else if ( anum >= 6 && anum < 10 ) pDC -> SetPixel ( bdr_left_ + x + ii * horz , bdr_top_ + y + ii * vert , clr2 ) ; } }
Draw a pixel of a marching ants display on top of the bitmap.
Draw a pixel of a marching ants display on top of the bitmap .
/*=0*/ // Work out which pixel of the ant we are drawing.
 // Note we add ANT_SIZE below as modulus (%) does not behave as expected for -ve numbers.
 // When zoomed out quickly draw a single pixel
 // else we do not drawn anything (transparent)
 // else we do not drawn anything (transparent)
