Vixen
dd8b0a81
csharp
public enum GradientShape

Which family of gradient a box is filled with.

Read the guide page for this →

Remarks

⚠ A discriminator rather than three axis conventions, because radial has no axis. The two-stop implementation used a zero GradientAxis as its "no gradient" sentinel, which works exactly as long as every gradient has a direction. A radial one does not — its parameter is a distance from the centre — so a radial fill would have had to write a meaningless non-zero axis to avoid being erased, and the first person to read that axis would have believed it.

The numbers are the shader's: they are written into UiShape.Size.w, whose previous life was a zero-or-one gradient flag. None is that flag's zero and Linear is its one, on purpose, so growing the record moved no picture.

Fields and properties (4)

  • None

    No gradient. The box is filled with its own colour.

  • Linear

    CSS's linear-gradient(): the ramp runs along an axis.

  • Radial

    CSS's radial-gradient(): an ellipse from the centre out.

  • Conic

    CSS's conic-gradient(): the ramp sweeps around the centre.

Used by (13)

  • BackgroundGradientVixen.Ui
  • BoxStyleVixen.Ui
  • DrawListBuilderVixen.Ui
  • GradientReaderVixen.Ui
  • GradientTestsVixen.Ui.Tests
  • MaskGradientTestsVixen.Ui.Controls.Tests
  • SoftwareUiRasterizerVixen.Ui.Testing
  • UiBoxAgreementTestsVixen.Graphics.Golden.Tests
  • UiCompositingTestsVixen.Graphics.Golden.Tests
  • UiMaskVixen.Ui
  • UiShapeVixen.Ui
  • UiShapeLayoutTestsVixen.Ui.Tests
  • EditorUiCompositingDeviceTestsVixen.Editor.App.Tests