- This wiki is out of date, use the continuation of this wiki instead
Graphic info
From FenixWiki
(Difference between revisions)
| Revision as of 00:56, 2 May 2007 (edit) Sandman (Talk | contribs) m ← Previous diff |
Current revision (20:29, 30 November 2007) (edit) (undo) Sandman (Talk | contribs) m |
||
| Line 49: | Line 49: | ||
| </pre> | </pre> | ||
| Used in example: [[set_mode]](), [[new_map]](), [[map_clear]](), [[map_put_pixel]]() | Used in example: [[set_mode]](), [[new_map]](), [[map_clear]](), [[map_put_pixel]]() | ||
| + | |||
| + | {{Funcbox | ||
| + | | category = Maps | ||
| + | }} | ||
Current revision
Contents |
[edit] Definition
INT graphic_info ( <INT fileID> , <INT graphID> , <INT infotype> )
Gets some information about the graph specified.
[edit] Parameters
| INT fileID | - The file that holds the graph. |
| INT graphID | - The graph to get information from. |
| INT infotype | - What type of information you want. |
[edit] Returns
INT : Returns the information you want.
If the specified graph was invalid it returns 0.
If the specified infotype was not recognized it returns 1.
[edit] Example
Program keuken;
Local
gxc;
gyc;
Begin
set_mode(640,480,16);
graph=new_map(rand(50,150),rand(50,150),16); //makes a randomly proportioned red rectangle
map_clear(0,graph,rgb(255,0,0));
x=320;
y=240;
gxc=graphic_info(0,graph,G_X_CENTER);
gyc=graphic_info(0,graph,G_Y_CENTER); //finds the graphic's center coordinates
map_put_pixel(0,graph,gxc,gyc,rgb(255,255,255)); //puts a white pixel in the center of the graphic
Loop
frame;
End
End
Used in example: set_mode(), new_map(), map_clear(), map_put_pixel()
| 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() • | |
