Discussion
議論
An angular gradient is also known as a “conic” gradient. If endAngle - startAngle > 2π
, the gradient only draws the last complete turn.
角勾配はまた “円錐” 勾配として知られます。endAngle - startAngle > 2π
ならば、勾配は最後の完了回転を描画するだけです。
If endAngle - startAngle < 2π
, the gradient fills the missing area with the colors defined by gradient stop locations at 0
and 1
, transitioning between the two halfway across the missing area.
For example, an angular gradient used as a background:
let gradient = Gradient(colors: [.red, .yellow])
ContentView()
.background(.angularGradient(gradient))
For information about how to use shape styles, see ShapeStyle
.