Skip to content

Add the ability to rotate items and their children #1481

@tronical

Description

@tronical

Update: #1481 (comment)


For certain types of UIs - like for example a compass - we need the ability to rotate an item and its children. #1478 revives some old code to bring back this feature as:

`rotation-angle`
`rotation-origin-x`
`rotation-origin-y`

properties on any items, resulting in an injected hidden Rotate element that applies the rotation when rendering.

Commit 7b50e38 implements the rotation also for the Skia backend.

There are a few things left before this issue can be considered complete:

  • The API needs to be reviewed / discussed. Is this the correct approach, or do we need a more general "transform" API? Could we start with this and generalise later?
  • Input events need to be subjected to the rotation as well.
  • These properties need to be documented, preferably with an inline example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    rfcRequest for comments: proposals for changes

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions