Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Small issue with upper left x,y coordinate of stage — Gideros Forum

Small issue with upper left x,y coordinate of stage

ndossndoss Guru
edited January 2012 in Bugs and issues
It looks like the top left corner of the gideros screen is actually at coordinate x=1,y=0. I had expected it to be either "0,0" or "1,1". It's a bit of a nit, but just thought I'd point it out.

The following code demonstrates the problem:
for y=0,2 do
   local shape = Shape.new()
   shape:setLineStyle(1,0x0000ff)
   shape:beginPath()
   shape:moveTo(y*100+10,y)
   shape:lineTo(y*100+90,y)
   shape:endPath()
   local t = TextField.new(nil, "y=" .. y)
   t:setPosition(y*100+50-t:getWidth()/2,10)
   shape:addChild(t)
   stage:addChild(shape)
end
 
for x=0,4 do
   local shape = Shape.new()
   shape:setLineStyle(1,0xff0000)
   shape:beginPath()
   shape:moveTo(x,x*100+10)
   shape:lineTo(x,x*100+90)
   shape:endPath()
   local t = TextField.new(nil, "x=" .. x)
   t:setPosition(10, x*100+50-t:getWidth()/2+10)
   shape:addChild(t)
   stage:addChild(shape)
end
Output from running the code:
image

Likes: gorkem

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

Comments

Sign In or Register to comment.