Skip to content

Flip image programmatically #284

@humbertodias

Description

@humbertodias

Is it possible to flip an image programmatically using Lutro?

eg:

function lutro.draw()
    -- Draw the image normally
    lutro.graphics.draw(image, x, y)

    -- Flip horizontally (mirror on the X-axis)
    lutro.graphics.draw(image, x + image:getWidth() * 2, y, 0, -1, 1)

    -- Flip vertically (mirror on the Y-axis)
    lutro.graphics.draw(image, x, y + image:getHeight() * 2, 0, 1, -1)

    -- Flip both horizontally and vertically
    lutro.graphics.draw(image, x + image:getWidth() * 2, y + image:getHeight() * 2, 0, -1, -1)
end

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