processing.js rect() different border colors

I'm drawing a game grid with rect() and I'd like some borders of my rectangle have different colors.

exemple: I'd like a rectangle with left and right borders green but top and bottom borders blue, do you see a way ?

Thanks

Answers


You can't color rect borders differently, but you can retrace your rect with separate lines:

stroke(0,0,255);
rect(50,50,100,100);
stroke(0,255,0);
line(50,50,50,150);
line(150,50,150,150);

Need Your Help

rails 3: how create a time from hash, like Time.local, except interpret the hash as being in a different time zone?

ruby-on-rails datetime

Given a hash containing time and day, how do I create a time object that is UTC when the hash is some other time zone?

Can I get a compile-time list of all of the case objects which derive from a sealed parent in Scala?

scala

As has been discussed many times on SO, a Scala match will warn you if you don't exhaustively list all of the types deriving from a sealed class.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.