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

Size x

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 11:06, 31 March 2008 (edit)
TrevorBradley (Talk | contribs)
(Definition)
← Previous diff
Revision as of 18:43, 3 April 2008 (edit) (undo)
Sandman (Talk | contribs)

Next diff →
Line 9: Line 9:
== Definition == == Definition ==
-'''INT''' size_x+'''INT''' size_x = 100
-Size_x is a predefined [[local variable]] that can be used to stretch or compress a graphic along its horizontal axis. It is defined as a percentage of the original graphic size.+Size_x is a predefined [[local variable]] that can be used to stretch or compress a graphic along its horizontal axis. It is defined as a percentage of the original graphic size. The graphics's center will remain at the drawing coordinates when the graphic is drawn.
-== Notes ==+When either [[size_x]] or [[size_y]] of a [[process]] are unequal to [code]100[/code], that process' [[size]] has no effect.
-See also [[size_y]].+
== Example == == Example ==
To make the [[graphic]] of a [[process]] continually stretch horizontally: To make the [[graphic]] of a [[process]] continually stretch horizontally:
<pre> <pre>
-Process stretch_graphic()+Process Main()
Begin Begin
- graph = load_png("image.png"); //load the graphic and assign it to the graph variable+ graph = new_map(50,50,8); //load the graphic and assign it to the graph variable
- x = 100; //Position the graphic 100 pixels+ x = 100; //Position the graphic 100 pixels
- y = 100; //from the top and left of the screen+ y = 100; //from the top and left of the screen
- Loop+ Loop
- size_x += 1; //increase the width of the graphic by 1 pixel each frame.+ size_x += 1; //increase the width of the graphic by 1 percent each frame.
- frame;+ frame;
- End+ End
 +OnExit
 + unload_map(0,graph);
End End
</pre> </pre>
 +
 +== See also ==
 +* [[size]]
 +* [[size_y]]
{{Locals}} {{Locals}}

Revision as of 18:43, 3 April 2008

Up to Local Variables



Definition

INT size_x = 100

Size_x is a predefined local variable that can be used to stretch or compress a graphic along its horizontal axis. It is defined as a percentage of the original graphic size. The graphics's center will remain at the drawing coordinates when the graphic is drawn.

When either size_x or size_y of a process are unequal to [code]100[/code], that process' size has no effect.

Example

To make the graphic of a process continually stretch horizontally:

Process Main()
Begin
    graph = new_map(50,50,8);   //load the graphic and assign it to the graph variable
    x = 100;     //Position the graphic 100 pixels
    y = 100;     //from the top and left of the screen
    Loop
        size_x += 1;    //increase the width of the graphic by 1 percent each frame.
        frame;
    End
OnExit
    unload_map(0,graph);
End

See also


Local variables
AngleBigbroFatherFileFlagsGraphIdRegionReservedResolutionSizeSize_xSize_ySmallbroSonXYZ
Personal tools