I need to overlay a .PNG file with transparency on my Processing sketch.
However, my existing code does not constantly update the entire canvas (and it would be time-consuming to recode it for that.)
What are my options for creating a second layer so that the .PNG file can be drawn in front of the existing sketch without having to recode it?
I tried using get() to constantly grab the screen and redraw it, but it's too slow. I'm also looking at PGraphics and the Processing Layers library, but they're a little overwhelming for me.
Hi all,
I am trying to create .vlw files from some fonts on my computer.
However, Processing can't seem to properly display the fonts installed on my computer. See the picture below: the window on the left is Font Book, showing how this font should look. It appears that Processing isn't able to 'unpack' the font suitcase that these fonts are in.
I haven't been able to convert these fonts to .ttf files. Does anyone have any ideas on what the solution would be?
Hi all,
I've got a relatively simple program that (among other things) needs to display several images at 1920x1080.
I have added four images (all .jpgs, ~300kb each) along with a few fonts (~20-500kb each) and I am now getting out-of-memory errors. I would prefer not to increase the allocated memory because this needs to work on low-grade computers.
I would like to, eventually, display dozens of images but it seems I'll need a different strategy to work with them.
Currently, I am loading them as
PImages in
setup() and calling them throughout the program. Is there any way to "un-load" the images after I have used them? They will be displayed in a sequential fashion, so it would be fine to un-load them after display.
thanks!
error, disabling serialEvent() for /dev/tty.usbserial-A900frjp
java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at processing.serial.Serial.serialEvent(Serial.java:238)
at gnu.io.RXTXPort.sendEvent(RXTXPort.java:772)
at gnu.io.RXTXPort.eventLoop(Native Method)
at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1641)
Caused by: java.lang.OutOfMemoryError: Java heap space
at processing.core.PImage.init(PImage.java:194)
at processing.core.PImage.<init>(PImage.java:161)
at processing.core.PGraphicsJava2D.getImpl(PGraphicsJava2D.java:1796)
at processing.core.PImage.get(PImage.java:625)
at processing.core.PGraphicsJava2D.get(PGraphicsJava2D.java:1809)
at processing.core.PApplet.get(PApplet.java:10402)
at Proc__Brain_Visual_2011_09_28.serialEvent(Proc__Brain_Visual_2011_09_28.java:242)
Hi all,
I've got a program that draws shapes based on Arduino sensor data. I would like to temporarily display a graphic over the screen and then revert back to the previous screen.
What is the simplest way to do this?
My program does not currently log the data that dictates the shapes drawn.
Ideally, I would like to create a canvas on top of my previous screen that would function independently, although I don't think this is possible.
I can only think of two solutions to this problem. I'd appreciate hearing more ideas, or feedback on these:
Capture the screen before the graphic and then re-display it after the graphic.
Store the Arduino data in an array so the screen can be recalculated and displayed