[PLUGIN] Canvas

Post your completed addons to share with the community

Post » Fri Jun 09, 2017 4:42 pm

Oh, right. I looked at your example and you need to make the x,y values of the flood fill integers:
int(Mouse.X-Canvas.X)
B
92
S
32
G
107
Posts: 5,274
Reputation: 69,959

Post » Fri Jun 09, 2017 4:55 pm

@R0J0hound it works! Thank you, you're a genius ^^
Even though the coloring is not perfect on the edges (uncolored pixels showing up,) I think I can find a workaround, unless you have any tips, thanks again! ^^
B
19
S
4
G
3
Posts: 56
Reputation: 3,692

Post » Sat Jun 10, 2017 1:39 am

It's just a flaw that non integer positions cause it to freeze. I really shouldn't make plugins since I have no intention to edit the plugin to fix it.

The pixels at the edges that aren't filling are actually slightly different colors due to antialiasing and filtering. A threshold flood fill that is able to fill similar colors would work better. It's not terribly useful for me to mention it as the plugin doesn't have that feature and I won't be implimenting it.
B
92
S
32
G
107
Posts: 5,274
Reputation: 69,959

Post » Sun Jun 11, 2017 7:51 pm

Don't we have the close path action?
I really need it

edit: doesn't matter I added Close Path to the plugin
B
45
S
19
G
3
Posts: 102
Reputation: 4,598

Post » Tue Jun 13, 2017 6:43 am

Is there a way to erase points?
B
8
Posts: 8
Reputation: 322

Post » Tue Jun 13, 2017 1:54 pm

@R0J0hound thanks again for the details, no worries I understand that it may be impossible to keep working on updates for free (it never ends i guess!)
But if you ever think of making plugins then please do! Sometimes there are no other ways to do certain types of things (floodfill in my case) I wish I could do programming, alas i'm just a graphics guy :)
So i'll always prefer finding a plugin for something, even if it doesn't work 100%, instead of finding nothing at all hehe.
Thanks again for the tips (my workaround would be using a top sprite to hide the edges, and the canvas object under it, so the pixels will not show, already tested)
I wish C2 supported vector objects, I guess it would have made this simple interaction so much easier!
Thanks again!
B
19
S
4
G
3
Posts: 56
Reputation: 3,692

Post » Wed Jun 14, 2017 8:20 pm

Could someone please port this to a proper .c3addon so I can use it in Construct 3? Please and THANK YOU
B
5
S
1
Posts: 4
Reputation: 383

Post » Thu Jun 15, 2017 9:51 am

i'm developing a coloring book and some leads are pointing me to this plug in. i just want to know if there will be an option such as a paint bucket, drag and drop colors to a line art. I would like to have a tutorial on that =(
B
9
Posts: 10
Reputation: 339

Post » Thu Jul 06, 2017 6:33 am

I could use some help on this one - how would one do the following?

- On Right Mouse down...
Fill Canvas2 color "rbg("&Canvas.redAt(Mouse.X, Mouse.Y)&","&Canvas.greeAt(Mouse.X, Mouse.Y)& etc. etc. etc.

When I do this, it works great, but when I zoom in the canvas or move the canvas, it visually zooms and moves around, but the color picker doesn't work properly. It's as if the canvas isn't updating when it moves or is resized.

Am I doing something wrong?
B
40
S
12
G
1
Posts: 532
Reputation: 4,147

Post » Thu Jul 06, 2017 5:00 pm

Okay, I've managed to figure that out (it appears you just have to clear and redraw anytime the canvas is moved).

However, now I'm unable to fill a canvas using variables. If I do "rbg("&variable1&","&variable2&","&variable3&")", it doesn't do anything (but if I set that to text, it comes out as "rgb(150, 150, 150)"). If I set the fill to those exact numbers, it fills fine. Any idea why it can't handle variables? I've tried putting it all to a string and setting the fill based on the string, putting str() around it...I can't for the life of me figure it out.
B
40
S
12
G
1
Posts: 532
Reputation: 4,147

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 4 guests