It looks like you're new here. If you want to get involved, click one of these buttons!
local shape = Shape.new() shape:setFillStyle(Shape.SOLID, 0xff0000, 1) shape:beginPath() shape:moveTo(0,0) shape:lineTo(100, 0) shape:lineTo(100, 100) shape:lineTo(0, 100) shape:lineTo(0, 0) shape:endPath() stage:addChild(shape) local width = 100 local height = 5 -- Using a value of 10 works on all devices local rt = RenderTarget.new( width, height ) local bitmap = Bitmap.new( rt ) rt:draw( shape ) bitmap:setX( 125 ) stage:addChild( bitmap ) |
Comments
In this case I do need RenderTarget, or... actually, maybe I could just clip the bitmap? Will come back after some tests.
Likes: antix, john26
https://deluxepixel.com
https://deluxepixel.com