无 无有人 Unregistered / Unconfirmed GUEST, unregistred user! 2005-08-21 #1 在Delphi中,可以通过指定圆心坐标和半径来画圆吗?若可以,具体怎么做?
无 无有人 Unregistered / Unconfirmed GUEST, unregistred user! 2005-08-21 #2 在Delphi中,可以通过指定圆心坐标和半径来画圆吗?若可以,具体怎么做?
P painboy Unregistered / Unconfirmed GUEST, unregistred user! 2005-08-21 #3 Draws the ellipse defined by a bounding rectangle on the canvas. procedure Ellipse(X1, Y1, X2, Y2: Integer); overload; procedure Ellipse(const Rect: TRect); overload; Description Call Ellipse to draw a circle or ellipse on the canvas. Specify the bounding rectangle either by giving The top left point at pixel coordinates (X1, Y1) and the bottom right point at (X2, Y2). A TRect value. If the bounding rectangle is a square, a circle is drawn. The ellipse is outlined using the value of Pen, and filled using the value of Brush. 将指定的圆心和半径换算成两个坐标就行了。
Draws the ellipse defined by a bounding rectangle on the canvas. procedure Ellipse(X1, Y1, X2, Y2: Integer); overload; procedure Ellipse(const Rect: TRect); overload; Description Call Ellipse to draw a circle or ellipse on the canvas. Specify the bounding rectangle either by giving The top left point at pixel coordinates (X1, Y1) and the bottom right point at (X2, Y2). A TRect value. If the bounding rectangle is a square, a circle is drawn. The ellipse is outlined using the value of Pen, and filled using the value of Brush. 将指定的圆心和半径换算成两个坐标就行了。
G gooodlife Unregistered / Unconfirmed GUEST, unregistred user! 2005-08-22 #4 procedure TForm1.Button1Click(Sender: TObject); begin Ellipse(Form1.Canvas.Handle, 0, 0, 100, 100); end; 这个表示在 (0,0), (0,100), (100, 100), (100,0) 这四个点组成的正方型内画一个最大的圆 圆心在 (50,50) 半径为 50
procedure TForm1.Button1Click(Sender: TObject); begin Ellipse(Form1.Canvas.Handle, 0, 0, 100, 100); end; 这个表示在 (0,0), (0,100), (100, 100), (100,0) 这四个点组成的正方型内画一个最大的圆 圆心在 (50,50) 半径为 50
云 云影 Unregistered / Unconfirmed GUEST, unregistred user! 2005-08-22 #5 可以用元的参数方程的方式画 r--半径 a,b--中心坐标 递增alpha x:=a+round(r*sin(alpha)) y:=b+round(r*cos(alpha)) canvas.lineto(x,y);
可以用元的参数方程的方式画 r--半径 a,b--中心坐标 递增alpha x:=a+round(r*sin(alpha)) y:=b+round(r*cos(alpha)) canvas.lineto(x,y);
S seekmzy Unregistered / Unconfirmed GUEST, unregistred user! 2005-08-22 #6 [^][^]方法很多了!可以利用方程去画呵呵,不过稍稍复杂一些,得分呈四个扇形画 []x*x+y*y=r*r,就是利用这个方程转换!
S seekmzy Unregistered / Unconfirmed GUEST, unregistred user! 2005-08-22 #7 最好的方法 自己选一个大家说得这些方法写一个画圆的类[^][]随时用很方便!哈