- This wiki is out of date, use the continuation of this wiki instead
Map clear
From FenixWiki
(Difference between revisions)
Revision as of 02:03, 1 May 2007 (edit) Sandman (Talk | contribs) ← Previous diff |
Current revision (20:07, 25 February 2008) (edit) (undo) 85.144.194.29 (Talk) (→Notes - clean --> clear) |
||
(4 intermediate revisions not shown.) | |||
Line 9: | Line 9: | ||
== Parameters == | == Parameters == | ||
{| | {| | ||
- | | '''INT''' fileID || - The [[file]] that holds the | + | | '''INT''' fileID || - The [[file]] that holds the graphic. |
|- | |- | ||
- | | '''INT''' graphID || - The [[ | + | | '''INT''' graphID || - The [[graphic]] to clear. |
|- | |- | ||
| '''WORD''' color || - The [[color]] used to clear. | | '''WORD''' color || - The [[color]] used to clear. | ||
Line 18: | Line 18: | ||
== Returns == | == Returns == | ||
'''INT''' : [[true]] | '''INT''' : [[true]] | ||
+ | |||
+ | == Notes == | ||
+ | Instead of using '''map_clear'''() to clear the screen [[background]], [[clear_screen]]() is recommended as it is a little bit faster. | ||
== Errors == | == Errors == | ||
Line 50: | Line 53: | ||
This will result in something like:<br /> | This will result in something like:<br /> | ||
http://wwwhome.cs.utwente.nl/~bergfi/fenix/wiki/new_map.PNG | http://wwwhome.cs.utwente.nl/~bergfi/fenix/wiki/new_map.PNG | ||
+ | |||
+ | {{Funcbox | ||
+ | | category = Maps | ||
+ | }} |
Current revision
Contents |
[edit] Definition
INT map_clear ( <INT fileID> , <INT graphID> , <WORD color> )
Clears a certain graph to a certain color.
[edit] Parameters
INT fileID | - The file that holds the graphic. |
INT graphID | - The graphic to clear. |
WORD color | - The color used to clear. |
[edit] Returns
INT : true
[edit] Notes
Instead of using map_clear() to clear the screen background, clear_screen() is recommended as it is a little bit faster.
[edit] Errors
Unsupported color depth | - The specified graph has a not supported color depth. |
[edit] Example
Program a_map_is_born; Private int map; Begin // Create a new graph of size 100x100 and color depth of 8bit map = new_map(100,100,8); // Clear the map red map_clear(0,map,rgb(255,0,0)); // Put it in the center of the screen put(0,map,160,100); Loop frame; End End
Used in example: new_map(), put()
This will result in something like:
Maps Functions | |
• Graphic_info() • Map_block_copy() • Map_clear() • Map_clone() • Map_put() • Map_put_pixel() • Map_xput() • Map_xputnp() • New_map() • Save_png() • Unload_map() • |