Difference between revisions of "gc:setAlpha"
Jump to navigation
Jump to search
(Created page with "'''setAlpha''' is a function that is part of gc. Sets how transparent the next graphical things displayed will be. <br /> {{Since|3.0}} ==Syntax== gc:'''setAl...") |
|||
(10 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
Sets how transparent the next graphical things displayed will be. | Sets how transparent the next graphical things displayed will be. | ||
− | <br /> {{Since|3.0}} | + | <br />{{Since|3.0}} |
+ | {{Undocumented}} | ||
==Syntax== | ==Syntax== | ||
Line 17: | Line 18: | ||
== Example == | == Example == | ||
− | <syntaxhighlight>gc:setAlpha(0) -- will be invisible | + | <syntaxhighlight>function on.paint(gc) |
− | gc:setAlpha(127) -- will be half-visible | + | gc:setAlpha(0) |
− | gc:setAlpha(255) -- will be fully-visible</syntaxhighlight> | + | gc:drawString("hello",10,10,"top") -- will be invisible |
− | + | gc:setAlpha(127) | |
+ | gc:drawString("hello",50,50,"top") -- will be half-visible | ||
+ | gc:setAlpha(255) | ||
+ | gc:drawString("hello",100,100,"top") -- will be fully-visible | ||
+ | end</syntaxhighlight> | ||
<br /><br /> | <br /><br /> | ||
[[Category:gc]] | [[Category:gc]] | ||
− | [[Category:]] | + | [[Category:Undocumented/Unofficial]] |
Latest revision as of 22:48, 7 December 2011
setAlpha is a function that is part of gc.
Sets how transparent the next graphical things displayed will be.
This has been introduced in TI-Nspire OS 3.0 (Changes).
Will probably not exist/work on future versions, since this is Undocumented/Unofficial !
Syntax
gc:setAlpha(alpha)
Parameter | Type | Description |
---|---|---|
number | an integer, from 0 to 255 |
Example
function on.paint(gc)
gc:setAlpha(0)
gc:drawString("hello",10,10,"top") -- will be invisible
gc:setAlpha(127)
gc:drawString("hello",50,50,"top") -- will be half-visible
gc:setAlpha(255)
gc:drawString("hello",100,100,"top") -- will be fully-visible
end