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

Visual Studio Performance Choice - ESXi or Vista?

visual-studio hardware productivity vmware virtualization

Following on from my earlier question, I have today ordered a 300GB VelociRaptor and 8GB of RAM for my home development rig (ASUS P5N-E with an E6600 chip).

In Excel, add 1 if not number, or else add the number

excel excel-formula

In excel, how do I write a formula that does the following:

How to download a webpage for offline viewing on Nexus 7

android tablet nexus-7

I have a webpage that I would like to view when I am not in a WIFI area on my Nexus 7 tablet.