Reply To: How to use createDashedStroke

Home Forums General Programming How to use createDashedStroke Reply To: How to use createDashedStroke

#27054
atom
Keymaster
    • Topics: 159
    • Replies: 2945
    • Total: 3104
    • ★★★★★

    This seems impossible at the moment, i have no idea how to pass a const float * type in Lua, i’ll write a wrapper to simplify this process asap and post an example. To draw a path that’s a line:

    drawPanel = function(canvas,g)
    	p = Path()
    	p:startNewSubPath (0.0, 0.0);
    	p:lineTo (100, 100);
    	
    	stroke = PathStrokeType (5.0, PathStrokeType.mitered, PathStrokeType.butt)
    	
    	trans = AffineTransform()
    	g:strokePath (p, stroke, trans)
    end
    Ctrlr