//画弧线
var
  g: TGPGraphics;
  p: TGPPen;
begin
  g := TGPGraphics.Create(Canvas.Handle);
  p := TGPPen.Create(MakeColor(255,0,0),2);

  g.DrawArc(p,11,32,300,200,0,90);    {参数 2-5 是一个椭圆}

  p.SetColor(MakeColor(0,255,0));
  g.DrawArc(p,11,32,300,200,90,90);   {参数 6 是弧线起点度数, 从右中开始}

  p.SetColor(MakeColor(0,0,255));
  g.DrawArc(p,11,32,300,200,180,90);  {参数 7 是弧线终点, 是从起点到终点的弧度}

  p.SetColor(MakeColor(255,255,0));
  g.DrawArc(p,11,32,300,200,270,90);  {现在刚好绕成一个圆}

  p.SetColor(MakeColor(0,0,0));
  g.DrawArc(p,88,88,200,100,0,360);   {如果从 0 度开始延伸 360 度, 就是画椭圆线了}

  p.Free;
  g.Free;
end;

posted on 2007-12-27 18:58  万一  阅读(3013)  评论(0编辑  收藏  举报