<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://www.computercraft.info/wiki/index.php?action=history&amp;feed=atom&amp;title=Window.redraw</id>
		<title>Window.redraw - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://www.computercraft.info/wiki/index.php?action=history&amp;feed=atom&amp;title=Window.redraw"/>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Window.redraw&amp;action=history"/>
		<updated>2026-07-11T17:07:56Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Window.redraw&amp;diff=6374&amp;oldid=prev</id>
		<title>Bomb Bloke at 12:31, 9 April 2014</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Window.redraw&amp;diff=6374&amp;oldid=prev"/>
				<updated>2014-04-09T12:31:36Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 12:31, 9 April 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 10:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 10:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Generally this is handy if one window has written content over the top of the top of another (of which it is ''not'' a child), and you wish to bring the content of the covered window back to the fore-front of your display.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Generally this is handy if one window has written content over the top of the top of another (of which it is ''not'' a child), and you wish to bring the content of the covered window back to the fore-front of your display.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You need not call this function when simply making a window [[window.setVisible|visible]] or when [[window.reposition|moving / resizing]] it; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;these actions perform automatic redraws&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You need not call this function when simply making a window [[window.setVisible|visible]] or when [[window.reposition|moving / resizing]] it; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;they call it automatically. Redrawing a window also [[window.restoreCursor|restores its cursor]]&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|examples=&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|examples=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Example&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Example&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key ccraft_wiki-mw_:diff:version:1.11a:oldid:6367:newid:6374 --&gt;
&lt;/table&gt;</summary>
		<author><name>Bomb Bloke</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Window.redraw&amp;diff=6367&amp;oldid=prev</id>
		<title>Bomb Bloke: Created page with &quot;{{lowercase}} {{Function |name=window.redraw |args= |returns=None |api=term |addon=ComputerCraft |desc=A function available to window-based terminal objects cre...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Window.redraw&amp;diff=6367&amp;oldid=prev"/>
				<updated>2014-04-08T10:53:31Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{lowercase}} {{Function |name=window.redraw |args= |returns=None |api=term |addon=ComputerCraft |desc=A function available to window-based &lt;a href=&quot;/wiki/Term_(API)&quot; title=&quot;Term (API)&quot;&gt;terminal objects&lt;/a&gt; cre...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{lowercase}}&lt;br /&gt;
{{Function&lt;br /&gt;
|name=window.redraw&lt;br /&gt;
|args=&lt;br /&gt;
|returns=None&lt;br /&gt;
|api=term&lt;br /&gt;
|addon=ComputerCraft&lt;br /&gt;
|desc=A function available to window-based [[term (API)|terminal objects]] created via the [[window (API)|window API]], which re-renders everything that has been rendered via the window in concern (assuming it is [[window.setVisible|visible]]). This includes content rendered via child windows.&lt;br /&gt;
&lt;br /&gt;
Generally this is handy if one window has written content over the top of the top of another (of which it is ''not'' a child), and you wish to bring the content of the covered window back to the fore-front of your display.&lt;br /&gt;
&lt;br /&gt;
You need not call this function when simply making a window [[window.setVisible|visible]] or when [[window.reposition|moving / resizing]] it; these actions perform automatic redraws.&lt;br /&gt;
|examples=&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Draws a checkerboard pattern in a large window, then bounces a smaller window over the top of it, without needing to manually reconstruct the areas rendered over (Ctrl + T to exit):&lt;br /&gt;
|code= local xSize, ySize = term.getSize()&lt;br /&gt;
 &lt;br /&gt;
 -- Draw a checkerboard pattern in a window that covers the screen:&lt;br /&gt;
 local checkerWindow = window.create(term.current(), 1, 1, xSize, ySize)&lt;br /&gt;
 for i=1,ySize do&lt;br /&gt;
 	checkerWindow.setCursorPos(1,i)&lt;br /&gt;
 	for j=1,xSize do&lt;br /&gt;
 		checkerWindow.setBackgroundColor(bit.band(i+j,1) == 1 and colours.white or colours.black)&lt;br /&gt;
 		checkerWindow.write(&amp;quot; &amp;quot;)&lt;br /&gt;
 	end&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 -- Define a small window at the top left of the display:&lt;br /&gt;
 local smallWindow = window.create(term.current(), 1, 1, 5, 1)&lt;br /&gt;
 smallWindow.write(&amp;quot;BOING&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
 -- Bounce the small window around the screen:&lt;br /&gt;
 local xDir, yDir, xPos, yPos = 1, 1, 1, 1&lt;br /&gt;
 &lt;br /&gt;
 while true do&lt;br /&gt;
 	sleep(0.5)&lt;br /&gt;
 	&lt;br /&gt;
 	xPos = xPos + xDir&lt;br /&gt;
 	yPos = yPos + yDir&lt;br /&gt;
 	&lt;br /&gt;
 	checkerWindow.redraw()&lt;br /&gt;
 	smallWindow.reposition(xPos, yPos)&lt;br /&gt;
 	&lt;br /&gt;
 	if xPos == 1 then xDir = 1 end&lt;br /&gt;
 	if yPos == 1 then yDir = 1 end&lt;br /&gt;
 	if xPos == xSize - 4 then xDir = -1 end&lt;br /&gt;
 	if yPos == ySize then yDir = -1 end&lt;br /&gt;
 end&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:API_Functions]]&lt;/div&gt;</summary>
		<author><name>Bomb Bloke</name></author>	</entry>

	</feed>