I'm trying to draw a line that looks like this:

Line 1

I'm hoping to achieve this by drawing a line like this:

Line 2

and then somehow clipping it with a rect to look like the line above.

I'd like to use the CanvasItem draw_* functions, but I can't work out how to set a stencil test or a clipping mask that could clip out certain pixels when drawing. Is this even a feature that exists in Godot?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.