<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://www.oxeyegames.com/wiki/skins/common/feed.css?270"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.oxeyegames.com/wiki/index.php?action=history&amp;feed=atom&amp;title=RenderSpriteStateFreeShape</id>
		<title>RenderSpriteStateFreeShape - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://www.oxeyegames.com/wiki/index.php?action=history&amp;feed=atom&amp;title=RenderSpriteStateFreeShape"/>
		<link rel="alternate" type="text/html" href="http://www.oxeyegames.com/wiki/index.php?title=RenderSpriteStateFreeShape&amp;action=history"/>
		<updated>2026-05-18T03:25:07Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.16.0</generator>

	<entry>
		<id>http://www.oxeyegames.com/wiki/index.php?title=RenderSpriteStateFreeShape&amp;diff=130&amp;oldid=prev</id>
		<title>Jeb: Created page with '{{VideoMethod | video.renderSpriteStateFreeShape(spriteId, x1, y1, x2, y2, x3, y3, x4, y4[, scale[, angle[, a, r, g, b]]]) | This method renders the sprite state's texture on a i...'</title>
		<link rel="alternate" type="text/html" href="http://www.oxeyegames.com/wiki/index.php?title=RenderSpriteStateFreeShape&amp;diff=130&amp;oldid=prev"/>
				<updated>2009-03-10T14:01:45Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#39;{{VideoMethod | video.renderSpriteStateFreeShape(spriteId, x1, y1, x2, y2, x3, y3, x4, y4[, scale[, angle[, a, r, g, b]]]) | This method renders the sprite state&amp;#39;s texture on a i...&amp;#39;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{VideoMethod&lt;br /&gt;
|&lt;br /&gt;
video.renderSpriteStateFreeShape(spriteId, x1, y1, x2, y2, x3, y3, x4, y4[, scale[, angle[, a, r, g, b]]])&lt;br /&gt;
|&lt;br /&gt;
This method renders the sprite state's texture on a irregular quad that is specified by the four corner coordinates. The sprite state's hotspot will be ignored. This method can be used to flip/mirror sprites, or to perform asymetric scaling.&lt;br /&gt;
|&lt;br /&gt;
{{MethodParam|spriteId|An integer|The sprite ID.}}&lt;br /&gt;
{{MethodParam|x1|A number|The x coordinate for the &amp;quot;upper left&amp;quot; corner.}}&lt;br /&gt;
{{MethodParam|y1|A number|The y coordinate for the &amp;quot;upper left&amp;quot; corner.}}&lt;br /&gt;
{{MethodParam|x2|A number|The x coordinate for the &amp;quot;upper right&amp;quot; corner.}}&lt;br /&gt;
{{MethodParam|y2|A number|The y coordinate for the &amp;quot;upper right&amp;quot; corner.}}&lt;br /&gt;
{{MethodParam|x3|A number|The x coordinate for the &amp;quot;lower left&amp;quot; corner.}}&lt;br /&gt;
{{MethodParam|y3|A number|The y coordinate for the &amp;quot;lower left&amp;quot; corner.}}&lt;br /&gt;
{{MethodParam|x4|A number|The x coordinate for the &amp;quot;lower right&amp;quot; corner.}}&lt;br /&gt;
{{MethodParam|y4|A number|The y coordinate for the &amp;quot;lower right&amp;quot; corner.}}&lt;br /&gt;
{{MethodParam|a|Optional integer|The alpha component of the diffuse color. Use this to blend the sprite with the background.}}&lt;br /&gt;
{{MethodParam|r|Optional integer|The red pigment of the diffuse color, defaults to 255.}}&lt;br /&gt;
{{MethodParam|g|Optional integer|The green pigment of the diffuse color, defaults to 255.}}&lt;br /&gt;
{{MethodParam|b|Optional integer|The blue pigment of the diffuse color, defaults to 255.}}&lt;br /&gt;
|&lt;br /&gt;
Returns nothing.&lt;br /&gt;
}}&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
do&lt;br /&gt;
   -- render an *unmodified* sprite using the free shape method&lt;br /&gt;
   local w,h = video.getSpriteStateSize(spriteId)&lt;br /&gt;
   local ox,oy = video.getSpriteStateHotspot(spriteId)&lt;br /&gt;
&lt;br /&gt;
   video.renderSpriteStateFreeShape(spriteId,&lt;br /&gt;
      x - ox,     y - oy,&lt;br /&gt;
      x - ox + w, y - oy,&lt;br /&gt;
      x - ox,     y - oy + h,&lt;br /&gt;
      x - ox + w, y - oy + h,&lt;br /&gt;
      255, 255, 255, 255)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
do&lt;br /&gt;
   -- render a *mirrored* sprite using the free shape method&lt;br /&gt;
   local w,h = video.getSpriteStateSize(spriteId)&lt;br /&gt;
   local ox,oy = video.getSpriteStateHotspot(spriteId)&lt;br /&gt;
&lt;br /&gt;
   -- the hotspot will need to be flipped, too&lt;br /&gt;
   ox = 1 - w + ox&lt;br /&gt;
&lt;br /&gt;
   video.renderSpriteStateFreeShape(spriteId,&lt;br /&gt;
      x - ox + w, y - oy,&lt;br /&gt;
      x - ox,     y - oy,&lt;br /&gt;
      x - ox + w, y - oy + h,&lt;br /&gt;
      x - ox,     y - oy + h,&lt;br /&gt;
      255, 255, 255, 255)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jeb</name></author>	</entry>

	</feed>