Help with PGraphics

Hey,

I have my drawing app going, but when I created a menu bar, my drawing 'effects' would effect the menu bar as well.I thought that the problem would be fixed by seperating the drawing onto its own PGraphics layer, but when I do this it won't show anything until I use blur, erode or dilate, at which point they appear black and with an outline.

I'm running in the Processing 2.0 app. (PJS and Peep issue below).

If you open up the code below and paste it into Processing you will see what I mean (hit the plus sign on the right).

Controls are 'b' for blur, 'e' for erode and 'd' for dilate. Also 'r' for refresh and 'm' to change modes.

I'll also post the normal code without PGraphics after this.

EDIT: I've made a big update below that needs to be updated for my PGraphics problem (the sketch in this post).

Last modified on 12 Jun 2013 at 10:25pm

    EDIT: Fixed below.

    Last modified on 12 Jun 2013 at 7:10pm

    updated the code. I had used some names twice as functions and variables, which worked under Processing but not JS/Peep.

    Here's the latest example, working on Peep, just the mode switch seems to be a bit dodgy....and I still need to figure out getting PGraphics working.

    Here's mine. Finally got it to work by changing PGraphics background to just PGraphics BG. It's kinda slow but it does work slightly...hopefully there might be the answer within lines 1 - 170.

    UPDATE: Ohk. It works very slow on my laptop, but its fine on my PC, yet, it's very glitchy.

    Last modified on 12 Jun 2013 at 7:40pm

    wow dude, yours looks crazy! thanks for the share.

    I managed to get it all working now, I think it was my duplicates that were making everything go haywire! PGraphics stuff is working as expected now =D