怎样用delphi画弧线

解决方案 »

  1.   

    Draws an arc on the image along the perimeter of the ellipse bounded by the specified rectangle. procedure Arc(X1, Y1, X2, Y2, X3, Y3, X4, Y4: Integer); overload;
    procedure Arc(X, Y, W, H, Angle, AngleLength: Integer); overload;DescriptionUse Arc to draw an elliptically curved line with the current Pen. 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. The starting point is defined by the intersection of the ellipse and a line defined by the center of the ellipse and (X3,Y3). The ending point is defined by the intersection of the ellipse and a line defined by the center of the ellipse and (X4, Y4).Use the second syntax to draw an arc defined by the rectangle (X,Y,W,H), the start angle Angle and the arc length AngleLength. The angles Angle and AngleLength are 1/16th of a degree. For example, a full circle equals 5760 (16*360). Positive values of Angle and AngleLength mean counter-clockwise while negative values mean clockwise direction. Zero degrees is at the 3'o clock position. Note: If you are developing a cross platform application and also targeting Windows 95, the sums X1 + X2 and Y1 + Y2 cannot exceed 32768. Also, the sum X1 + X2 + Y1 + Y2 cannot exceed 32768.
      

  2.   

    delphi中的例子:The following lines of code draw the top quarter of an arc bounded by the current window:procedure TForm1.FormPaint(Sender: TObject);
    var
      R: TRect;
    begin
      R := GetClientRect;   {Gets the boundaries of the current window}
      Canvas.Arc(R.Left, R.Top, R.Right, R.Bottom, R.Right, R.Top, R.Left, R.Top);
    end;
      

  3.   

    canvas.LineTo(x,y)
    y:=f(x);
    可以画出y的函数图像
      

  4.   

    TCanvas有画各种东西的方法。好多控件有Canvas属性。
      

  5.   

    只是一段弧?
    Canvas.Arc要用直线连接弧线首尾!
    Canvas.Chord
      

  6.   

    TCanvas是用GDI进行绘图接口的封装!Canvas.Arc,Canvas.Chord就是调用GDI函数!Arc,Chord!