hello people, do anybody know if its posible to change the color of a canvas dynamically? for example with a bang? any idea?
thanks in advance
matias kapo matiaskapo@fastmail.fm
Hallo, matias kapo hat gesagt: // matias kapo wrote:
hello people, do anybody know if its posible to change the color of a canvas dynamically? for example with a bang? any idea?
If you right-click on the active zone of a [cnv] object and select "Help", then look in [pd edit] you will find the messages to change the colors of [cnv] objects. The same principle works for all IEM-GUI objects (tgl, nbx, hsl, ...)
Frank Barknecht _ ______footils.org_ __goto10.org__
On Wed, 2 Nov 2005, matias kapo wrote:
hello people, do anybody know if its posible to change the color of a canvas dynamically? for example with a bang? any idea?
If you mean a [cnv] object, then you need to set a receive-symbol on it and send messages to it like "color -666" where the number is computed this way:
red | [* 256] | [+] <- green | [* 256] | [+] <- blue | [* -1] | [- 1] | [color $1} | [s my_cnv]
where [} is a msgbox
However, if you mean coloring the background of a [pd] object or other patcher, GOP or not, then you can't using Pd internals, which you can circumvent by covering the whole patcher using a very big [cnv]. You may also use TOXY (by Krzysztof Czaya) to issue Tcl/Tk commands from Pd.
Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju Freelance Digital Arts Engineer, Montréal QC Canada