This wiki is out of date, use the continuation of this wiki instead

Put

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 20:30, 30 November 2007 (edit)
Sandman (Talk | contribs)
m
← Previous diff
Current revision (15:14, 25 February 2008) (edit) (undo)
85.144.194.29 (Talk)
(Category changed to screen.)
 
Line 1: Line 1:
[[Category:functions]] [[Category:functions]]
-[[Category:maps]]+[[Category:screen]]
==Definition== ==Definition==
Line 63: Line 63:
{{Funcbox {{Funcbox
- | category = Maps+ | category = Screen
}} }}

Current revision


Contents

[edit] Definition

INT put ( <INT fileID> , <INT graphID> , <INT x> , <INT y> )

Draws (blits) a graph onto the background.

For more advanced blitting, see:

[edit] Parameters

INT fileID - The file that holds the graph.
INT graphID - The graph to draw with.
INT x - Where on the background's x-axis to put the graph.
INT y - Where on the background's y-axis to put the graph.

[edit] Returns

INT : true

[edit] Notes

The x and y parameters denote where to draw the graph, that is, where the center of the to be drawn graph will be.

[edit] Errors

Unsupported color depth - The origin graph's color depth is greater than the destination graph's.

[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(), map_clear()

This will result in something like:
new_map.PNG


Screen Functions
Clear_screen() • Get_screen() • Put() • Put_screen() • Xput() •
Personal tools