The problem came in with the interpreation DELPHI The arc traverses the perimeter of an ellipse that is bounded by the points (X1,Y1) and (X2,Y2). The arc is drawn following the perimeter of the ellipse, counterclockwise, from the starting point to the ending point.
Is the arc or the ellipse bounded by (X1Y1) (X2Y2)? It is actually the ellipse. The solution is quite simple. (With the help of Jolyon - Thanks ) xCtr:=DM.tblOperX1.AsFloat; yCtr:=DM.tblOperY1.AsFloat; if (dm.tblOper['CW']=False) then begin xStart:=DM.tblOperX2.AsFloat; yStart:=DM.tblOperY2.AsFloat; xEnd:=DM.tblOperX3.AsFloat; yEnd:=DM.tblOperY3.AsFloat; end else begin xStart:=DM.tblOperX3.AsFloat; //Swop start and end yStart:=DM.tblOperY3.AsFloat; xEnd:=DM.tblOperX2.AsFloat; yEnd:=DM.tblOperY2.AsFloat; end; rad:=sqrt(sqr(xStart-xCtr)+sqr(yStart-yCtr)); TopRH:=round((yCtr+rad)*Scale)+Hoffset; TopRV:=round((xCtr-rad)*Scale)+Voffset; BotLH:=round((yCtr-rad)*Scale)+Hoffset; BotLV:=round((xCtr+rad)*Scale)+Voffset; StartH:=round(yStart*Scale)+Hoffset; StartV:=round(xStart*Scale)+Voffset; EndH:=round(yEnd*Scale)+Hoffset; EndV:=round(xEnd*Scale)+Voffset; fDraw.Canvas.Arc(TopRH,TopRV,BotLH,BotLV,StartH,StartV,EndH,EndV);
_______________________________________________ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe