Skip to content

Accept IConvertible in Annotation.init #78

@kentcb

Description

@kentcb

Description

Annotation.init does not accept IConvertible for X and Y like other APIs.

Repro steps

Try to use a DateTime as the X for Annotation.init, which works fine with other APIs like Shape.init.

Expected behavior

Should be consistent.

Actual behavior

Requires a float.

Known workarounds

Converting to milliseconds since unix epoch and passing that in as a float.

Related information

  • Windows 10
  • 2.0.0-beta9
  • .NET 5

I noticed this problem does not seem unique to the .NET implementation: see here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions