<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.spheredev.org/index.php?action=history&amp;feed=atom&amp;title=Legacy%3AFunctions%2FSurfaces</id>
		<title>Legacy:Functions/Surfaces - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.spheredev.org/index.php?action=history&amp;feed=atom&amp;title=Legacy%3AFunctions%2FSurfaces"/>
		<link rel="alternate" type="text/html" href="http://wiki.spheredev.org/index.php?title=Legacy:Functions/Surfaces&amp;action=history"/>
		<updated>2026-05-25T06:53:09Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.29.0</generator>

	<entry>
		<id>http://wiki.spheredev.org/index.php?title=Legacy:Functions/Surfaces&amp;diff=690&amp;oldid=prev</id>
		<title>Apollolux: /* Surfaces */ fix link</title>
		<link rel="alternate" type="text/html" href="http://wiki.spheredev.org/index.php?title=Legacy:Functions/Surfaces&amp;diff=690&amp;oldid=prev"/>
				<updated>2013-06-04T05:27:55Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Surfaces: &lt;/span&gt; fix link&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&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;' lang='en'&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 05:27, 4 June 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l94&quot; &gt;Line 94:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 94:&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;* [[API:Surface/zoomBlitMaskSurface|Surface.zoomBlitMaskSurface]](surface, x, y, factor, mask [, mask_blend_mode]): [[API:Surface/zoomBlitSurface|zoomBlitSurface]] + [[API:Surface/blitMaskSurface|blitMaskSurface]]&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;* [[API:Surface/zoomBlitMaskSurface|Surface.zoomBlitMaskSurface]](surface, x, y, factor, mask [, mask_blend_mode]): [[API:Surface/zoomBlitSurface|zoomBlitSurface]] + [[API:Surface/blitMaskSurface|blitMaskSurface]]&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;* [[API:Surface/transformBlitSurface|Surface.transformBlitSurface]](surface, x1, y1, x2, y2, x3, y3, x4, y4): draws 'surface' onto the surface_object with &amp;quot;transformation&amp;quot;, where (x1, y1) is the upper left corner, (x2, y2) the upper right corner, (x3, y3) is the lower right corner, and (x4, y4) is the lower left corner.&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;* [[API:Surface/transformBlitSurface|Surface.transformBlitSurface]](surface, x1, y1, x2, y2, x3, y3, x4, y4): draws 'surface' onto the surface_object with &amp;quot;transformation&amp;quot;, where (x1, y1) is the upper left corner, (x2, y2) the upper right corner, (x3, y3) is the lower right corner, and (x4, y4) is the lower left corner.&lt;/div&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;* [[API:Surface/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;clone&lt;/del&gt;|Surface.transformBlitMaskSurface]](surface, x1, y1, x2, y2, x3, y3, x4, y4, mask [, mask_blend_mode]): [[API:Surface/transformBlitSurface|transformBlitSurface]] + [[API:Surface/blitMaskSurface|blitMaskSurface]]&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;* [[API:Surface/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;transformBlitMaskSurface&lt;/ins&gt;|Surface.transformBlitMaskSurface]](surface, x1, y1, x2, y2, x3, y3, x4, y4, mask [, mask_blend_mode]): [[API:Surface/transformBlitSurface|transformBlitSurface]] + [[API:Surface/blitMaskSurface|blitMaskSurface]]&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;&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;==== Conversion to image ====&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;==== Conversion to image ====&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Apollolux</name></author>	</entry>

	<entry>
		<id>http://wiki.spheredev.org/index.php?title=Legacy:Functions/Surfaces&amp;diff=615&amp;oldid=prev</id>
		<title>Apollolux: blend modes name change</title>
		<link rel="alternate" type="text/html" href="http://wiki.spheredev.org/index.php?title=Legacy:Functions/Surfaces&amp;diff=615&amp;oldid=prev"/>
				<updated>2013-06-02T00:32:45Z</updated>
		
		<summary type="html">&lt;p&gt;blend modes name change&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&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;' lang='en'&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 00:32, 2 June 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l17&quot; &gt;Line 17:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 17:&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;==== Drawing on surfaces ====&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;==== Drawing on surfaces ====&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;* [[Blend &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Modes&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;* [[Blend &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;modes&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;** BLEND (default for drawing)&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;** BLEND (default for drawing)&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;** REPLACE&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;** REPLACE&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Apollolux</name></author>	</entry>

	<entry>
		<id>http://wiki.spheredev.org/index.php?title=Legacy:Functions/Surfaces&amp;diff=614&amp;oldid=prev</id>
		<title>Apollolux: API convention</title>
		<link rel="alternate" type="text/html" href="http://wiki.spheredev.org/index.php?title=Legacy:Functions/Surfaces&amp;diff=614&amp;oldid=prev"/>
				<updated>2013-06-02T00:31:52Z</updated>
		
		<summary type="html">&lt;p&gt;API convention&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&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;' lang='en'&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 00:31, 2 June 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&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;== Surfaces ==&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;== Surfaces ==&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;* [[API:CreateSurface|CreateSurface]](''width'', ''height'', ''color''): Create a [[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Object-&lt;/del&gt;Surface|Surface]] of dimensions (''width'', ''height''), filled with ''color''.&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;* [[API:CreateSurface|CreateSurface]](''width'', ''height'', ''color''): Create a [[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;API:&lt;/ins&gt;Surface|Surface]] of dimensions (''width'', ''height''), filled with ''color''.&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;&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;* [[API:LoadSurface|LoadSurface]](''filename''): Create a [[API:Surface|Surface]] from an image given by ''filename''.&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;* [[API:LoadSurface|LoadSurface]](''filename''): Create a [[API:Surface|Surface]] from an image given by ''filename''.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Apollolux</name></author>	</entry>

	<entry>
		<id>http://wiki.spheredev.org/index.php?title=Legacy:Functions/Surfaces&amp;diff=483&amp;oldid=prev</id>
		<title>Apollolux: created</title>
		<link rel="alternate" type="text/html" href="http://wiki.spheredev.org/index.php?title=Legacy:Functions/Surfaces&amp;diff=483&amp;oldid=prev"/>
				<updated>2013-05-22T17:34:59Z</updated>
		
		<summary type="html">&lt;p&gt;created&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Surfaces ==&lt;br /&gt;
&lt;br /&gt;
* [[API:CreateSurface|CreateSurface]](''width'', ''height'', ''color''): Create a [[Object-Surface|Surface]] of dimensions (''width'', ''height''), filled with ''color''.&lt;br /&gt;
&lt;br /&gt;
* [[API:LoadSurface|LoadSurface]](''filename''): Create a [[API:Surface|Surface]] from an image given by ''filename''.&lt;br /&gt;
&lt;br /&gt;
* [[API:GrabSurface|GrabSurface]](''x'', ''y'', ''width'', ''height''): Grab the screen contents at (''x'', ''y'', ''width'', ''height'') and store it in a new Surface.&lt;br /&gt;
&lt;br /&gt;
=== Surface object ===&lt;br /&gt;
&lt;br /&gt;
* Sphere [[API:Surface|Surface]] object: A picture canvas in memory that can be drawn to.&lt;br /&gt;
&lt;br /&gt;
* [[API:Surface/setAlpha|Surface.setAlpha]](alpha): sets the alpha of the surface&lt;br /&gt;
* [[API:Surface/clone|Surface.clone]](): Create a copy of the surface object.&lt;br /&gt;
* [[API:Surface/cloneSection|Surface.cloneSection]](x, y, w, h): returns a new surface object with the height and width of h and w, with part of image at (x,y) from the surface_object with the width w and height h.&lt;br /&gt;
&lt;br /&gt;
==== Drawing on surfaces ====&lt;br /&gt;
&lt;br /&gt;
* [[Blend Modes]]&lt;br /&gt;
** BLEND (default for drawing)&lt;br /&gt;
** REPLACE&lt;br /&gt;
** RGB_ONLY&lt;br /&gt;
** ALPHA_ONLY&lt;br /&gt;
** ADD&lt;br /&gt;
** SUBTRACT&lt;br /&gt;
** MULTIPLY (default for masking)&lt;br /&gt;
** AVERAGE&lt;br /&gt;
** INVERT&lt;br /&gt;
&lt;br /&gt;
* [[API:Surface/setBlendMode|Surface.setBlendMode]](mode): Sets the blend mode of the surface, which will affect any drawing operation on the surface. 'mode' must be one of the available blend modes for surfaces.&lt;br /&gt;
&lt;br /&gt;
* [[API:Surface/getPixel|Surface.getPixel]](''x'', ''y''): Get the color of the pixel at (''x'', ''y'') on the surface.&lt;br /&gt;
* [[API:Surface/setPixel|Surface.setPixel]](x, y, color): Set the pixel at (''x'', ''y'') on the surface to ''color''.&lt;br /&gt;
* [[API:Surface/replaceColor|Surface.replaceColor]](oldColor, newColor): replace all pixels of the color oldColor in the surface with newColor&lt;br /&gt;
&lt;br /&gt;
===== Primitives on surfaces =====&lt;br /&gt;
&lt;br /&gt;
* [[API:Surface/pointSeries|Surface.pointSeries]](array, color): plots a series of points colored with color onto the surface with array filled with objects (each object must have a 'x' and 'y' property)&lt;br /&gt;
* [[API:Surface/line|Surface.line]](''x1'', ''y1'', ''x2'', ''y2'', ''color''): Draw a line onto the surface starting from (''x1'', ''y1'') to (''x2'', ''y2'') with ''color''.&lt;br /&gt;
* [[API:Surface/gradientLine|Surface.gradientLine]](''x1'', ''y1'', ''x2'', ''y2'', ''color1'', ''color2''): Draw a line onto the surface starting from (''x1'', ''y1'') to (''x2'', ''y2'') with a color fade from ''color1'' to ''color2''.&lt;br /&gt;
* [[API:Surface/lineSeries|Surface.lineSeries]](array, color [, type]): draws a series of lines colored with color onto the surface with array filled with objects (each object must have a 'x' and 'y' property)&lt;br /&gt;
* [[API:Surface/bezierCurve|Surface.bezierCurve]](color, step, Ax, Ay, Bx, By, Cx, Cy [, Dx] [, Dy]): Draws a Bezier curve colored with color onto the surface with step being a floating point number in the range 0 &amp;lt; step &amp;lt;= 1.0 and the points:&lt;br /&gt;
*:	(Ax, Ay: coordinates of the endpoint A),&lt;br /&gt;
*:	(Bx, By: coordinates of A's control point B)&lt;br /&gt;
*:	(Cx, Cy: coordinates of the endpoint C)&lt;br /&gt;
*:	(Dx, Dy: optional, coordinates of C's control point D - if omitted, B is also C's control point)&lt;br /&gt;
* [[API:Surface/outlinedRectangle|Surface.outlinedRectangle]](''x'', ''y'', ''width'', ''height'', ''color'' [, ''size'']): Draw an outlined rectangle onto the surface at (''x'', ''y'') of ''width'' and ''height'' colored with ''color'' and with ''size'' determining the thickness.&lt;br /&gt;
* [[API:Surface/rectangle|Surface.rectangle]](''x1'', ''y1'', ''x2'', ''y2'', ''color''): Draw a filled rectangle on the surface from (''x1'', ''y1'') to  (''x2'', ''y2'') with ''color''.&lt;br /&gt;
* [[API:Surface/gradientRectangle|Surface.gradientRectangle]](x, y, w, h, c_ul, c_ur, c_lr, c_ll): Draws a gradient rectangle onto the surface at (x,y) with the height h and width w and a gradient of colors graduating from each corner of the rectangle as follows:&lt;br /&gt;
*:	c_ul = color of upper left corner &lt;br /&gt;
*:	c_ur = color of upper right corner&lt;br /&gt;
*:	c_lr = color of lower right corner&lt;br /&gt;
*:	c_ll = color of lower left corner&lt;br /&gt;
* [[API:Surface/triangle|Surface.triangle]](''x1'', ''y1'', ''x2'', ''y2'', ''x3'', ''y3'', ''color''): Draw a filled triangle with points (''x1'', ''y1''), (''x2'', ''y2''), (''x3'', ''y3'') with ''color''.&lt;br /&gt;
* [[API:Surface/gradientTriangle|Surface.gradientTriangle]](x1, y1, x2, y2, x3, y3, c1, c2, c3): Draws a gradient triangle onto the surface with the points (x1, y1), (x2, y2), (x3, y3), with each point (c1 = color of (x1, y1), c2 = color of (x2, y2), c3 = color of (x3, y3)) having a color to generate the gradient of the triangle&lt;br /&gt;
* [[API:Surface/polygon|Surface.polygon]](array, color [, invert]): draws a filled polygon colored with color onto the surface with array filled with objects (each object must have a 'x' and 'y' property)&lt;br /&gt;
*:	If invert is true, all points in the bounding box of the polygon, but not in the polygon will be colored.&lt;br /&gt;
* [[API:Surface/outlinedEllipse|Surface.outlinedEllipse]](x, y, rx, ry, c): Draws an outlined ellipse at (x, y) with rx being the horizontal radius and ry the vertical radius onto the surface with the color c&lt;br /&gt;
* [[API:Surface/filledEllipse|Surface.filledEllipse]](x, y, rx, ry, c): Draws a filled ellipse at (x, y) with rx being the horizontal radius and ry the vertical radius onto the surface with the color c&lt;br /&gt;
* [[API:Surface/outlinedCircle|Surface.outlinedCircle]](x, y, radius, color [, antialias]): Draws an outlined circle at (x, y) colored with color onto the surface if antialias is true, the circle will be antialiased&lt;br /&gt;
* [[API:Surface/filledCircle|Surface.filledCircle]](x, y, radius, color [, antialias]): Draws a filled circle at (x, y) colored with color onto the surface if antialias is true, the circle will be antialiased&lt;br /&gt;
* [[API:Surface/gradientCircle|Surface.gradientCircle]](x, y, radius, color1, color2 [, antialias]): Draws a gradient circle at (x, y) onto the surface colored with a fading color from color1 to color2 if antialias is true, the circle will be antialiased&lt;br /&gt;
&lt;br /&gt;
===== Text on surfaces =====&lt;br /&gt;
&lt;br /&gt;
* [[API:Surface/drawText|Surface.drawText]](font, x, y, text): draws 'text' at x, y with the font onto the surface_object&lt;br /&gt;
* [[API:Surface/drawZoomedText|Surface.drawZoomedText]](font, x, y, scale, text): draws scaled text (1.0 = normal) with (x,y) as the upper left corner onto the surface_object&lt;br /&gt;
* [[API:Surface/drawTextBox|Surface.drawTextBox]](font, x, y, w, h, offset, text): draws a word-wrapped text at (x, y) onto the surface_object with the width w and height h. The offset is the number of pixels which the number of pixels from y which the actual drawing starts at. See [[API:Font/drawTextBox|Font.drawTextBox]] for more detail.&lt;br /&gt;
&lt;br /&gt;
==== Manipulating surfaces ====&lt;br /&gt;
&lt;br /&gt;
* [[API:Surface/rotate|Surface.rotate]](''angle'', ''resize''): Rotate the surface by ''angle'' radians, ''resize'' to fit if requested.&lt;br /&gt;
* [[API:Surface/resize|Surface.resize]](w, h): resizes the surface images. This does not stretch or shrink the image inside the surface.&lt;br /&gt;
* [[API:Surface/rescale|Surface.rescale]](w, h): stretches or shrinks the surface to the new width w and height h&lt;br /&gt;
* [[API:Surface/flipHorizontally|Surface.flipHorizontally]](): flips the surface horizontally&lt;br /&gt;
* [[API:Surface/flipVertically|Surface.flipVertically]](): flips the surface vertically&lt;br /&gt;
&lt;br /&gt;
===== Color effects =====&lt;br /&gt;
&lt;br /&gt;
* [[API:Surface/applyLookup|Surface.applyLookup]](x, y, w, h, red_lookup, green_lookup, blue_lookup, alpha_lookup): Apply a lookup table transformation to the pixels contained in x, y, w, h&lt;br /&gt;
*:	The lookup parameters are arrays of 256 elements containg the new pixel values, ex: &amp;lt;code&amp;gt;var invert_lookup = [255, 254, 253, 252, 251, ..., 4, 3, 2, 1, 0];&amp;lt;/code&amp;gt;&lt;br /&gt;
* [[API:Surface/applyColorFX|Surface.applyColorFX]](x, y, w, h,  colormatrix): Apply the colormatrix to the pixels contained in x, y, w, h (see [[API:CreateColorMatrix|CreateColorMatrix]])&lt;br /&gt;
* [[API:Surface/applyColorFX4|Surface.applyColorFX4]](x, y, w, h,  cm_upperleft, cm_upperright, cm_lowerleft, cm_lowerright): Apply 4 color matrices. Each corner has a separate color matrix. (see [[API:CreateColorMatrix|CreateColorMatrix]])&lt;br /&gt;
&lt;br /&gt;
==== Drawing (blitting) surfaces ====&lt;br /&gt;
&lt;br /&gt;
* [[API:Surface/blit|Surface.blit]](''x'', ''y''): Draw the surface on the screen at (''x'', ''y'').&lt;br /&gt;
* [[API:Surface/blitSurface|Surface.blitSurface]](surface, x, y): draws 'surface' onto 'surface_object' at (x,y)&lt;br /&gt;
* [[API:Surface/blitImage|Surface.blitImage]](''image_object'', ''x'', ''y''): draws 'image' onto 'surface_object' at (x,y)&lt;br /&gt;
* [[API:Surface/blitMaskSurface|Surface.blitMaskSurface]](surface, x, y, mask [, mask_blend_mode]): draws 'surface' onto the surface_object at (x, y), except that the color passed as 'mask' tints 'surface'; optionally you can pass one of the blend modes for masking as mask_blend_mode&lt;br /&gt;
* [[API:Surface/rotateBlitSurface|Surface.rotateBlitSurface]](surface, x, y, angle): draws 'surface' onto the surface_object at (x, y), except that 'surface' is rotated anti-clockwise in radians, with -2*PI &amp;lt;= angle &amp;lt;= 2*PI&lt;br /&gt;
* [[API:Surface/rotateBlitMaskSurface|Surface.rotateBlitMaskSurface]](surface, x, y, angle, mask [, mask_blend_mode]): [[API:Surface/rotateBlitSurface|rotateBlitSurface]] + [[API:Surface/blitMaskSurface|blitMaskSurface]]&lt;br /&gt;
* [[API:Surface/zoomBlitSurface|Surface.zoomBlitSurface]](surface, x, y, factor): draws 'surface' onto the surface_object at (x, y) with zooming, with the scaling depending on factor. Normally a factor of 1 will draw a normal looking 'surface' and between 0 and 1 will shrink it. Any values greater than 1 will stretch it's size.&lt;br /&gt;
* [[API:Surface/zoomBlitMaskSurface|Surface.zoomBlitMaskSurface]](surface, x, y, factor, mask [, mask_blend_mode]): [[API:Surface/zoomBlitSurface|zoomBlitSurface]] + [[API:Surface/blitMaskSurface|blitMaskSurface]]&lt;br /&gt;
* [[API:Surface/transformBlitSurface|Surface.transformBlitSurface]](surface, x1, y1, x2, y2, x3, y3, x4, y4): draws 'surface' onto the surface_object with &amp;quot;transformation&amp;quot;, where (x1, y1) is the upper left corner, (x2, y2) the upper right corner, (x3, y3) is the lower right corner, and (x4, y4) is the lower left corner.&lt;br /&gt;
* [[API:Surface/clone|Surface.transformBlitMaskSurface]](surface, x1, y1, x2, y2, x3, y3, x4, y4, mask [, mask_blend_mode]): [[API:Surface/transformBlitSurface|transformBlitSurface]] + [[API:Surface/blitMaskSurface|blitMaskSurface]]&lt;br /&gt;
&lt;br /&gt;
==== Conversion to image ====&lt;br /&gt;
&lt;br /&gt;
* [[API:Surface/createImage|Surface.createImage]](): Create a new [[API:Image|Image]] with the picture data in the surface.&lt;br /&gt;
&lt;br /&gt;
==== Saving to disk ====&lt;br /&gt;
&lt;br /&gt;
* [[API:Surface/save|Surface.save]](filename): saves the surface_object as an image using the filename 'filename'; the image type is determined by the extension of the file, e.g. surface.save(&amp;quot;test.png&amp;quot;) saves a png image called test.png&lt;/div&gt;</summary>
		<author><name>Apollolux</name></author>	</entry>

	</feed>