Skip to content

[BUG] The CGRect.ToRect() extension sets width and height incorrectly #2242

@mlancione

Description

@mlancione

Description

The Apple extension method ToRect() to convert an SKRect to a CGRect is passing in the rectangle's Right and Bottom values instead of its Width and Height values.

Code

var skRect = new SKRect( left: 5, top: 5, right: 15, bottom: 15 );
var cgRect = skRect.ToRect();

Expected Behavior

cgRect should have a width and height of 10.

Actual Behavior

cgRect has a width and height of 15.

Basic Information

  • Version with issue: 2.88.1
  • Last known good version: This seems to have always been the case.
  • IDE: Any
  • Platform Target Frameworks:
    • iOS: 15.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions