Skip to content

Horizontal and vertical flip #262

@fossegutten

Description

@fossegutten

Summary:
Add booleans for horizontal and vertical flip to DrawParams, that does not offset the textures.
This would be nice because scaling in negative direction also offsets the texture in the negative direction.
As a workaround to avoid this, we need to add half texture size to position and to origin.

Steps to reproduce:

DrawParams::default()
                .position(some_position)
                .scale(Vec2::new(-1.0, -1.0))

Texture now moved up and to the left.

Expected behavior:
Expected the texture to draw at some_position, just mirrored.

Additional info:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: GraphicsIssues related to graphics/rendering.Type: Feature RequestImprovements that could be made to the code/documentation.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions