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 ?
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);