LinearGradient.start readwrite


Get or set the starting two-dimensional coordinates of the linear gradient

Example

--! luart-extensions import ui require "canvas" -- create a simple Window local win = ui.Window("LinearGradient.start sample", "fixed", 500, 400) -- create a Canvas local canvas = ui.Canvas(win) canvas.align = "all" local gradient = canvas:LinearGradient { [0] = 0x00FFFFFF, [1] = 0x00008bFF } gradient.start = { 0, 0 } gradient.stop = { canvas.width, canvas.height } function canvas:onPaint() self:begin() self:fillrect(0, 0, canvas.width, canvas.height, gradient) self:flip() end await win:showasync()