Skip to content

Rect documentation does not specify Origin location #1492

@noahprice-dev

Description

@noahprice-dev

In the existing Rust-SDL2 documentation, the specific origin of a created rectangle is not specified. In the SDL2 documentation it specifies rectangles have an origin in the upper left:
https://wiki.libsdl.org/SDL2/SDL_Rect

A rectangle, with the origin at the upper left (integer).

Assuming this is still correct based on how we are calling the SDL library, I propose we add this information to the Rect::new() Doc comment string at the very least, and as well add a method on Rect to access this position for completeness. This would be similar to Rect::center()

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