Skip to content

support offscreen drawing #48

Description

@rlane

Redirecting drawing operations to another SDL surface is useful for postprocessing effects, procedurally generated sprites, etc.

Proposed API:

canvas = createCanvas(width, height)
canvas = loadImage(filename)
previous = selectCanvas(canvas)
drawCanvas(canvas, x, y)
canvas = rotozoomCanvas(srcCanvas, angle, zoom, smooth)

The implementation would mostly be a renaming of the existing sprite code and adding more bindings. The sprite() function could be reimplemented in Lua in terms of the canvas functions.

Let me know what you think of this API. I'll implement it in the next couple of days.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions