Skip to content

The Canvas bounds.contains check has the canvas position as offset #2216

Description

@TheComamba

Is there an existing issue for this?

  • I have searched the existing issues.

Is this issue related to iced?

  • My hardware is compatible and my graphics drivers are up-to-date.

What happened?

If the canvas top-left does not coincide with the window top-left then the check interprets the point as if it lived in the window frame of reference, not the canvas frame of reference.

SSCCE: See the Canvas Coordinate example in my iced playground.

What is the expected behavior?

The bounds.contains check should evaluate to true for all coordinates within the canvas.

Version

crates.io release

Operating System

Linux

Do you have any log output?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinginvalidThis doesn't seem right

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions