It looks like you're new here. If you want to get involved, click one of these buttons!
local canvas = RenderTarget.new(512, 512) local brush = Shape.new() local x, y, w, h = 128, 128, 256, 256 brush:setFillStyle(Shape.SOLID, 0xff4422, 0.1) brush:setLineStyle(2, 0x113311, 0.1) brush:setBlendMode(Sprite.ALPHA) brush:setAlpha(0.1) brush:beginPath() brush:moveTo(x, y) brush:lineTo(x + w, y) brush:lineTo(x + w, y + h) brush:lineTo(x, y + h) brush:lineTo(x, y) brush:endPath() canvas:draw(brush) |
Comments
Edit:
Wait, I think i know what you want to do.
Do you want to create a brush, that when drawn to a canvas, it would have a certain maximum alpha?
It would be hard to do that, not sure how.
For me, i would prefer to create another canvas layer with controlled alpha.
A bit dissapointing but I'm sure I can work around it.