Scenic.Primitive.Style.Paint.LinearGradient (Scenic v0.11.0-beta.0) View Source

Fill a primitive with a linear gradient between two colors

Data Format

{:linear, {start_x, start_y, end_x, end_y, color_start, color_end}}

This example fills with a smooth linear gradient that goes from blue in the upper left corner of the rect to yellow in the lower right corner.

Graph.build()
  |> rect( {100, 50}, fill: {:linear, {0, 0, 100, 50, :blue, :yellow}} )