Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Pixel color gradient — Gideros Forum

Pixel color gradient

rrraptorrrraptor Member
edited July 2020 in General questions
Just wonder, is that suppose to work like that or not.

If Pixel object is fully transparent then you wont see a gradient.
local pixel = Pixel.new(0, 0, 500, 500)
pixel:setColor(0xFF0000, 1, 0x0D8CFF, 1, 0xFF0000, 1, 0x0D8CFF, 1) -- nothing to see
stage:addChild(pixel)
But if its not transparent then everything ok.
local pixel = Pixel.new(0, 0, 500, 500)
pixel:setColor(0xffffff, 1) -- set color to white
pixel:setColor(0xFF0000, 1, 0x0D8CFF, 1, 0xFF0000, 1, 0x0D8CFF, 1) -- use same function to create gradient but now it works
stage:addChild(pixel)
Tagged:

Comments

Sign In or Register to comment.