Hmm...I think there are two more options. One, you add such an image-class yourself. Afaik, lokasenna did the class-concept for that purpose to make enhancing easier. But I never looked into it, so I can't help you with that(lokasenna, where ar thou?)
The other option is one, I use for the winterly snowflakes-function in my API, replacing the gfx.update()-function.
1. Copy gfx.update into a variable, like oldgfxupd=gfx.update
2. Write a new one, that blits the image and run oldgfxupd()
3. Before blitting, store the old values of gfx.x and gfx.y and restore them after blitting the image.
The function declaration is, as you are used to:
function gfx.update()
...Your blitting code here...
oldgfxupd()
end
The latter approach is more a hack that should work, but it may break with a future version of the gui-lib(though it's not likely to break).
|