- This wiki is out of date, use the continuation of this wiki instead
Map xput
From FenixWiki
Contents |
Definition
INT map_xput ( <INT fileID> , <INT destinationGraphID> , <INT originGraphID> , <INT x> , <INT y> , <INT angle> , <INT size> , <INT flags> )
Draws a graph onto another graph. Use map_put if you don't need the advanced parameters.
Parameters
INT fileID | - The file that holds the graphs. |
INT destinationGraphID | - The graph to draw on. |
INT originGraphID | - The graph to draw with. |
INT x | - Where on the destination graph's x-axis to put the graph. |
INT y | - Where on the destination graph's y-axis to put the graph. |
INT angle | - What angle to draw the graph at. |
INT size | - What size to draw the graph at. |
INT flags | - What flags to draw the graph with. |
Returns
INT : true
Throws
who knows
Example
Program watskeburt; Global destgraph; origgraph; Begin set_mode(640,480,16); destgraph=new_map(100,100,16); map_clear(0,destgraph,rgb(255,0,0)); //makes the destination graphic a red square origgraph=new_map(50,50,16); map_clear(0,origgraph,rgb(0,0,255)); //makes the origin graphic a blue square map_xput(0,destgraph,origgraph,50,50,rand(-180000,180000),rand(50,150),4); //draws the blue square on the center of the red square transparently, at a random angle and a random size Loop put(0,destgraph,320,240); //shows the final graph frame; End End