Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
differcent reuslts on different OS — Gideros Forum

differcent reuslts on different OS

alexzhengalexzheng Guru
edited August 2012 in General questions
Grid = Core.class(Sprite)
 
function Grid:init(rows, columns, w, h, bColor, fColor, lColor, alpha)
 
	local width = columns*w
	local height = rows*h
 
 
	local rect = helper:createRectangle(width, height, bColor or 0x000000, alpha or 0.5, 8, fColor)  ---simply create an Rectangle
	self:addChild(rect)
 
 
	local lines = Shape.new()       ---this lines not show  on mac or ios device
	lines:setFillStyle(Shape.NONE)
	lines:setLineStyle(1,  lColor or 0xffffff,alpha or 0.5)
 
	lines:beginPath()
	for i = 1, rows - 1 do
		lines:moveTo(0, i * h)
		lines:lineTo(width, i * h)
	end
 
	for i = 1, columns - 1 do
		lines:moveTo(i * w, 0)
		lines:lineTo(i * w, height)
	end
 
	lines:endPath()
 
	self:addChild(lines)
end
the lines object is drawed on windows player, but when run on mac player or iphone devies, the lines is not drawed.

And when commit these code
local rect = helper:createRectangle(width, height, bColor or 0x000000, alpha or 0.5, 8, fColor) ---simply create an Rectangle
self:addChild(rect)

only Horizontal lines was drawed on windows player.

Comments

Sign In or Register to comment.