Canvas:skew(anglex, angley, [centerx], [centery])method


Applyies a skew transformation on the Canvas

Parameters

anglex

A number representing the x-axis skew angle in degrees.

angley

A number representing the y-axis skew angle in degrees.

[centerx]

The horizonal coordinate for the skew center point, defaulting to the center of the Canvas.

[centery]

The vertical coordinate for the skew center point, defaulting to the center of the Canvas.

Return value

This function returns no value.

Example

--! luart-extensions import ui require "canvas" local win = ui.Window("Canvas - Skew example", "fixed", 150, 150) local c = ui.Canvas(win) c.align = "all" c.color = 0xd01000ff local skew = 0 -- Uses internal timer for 30fps drawing function c:onPaint() self:begin() self:clear(0xffffffff) c:identity() c:skew(skew, 0) c:fillrect(50,50,100,100, 0x37A0D7) skew = skew + 0.1 self:flip() end await win:showasync()