Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Gideros Repeating and Clipping Background — Gideros Forum

Gideros Repeating and Clipping Background

Unknown Member
edited April 2014 in Game & application design
I want to have a background with a repeating x-axis, that can be moved horizontally. What I have so far:

local background = Texture.new("parallax01.png", true, {wrap = Texture.REPEAT})

local shape = Shape.new()
shape:setFillStyle(Shape.TEXTURE, background)
shape:beginPath(Shape.NON_ZERO)

shape:moveTo(0,100)
shape:lineTo(0,application:getDeviceWidth())

shape:lineTo(application:getDeviceHeight(),application:getDeviceWidth())
shape:lineTo(application:getDeviceHeight(),100)

Can I somehow move the background image without changing the shape position? I am a total Gideros noob and I could not find anything useful. Thanks.

Comments

Sign In or Register to comment.