How would you gradientize a canvas with curved eges?

Non-platform specific questions.

How would you gradientize a canvas with curved eges?

Postby Hblade » Sun Sep 06, 2009 2:19 pm

Ok, I have the curved edges part, now I need it to fill up the inside of it with a gradient, but it works with ANY size, say I have one menu 160x340, and another one 150x400, I need them BOTH to be gradientized... o.o I just need a code that fills it up with a gradient. BUT! I cant use erase to fill it with color because it fills it past the curved edges
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: How would you gradientize a canvas with curved eges?

Postby pyrometal » Sun Sep 06, 2009 6:39 pm

Use moveto() and lineto(), I've done something like this before here:
http://game-editor.com/forum/viewtopic.php?f=4&t=6243&hilit=+dialogue
SPRITE WARRIOR:
Free, open-source & crossplatform pixel art editor (currently under construction).
User avatar
pyrometal
 
Posts: 706
Joined: Wed Nov 28, 2007 4:07 am
Location: Kingston, ON, Canada
Score: 86 Give a positive score

Re: How would you gradientize a canvas with curved eges?

Postby Hblade » Sun Sep 06, 2009 10:11 pm

Thanks, but would you mind explaining these methods?
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: How would you gradientize a canvas with curved eges?

Postby cforall » Mon Sep 07, 2009 12:26 am

To pyrometal
:D man your Dialogue engine really blow my mind, I can see you embedded it in your GameOver Land! such good effect!

To Hblade
:D Of course pyrometal did a good job, its pure code but still pixel-level job , if what you want is a BIG rounded rectangle that will be tough... in my opinion 160x340 is big :mrgreen: :mrgreen:
How about making some gradient images and then use draw_from to draw them on canvas by right scale...

Its just lazy man's lazy idea... :mrgreen: :mrgreen: :mrgreen: :mrgreen:
User avatar
cforall
 
Posts: 65
Joined: Thu Aug 06, 2009 2:46 pm
Location: Shanghai
Score: 8 Give a positive score

Re: How would you gradientize a canvas with curved eges?

Postby Hblade » Mon Sep 07, 2009 2:39 am

Hehe, well you see, using scale only scales BOTH width and height, you cant, say "Stretch to size" it.
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: How would you gradientize a canvas with curved eges?

Postby Hblade » Mon Sep 07, 2009 2:51 pm

I found a way, and It's called CTW
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron