Page 1 of 1

Empty canvas is filled with a color?

PostPosted: Sat Jul 16, 2016 4:43 pm
by schnellboot
Hi guys,
I don't know if you ever noticed that, but I did right now:
canvas.png
You can clearly see that the color darkens, as they overlap.


Now this is a problem because I will be using each canvas for a line that goes from A to B.
They also need to be destroyed/erased separately.
Maybe I'm better off with a single canvas, if so how would I erase a single line. (All have the same color)

Re: Empty canvas is filled with a color?

PostPosted: Sun Jul 17, 2016 4:22 pm
by lcl
I've known that for a long time. It's easy to fix though. Just do an erase() with full transparency (1.0) on create actor event.

By the way, how exactly did you intend to use multiple canvases? You do know that cloning a canvas won't work, as all the clones will share the same drawings?

Re: Empty canvas is filled with a color?

PostPosted: Mon Jul 18, 2016 7:57 am
by schnellboot
Thanks for the info.
What is the way to go then?
I need to draw lines that are separately removable.

Re: Empty canvas is filled with a color?

PostPosted: Mon Jul 18, 2016 9:25 am
by lcl
schnellboot wrote:Thanks for the info.
What is the way to go then?
I need to draw lines that are separately removable.

The solution depends on your case. How many lines there will be approximately - will re-drawing the whole sscreen be out of question? Will the lines intersect? If not, you could erase a line by drawing a fully transparent line over it.