Files
processing4/web/reference/API/redraw.xml
2005-01-27 06:48:42 +00:00

62 lines
852 B
XML

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>redraw()</name>
<category>Structure</category>
<subcategory></subcategory>
<usage>Web &amp; Application</usage>
<example>
<image></image>
<applet></applet>
<code>
float x = 0;
void setup() {
size(200, 200);
noLoop();
}
void draw() {
background(204);
line(x, 0, x, height);
}
void mousePressed() {
x += 1;
redraw();
}
</code>
</example>
<description>
Causes Processing to execute the code within <b>draw()</b> one time. This gives control for updating the display window only when it's necessary.
</description>
<syntax>
redraw()
</syntax>
<parameter>
<label></label>
<description></description>
</parameter>
<returns>None</returns>
<related>
noLoop()
loop()
</related>
<availability>1.0</availability>
<type>Function</type>
<partof>PDE</partof>
</root>