Difference between revisions of "TextureBase"

From GiderosMobile
(added getTexelSize method)
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
<!-- GIDEROSOBJ:TextureBase -->
 
<!-- GIDEROSOBJ:TextureBase -->
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]]<br/>
+
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/>
 
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
 
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
 
'''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/>
 
'''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/>
=== <translate>Description</translate> ===
+
 
<translate><br />
+
=== Description ===
[[Special:MyLanguage/TextureBase|TextureBase]] is the base class for [[Special:MyLanguage/Texture|Texture]] and [[Special:MyLanguage/TexturePack|TexturePack]] classes. It provides a common functionaly to texture related classes.<br />
+
TextureBase is the base class for [[Texture]] and [[TexturePack]] classes. It provides a common functionaly to texture related classes.
<br />
+
 
&lt;ul&gt;<br />
+
*TextureBase.CLAMP = "clamp"
&lt;li&gt;TextureBase.CLAMP = &quot;clamp&quot;&lt;/li&gt;<br />
+
*TextureBase.REPEAT = "repeat"
&lt;li&gt;TextureBase.REPEAT = &quot;repeat&quot;&lt;/li&gt;<br />
+
 
&lt;/ul&gt;<br />
 
<br /></translate>
 
 
{|-
 
{|-
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== <translate>Methods</translate> ===
 
=== <translate>Methods</translate> ===
[[Special:MyLanguage/TextureBase:getHeight|TextureBase:getHeight]] ''<translate>returns the height of the texture in pixels</translate>''<br/><!-- GIDEROSMTD:TextureBase:getHeight -->
+
[[Special:MyLanguage/TextureBase:getHeight|TextureBase:getHeight]] ''<translate>returns the height of the texture in pixels</translate>''<br/><!-- GIDEROSMTD:TextureBase:getHeight() returns the height of the texture in pixels -->
[[Special:MyLanguage/TextureBase:getWidth|TextureBase:getWidth]] ''<translate>returns the width of the texture in pixels</translate>''<br/><!-- GIDEROSMTD:TextureBase:getWidth -->
+
[[Special:MyLanguage/TextureBase:getTexelSize|TextureBase:getTexelSize]] ''<translate>returns the size of a texel</translate>''<br/><!-- GIDEROSMTD:TextureBase:getTexelSize() returns the size of a texel, 1/(gpu texture width), 1/(gpu texture height) -->
 +
[[Special:MyLanguage/TextureBase:getWidth|TextureBase:getWidth]] ''<translate>returns the width of the texture in pixels</translate>''<br/><!-- GIDEROSMTD:TextureBase:getWidth() returns the width of the texture in pixels -->
 +
 
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== <translate>Events</translate> ===
 
=== <translate>Events</translate> ===
 
=== <translate>Constants</translate> ===
 
=== <translate>Constants</translate> ===
[[Special:MyLanguage/TextureBase.CLAMP|TextureBase.CLAMP]]<br/><!-- GIDEROSCST:TextureBase.CLAMP -->
+
[[Special:MyLanguage/TextureBase.CLAMP|TextureBase.CLAMP]]<br/><!-- GIDEROSCST:TextureBase.CLAMP clamp-->
[[Special:MyLanguage/TextureBase.REPEAT|TextureBase.REPEAT]]<br/><!-- GIDEROSCST:TextureBase.REPEAT -->
+
[[Special:MyLanguage/TextureBase.REPEAT|TextureBase.REPEAT]]<br/><!-- GIDEROSCST:TextureBase.REPEAT repeat-->
[[Special:MyLanguage/TextureBase.RGB565|TextureBase.RGB565]]<br/><!-- GIDEROSCST:TextureBase.RGB565 -->
+
[[Special:MyLanguage/TextureBase.RGB565|TextureBase.RGB565]]<br/><!-- GIDEROSCST:TextureBase.RGB565 rgb565-->
[[Special:MyLanguage/TextureBase.RGB888|TextureBase.RGB888]]<br/><!-- GIDEROSCST:TextureBase.RGB888 -->
+
[[Special:MyLanguage/TextureBase.RGB888|TextureBase.RGB888]]<br/><!-- GIDEROSCST:TextureBase.RGB888 rgb888-->
[[Special:MyLanguage/TextureBase.RGBA4444|TextureBase.RGBA4444]]<br/><!-- GIDEROSCST:TextureBase.RGBA4444 -->
+
[[Special:MyLanguage/TextureBase.RGBA4444|TextureBase.RGBA4444]]<br/><!-- GIDEROSCST:TextureBase.RGBA4444 rgba4444-->
[[Special:MyLanguage/TextureBase.RGBA5551|TextureBase.RGBA5551]]<br/><!-- GIDEROSCST:TextureBase.RGBA5551 -->
+
[[Special:MyLanguage/TextureBase.RGBA5551|TextureBase.RGBA5551]]<br/><!-- GIDEROSCST:TextureBase.RGBA5551 rgba5551-->
[[Special:MyLanguage/TextureBase.RGBA8888|TextureBase.RGBA8888]]<br/><!-- GIDEROSCST:TextureBase.RGBA8888 -->
+
[[Special:MyLanguage/TextureBase.RGBA8888|TextureBase.RGBA8888]]<br/><!-- GIDEROSCST:TextureBase.RGBA8888 rgba8888-->
 
|}
 
|}
 +
 +
{{GIDEROS IMPORTANT LINKS}}

Revision as of 01:01, 25 March 2020

Supported platforms: Platform android.pngPlatform ios.pngPlatform mac.pngPlatform pc.pngPlatform html5.pngPlatform winrt.pngPlatform win32.png
Available since: Gideros 2011.6
Inherits from: Object

Description

TextureBase is the base class for Texture and TexturePack classes. It provides a common functionaly to texture related classes.

  • TextureBase.CLAMP = "clamp"
  • TextureBase.REPEAT = "repeat"

Methods

TextureBase:getHeight returns the height of the texture in pixels
TextureBase:getTexelSize returns the size of a texel
TextureBase:getWidth returns the width of the texture in pixels

Events

Constants

TextureBase.CLAMP
TextureBase.REPEAT
TextureBase.RGB565
TextureBase.RGB888
TextureBase.RGBA4444
TextureBase.RGBA5551
TextureBase.RGBA8888