- This wiki is out of date, use the continuation of this wiki instead
Size x
From FenixWiki
(Difference between revisions)
| Revision as of 11:36, 23 April 2007 (edit) Woody (Talk | contribs) ← Previous diff |
Current revision (18:49, 3 April 2008) (edit) (undo) Sandman (Talk | contribs) m |
||
| (8 intermediate revisions not shown.) | |||
| Line 1: | Line 1: | ||
| + | [[category:variables]] | ||
| + | [[category:predefined]] | ||
| + | [[category:local variables]] | ||
| + | |||
| + | [[Local variables|'''Up to Local Variables''']] | ||
| + | |||
| + | ---- | ||
| + | |||
| + | |||
| == Definition == | == 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 == | == Example == | ||
| - | |||
| To make the [[graphic]] of a [[process]] continually stretch horizontally: | To make the [[graphic]] of a [[process]] continually stretch horizontally: | ||
| <pre> | <pre> | ||
| - | Process | + | Process Main() |
| Begin | Begin | ||
| - | + | graph = new_map(50,50,8); // Create a new graphic | |
| - | + | 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 | End | ||
| </pre> | </pre> | ||
| + | Used in example: [[new_map]](), [[x], [[y]], [[size_x]], [[unload_map]]() | ||
| - | [[ | + | == See also == |
| - | [[ | + | * [[size]] |
| + | * [[size_y]] | ||
| + | |||
| + | {{Locals}} | ||
Current revision
[edit] 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.
[edit] Example
To make the graphic of a process continually stretch horizontally:
Process Main()
Begin
graph = new_map(50,50,8); // Create a new graphic
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
Used in example: new_map(), [[x], y, size_x, unload_map()
[edit] See also
| Local variables | |
| • Angle • Bigbro • Father • File • Flags • Graph • Id • Region • Reserved • Resolution • Size • Size_x • Size_y • Smallbro • Son • X • Y • Z • | |
