画布:如何获得圆形渐变?

Chr*_*ris 5 delphi canvas firemonkey

有没有办法在Firemonkey(10.3)中绘制具有圆形渐变的弧?我尝试了以下代码,但这给了我“绿-红-绿”而不是“绿-红”的信息。

with PaintBox1.Canvas do
begin
  BeginScene;

  Stroke.Kind := TBrushKind.Gradient;
  Stroke.Thickness := 20;
  Stroke.Cap := TStrokeCap.Round;
  Stroke.Gradient.Style := TGradientStyle.Linear;
  Stroke.Gradient.Color := TAlphaColors.Green;
  Stroke.Gradient.Color1 := TAlphaColors.Red;

  DrawArc(PointF(250,250),PointF(100,100),-250,320,1);

  EndScene;
end;
Run Code Online (Sandbox Code Playgroud)

结果是:

在此处输入图片说明