Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
why a2 higher than a1?( about position) — Gideros Forum

why a2 higher than a1?( about position)




local a1 = Sprite.new()
local a2 = Sprite.new()
a1:setAnchorPoint(0,0)
a2:setAnchorPoint(0,0)
stage:addChild(a1)
stage:addChild(a2)
local p = Pixel.new(0xffff00,1,100,46,100)
a1:addChild(p)

local tf = TTFont.new("simhei.ttf",46,"")
local tff = TextField.new(tf,"123")
a2:addChild(tff)

a1:setPosition(100,100)
a2:setPosition(100,100)

--same position same anchorpoint,why a2 higher than a1?
Sign In or Register to comment.