#include #include #include #include void DrawingSurface::setRowInfo(void) { if(!isLocked())return; mRowInfo.rowCount(mSurfaceDescription.height()); for(int row=0;row>0x10,xRunning>>0x10,byteValue); xRunning-=xDelta; yRunning-=yDelta; } } else if(-1==xDir&&1==yDir) { for(short stepIndex=0;stepIndex>0x10,xRunning>>0x10,byteValue); xRunning-=xDelta; yRunning+=yDelta; } } else if(1==xDir&&-1==yDir) { for(short itemIndex=0;itemIndex>0x10,xRunning>>0x10,byteValue); xRunning+=xDelta; yRunning-=yDelta; } } else if(1==xDir&&1==yDir) { for(short itemIndex=0;itemIndex>0x10,xRunning>>0x10,byteValue); xRunning+=xDelta; yRunning+=yDelta; } } } WORD DrawingSurface::square(const Point ¢erPoint,WORD lineLength,BYTE palIndex) { WORD halfLength(lineLength>>0x01); Point topLeft; Point topRight; Point bottomLeft; Point bottomRight; if(!isOkay())return FALSE; topLeft.x(centerPoint.x()-halfLength); topLeft.y(centerPoint.y()-halfLength); topRight.x(centerPoint.x()+halfLength); topRight.y(centerPoint.y()-halfLength); bottomRight.x(centerPoint.x()+halfLength); bottomRight.y(centerPoint.y()+halfLength); bottomLeft.x(centerPoint.x()-halfLength); bottomLeft.y(centerPoint.y()+halfLength); line(topLeft,topRight,palIndex); line(topRight,bottomRight,palIndex); line(bottomRight,bottomLeft,palIndex); line(bottomLeft,topLeft,palIndex); return TRUE; } WORD DrawingSurface::circle(const Point &xyPoint,WORD radius,WORD palIndex,WORD aspectValue) { int a(radius); int af; int bf; int b(0); int target(1); int radiusSquared(radius*radius); if(!isOkay())return FALSE; while(a>=b) { b=(int)(Math::sqrt(radiusSquared-(a*a))+.50); int temp(target); target=b; b=temp; while(b