c++ win32 のこのミッドポイント アルゴリズムは機能しません。何も描画しないか、水平線のみを描画します。どのようなエラーが発生していますか?
void midPoint(HDC hdc)
{
double dx = end.getXPoint()-start.getXPoint();
double dy = end.getYPoint()-start.getYPoint();
double x = start.getXPoint();
double y = start.getYPoint();
SetPixel(hdc,x,y,color);
double d = dx - (dy/2);
double d1 = dx;
double d2 = abs(dx-dy);
while(x < end.getXPoint())
{
d = abs(((( y+0.5)-start.getYPoint())*dx) - (((x+1)-start.getXPoint())*dy));
if(d < 0)
{
x = x+1;
y = y+1;
}
else
{
x = x+1;
}
SetPixel(hdc,x,y,color);
}
}