Bootstrap

GDI+ 学习记录(14): 饼图 - Pie

//饼图描边与填充
var
  g: TGPGraphics;
  p: TGPPen;
  sb: TGPSolidBrush;
begin
  g := TGPGraphics.Create(Canvas.Handle);
  sb := TGPSolidBrush.Create(MakeColor(255,255,255));
  p := TGPPen.Create(MakeColor(255,0,0),8);

  g.DrawPie(p, 11, 11, 222, 222, 0, -45);
  g.FillPie(sb, 11, 11, 222, 222, 315, 45); {和上面是一个角度位置}

  p.Free;
  sb.Free;
  g.Free;
end;
;