<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.sierrahelp.com/index.php?action=history&amp;feed=atom&amp;title=Draw</id>
	<title>Draw - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.sierrahelp.com/index.php?action=history&amp;feed=atom&amp;title=Draw"/>
	<link rel="alternate" type="text/html" href="http://wiki.sierrahelp.com/index.php?title=Draw&amp;action=history"/>
	<updated>2026-11-23T08:40:55Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>http://wiki.sierrahelp.com/index.php?title=Draw&amp;diff=89058&amp;oldid=prev</id>
		<title>Andrew Branscom: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="http://wiki.sierrahelp.com/index.php?title=Draw&amp;diff=89058&amp;oldid=prev"/>
		<updated>2025-04-03T21:04:08Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:04, 3 April 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Andrew Branscom</name></author>
	</entry>
	<entry>
		<id>http://wiki.sierrahelp.com/index.php?title=Draw&amp;diff=89057&amp;oldid=prev</id>
		<title>en&gt;Andrew Korson at 19:39, 30 March 2019</title>
		<link rel="alternate" type="text/html" href="http://wiki.sierrahelp.com/index.php?title=Draw&amp;diff=89057&amp;oldid=prev"/>
		<updated>2019-03-30T19:39:11Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The &amp;#039;&amp;#039;&amp;#039;draw&amp;#039;&amp;#039;&amp;#039; command draws a [[screen object]] on the visual screen so it will be visible in subsequent [[interpreter cycles]].&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
draw([[screen object|obj]] oA);&lt;br /&gt;
&lt;br /&gt;
== Remarks ==&lt;br /&gt;
&lt;br /&gt;
A [[screen object]] will not appear on the [[graphics screen]] until the object is [[initialized]], a [[view]] is assigned, the object is [[positioned]], and finally the &amp;#039;&amp;#039;&amp;#039;draw&amp;#039;&amp;#039;&amp;#039; command is executed.&lt;br /&gt;
&lt;br /&gt;
Once the object number is validated, AGI enables it for [[updating]] (if not already enabled) and then validates the object&amp;#039;s position using the [[shuffling]] method. The object is then added to the screen, where it will be visible and updated in subsequent [[interpreter cycles]]. &lt;br /&gt;
&lt;br /&gt;
If the &amp;#039;&amp;#039;&amp;#039;draw&amp;#039;&amp;#039;&amp;#039; command is used on an object that is already visible AGI ignores the command.&lt;br /&gt;
&lt;br /&gt;
Use the &amp;#039;&amp;#039;&amp;#039;[[erase]]&amp;#039;&amp;#039;&amp;#039; command to erase a [[screen object]] from the screen.&lt;br /&gt;
&lt;br /&gt;
== Possible Errors ==&lt;br /&gt;
&lt;br /&gt;
If the screen object is not properly initialized when the &amp;#039;&amp;#039;&amp;#039;draw&amp;#039;&amp;#039;&amp;#039; command is executed, AGI will try to access invalid memory while trying to position and draw the object, resulting in unpredictable results, including possibly [[crashing AGI]].&lt;br /&gt;
&lt;br /&gt;
When the &amp;#039;&amp;#039;&amp;#039;draw&amp;#039;&amp;#039;&amp;#039; command is executed, AGI first checks that the object&amp;#039;s number is less than or equal to the [[max screen object]] number; if not, it raises [[trappable error #19]].&lt;br /&gt;
&lt;br /&gt;
If a view has not been assigned to the object, AGI will raise [[trappable error #20]].&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;CodeBlockHeader&amp;quot;&amp;gt;Code:&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;agi&amp;quot;&amp;gt;&lt;br /&gt;
animate.obj(o5);       [ initialize first&lt;br /&gt;
load.view(8);          [ load a view for the object&lt;br /&gt;
set.view(o5, 8);       [ assign the  view to the object&lt;br /&gt;
position(o5, 72, 144); [ position the object on the screen]&lt;br /&gt;
draw(o2);              [ now draw it after all setup is done&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Technical Information ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color: #efefef&amp;quot; width=&amp;quot;200&amp;quot; | &amp;#039;&amp;#039;&amp;#039;Required Interpreter Version:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| width=&amp;quot;175&amp;quot; | Available in all AGI versions.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color: #efefef&amp;quot; | &amp;#039;&amp;#039;&amp;#039;Byte-Code Value:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| 35 (0x23 hex)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[[animate.obj]]&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[[erase]]&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[[load.view]]&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[[position]]&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[[set.view]]&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Category:Commands]]&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>en&gt;Andrew Korson</name></author>
	</entry>
</feed>