Hi everybody.
This may be a dumb question, but as a beginner I think that's excusable :P
Anyway, I've tryed to put some texture in a rectangle that I've drawn, but I'm only getting the unfilled shape... Can anyone tells me what am I doing wrong?
here is the code:
local texture = Texture.new("ball5.png")
board = Shape.new()
board:setFillStyle(Shape.TEXTURE, texture, matrix)
board:setLineStyle(2,0x000000)
board:beginPath(Shape.NON_ZERO)
board:moveTo(600, 600)
board:lineTo(700, 600)
board:lineTo(700, 800)
board:lineTo(600, 800)
board:lineTo(600, 600)
board:closePath()
board:endPath()
stage:addChild(board)
Thank you!
*sorry about my english
Comments
define it beforehand like in this example:
http://docs.giderosmobile.com/reference/gideros/Shape/setFillStyle#Shape:setFillStyle
Likes: victor_cappa
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Here is more information:
http://appcodingeasy.com/Gideros-Mobile/Repeating-background-image-in-Gideros-Mobile
Likes: victor_cappa