The snippet below shows how to load and show an image using Gideros Mobile. Notice that if we remove all comments, it reduces source code to just 5 lines.
-- Create a Bitmap object. Note that we are passing to its constructor
-- a Texture object and that it receives the full path of the image as
-- we see under Files folder
local einstein = Bitmap.new(Texture.new('ra_einstein.png'))
-- put it at position x = 80, y = 0.
-- add it to stage. It os a global variable of type Stage. You never instantiate it yourself.
-- You can make image transparent (50% is our example).
-- Lets rotate image 14 degrees.
In picture below you can see image is rotated and has alpha (transparency) = 50%.
The complete project can be downloaded from Plicatibu’s github repository.
Read the comments in the main.lua file to see instructions on how to set properties of both project and Gideros player.
Next post in this series of snippets: How to Click On Image in Gideros.