Empty canvas is filled with a color?

Game Editor comments and discussion.

Empty canvas is filled with a color?

Postby schnellboot » Sat Jul 16, 2016 4:43 pm

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)
Attachments
canvas.ged
(4.72 KiB) Downloaded 122 times
schnellboot
 
Posts: 819
Joined: Sat Mar 31, 2007 1:35 pm
Location: Germany
Score: 102 Give a positive score

Re: Empty canvas is filled with a color?

Postby lcl » Sun Jul 17, 2016 4:22 pm

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?
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: Empty canvas is filled with a color?

Postby schnellboot » Mon Jul 18, 2016 7:57 am

Thanks for the info.
What is the way to go then?
I need to draw lines that are separately removable.
schnellboot
 
Posts: 819
Joined: Sat Mar 31, 2007 1:35 pm
Location: Germany
Score: 102 Give a positive score

Re: Empty canvas is filled with a color?

Postby lcl » Mon Jul 18, 2016 9:25 am

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.
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest