- This wiki is out of date, use the continuation of this wiki instead
Size
From FenixWiki
(Difference between revisions)
| Revision as of 18:35, 3 April 2008 (edit) Sandman (Talk | contribs) (New page: category:variables category:predefined category:local variables '''Up to Local Variables''' ---- == Definition == '''INT''' size Size is a predefined [...) ← Previous diff |
Current revision (23:25, 28 November 2008) (edit) (undo) 93.125.186.112 (Talk) (→Example) |
||
| (3 intermediate revisions not shown.) | |||
| Line 9: | Line 9: | ||
| == Definition == | == Definition == | ||
| - | '''INT''' size | + | '''INT''' size = 100 |
| Size is a predefined [[local variable]] that can be used to stretch or compress a graphic, equally along the horizontal axis and vertical 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. | Size is a predefined [[local variable]] that can be used to stretch or compress a graphic, equally along the horizontal axis and vertical 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. | ||
| - | This variable only has effect for the appearance of a [[process]]' [[graphic]] when its local variables [[size_x]] and [[size_y]] are both | + | This variable only has effect for the appearance of a [[process]]' [[graphic]] when its local variables [[size_x]] and [[size_y]] are both <code>100</code>. When either is not equal to <code>100</code>, [[size]] doesn't affect the appearance of the graphic. |
| == Example == | == Example == | ||
| Line 21: | Line 21: | ||
| Process Main() | Process Main() | ||
| Begin | Begin | ||
| - | graph = new_map(50,50,8); | + | graph = new_map(50,50,8); // Create a new graphic |
| - | x = 100; | + | x = 100; // Position the graphic 100 pixels |
| - | y = 100; | + | y = 100; // from the top and left of the screen |
| Loop | Loop | ||
| - | size += 1; | + | size += 1; // Increase the height and width of the graphic by 1 percent each frame. |
| frame; | frame; | ||
| End | End | ||
| Line 32: | Line 32: | ||
| End | End | ||
| </pre> | </pre> | ||
| + | Used in example: [[new_map]](), [[x]], [[y]], [[size]], [[unload_map]]() | ||
| == See also == | == See also == | ||
| - | + | * [[size_x]] | |
| - | + | * [[size_y]] | |
| {{Locals}} | {{Locals}} | ||
Current revision
[edit] Definition
INT size = 100
Size is a predefined local variable that can be used to stretch or compress a graphic, equally along the horizontal axis and vertical 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.
This variable only has effect for the appearance of a process' graphic when its local variables size_x and size_y are both 100. When either is not equal to 100, size doesn't affect the appearance of the graphic.
[edit] Example
To make the graphic of a process continually stretch:
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 += 1; // Increase the height and 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, 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 • | |
