[PD] changing color of canvas dinamically
Mathieu Bouchard
matju at artengine.ca
Fri Nov 4 02:53:44 CET 2005
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
More information about the Pd-list
mailing list