Skip to content

The behavior of Canvas.skew does not match the documentation #32323

@pents90

Description

@pents90

The documentation for Canvas.skew states that the units for the sx and sy parameters are in radians. However, that is incorrect, they are actually in raw "rise over run" ratio units. To see this, try a vertical skew of π/4 radians (45°). This should turn a horizontal line into a 45° diagonal line. You will see that it doesn't. However, if you instead try a vertical skew of tan(π/4), then you see the desired result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    d: api docsIssues with https://api.flutter.dev/engineflutter/engine related. See also e: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions