Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Error in documentation — Gideros Forum

Error in documentation

MagnusviriMagnusviri Member
edited February 2012 in Bugs and issues
This might be fixed, but I thought I'd post it just in case.

http://giderosmobile.com/documentation/reference_manual_2011.9.html#Texture


local texture = Texture.new("atlas.png")

-- define 4 equal regions of size 100x100 from "atlas.png"
local region1 = TextureRegion.new(texture, 0, 0, 100, 100)
local region2 = TextureRegion.new(texture, 100, 0, 100, 100)
local region3 = TextureRegion.new(texture, 100, 100, 100, 100)
local region4 = TextureRegion.new(texture, 0, 100, 100, 100)

-- add these regions to scene tree
local bitmap1 = Bitmap.new(region1)
local bitmap2 = Bitmap.new(region1)
local bitmap3 = Bitmap.new(region1)
local bitmap4 = Bitmap.new(region1)

stage:addChild(bitmap1)
stage:addChild(bitmap2)
stage:addChild(bitmap3)
stage:addChild(bitmap4)

I think that it should read:


local bitmap2 = Bitmap.new(region2)
local bitmap3 = Bitmap.new(region3)
local bitmap4 = Bitmap.new(region4)

Likes: atilim

+1 -1 (+1 / -0 )Share on Facebook

Comments

Sign In or Register to comment.