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) |
Comments
opacity = 0 you don't see it, > 0 you see it
Source:
https://github.com/MultiPain/Gideros_examples/blob/master/ColorPicker/
Likes: hgy29, MoKaLux, antix
Likes: MoKaLux
Fragmenter - animated loop machine and IKONOMIKON - the memory game
ColorPicker.lua:212: attempt to perform arithmetic on field 'cellSpacingX' (a nil value)
stack traceback:
ColorPicker.lua:212: in function 'init'
[string "property.lua"]:59: in function '__new'
[string "property.lua"]:66: in function 'new'
main.lua:3: in main chunk
Fragmenter - animated loop machine and IKONOMIKON - the memory game
https://wiki.giderosmobile.com/index.php/Sprite:setLayoutParameters
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Code here:
https://github.com/MultiPain/Gideros_examples/tree/master/GammaCorrection
But I replaced a few lines: