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

Size y

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 13:17, 4 November 2007 (edit)
Sandman (Talk | contribs)
m
← Previous diff
Current revision (18:49, 3 April 2008) (edit) (undo)
Sandman (Talk | contribs)
m
 
(5 intermediate revisions not shown.)
Line 2: Line 2:
[[category:predefined]] [[category:predefined]]
[[category:local variables]] [[category:local variables]]
 +
 +[[Local variables|'''Up to Local Variables''']]
 +
 +----
 +
== Definition == == Definition ==
-'''INT''' size_y+'''INT''' size_y = 100
-Size_y is a predefined [[local variable]] that can be used to stretch or compress a graphic along its vertical axis. It is measured in pixels.+Size_y is a predefined [[local variable]] that can be used to stretch or compress a graphic along its 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.
-== 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_x]].+
== Example == == Example ==
Line 15: Line 19:
To make the [[graphic]] of a [[process]] continually stretch vertically: To make the [[graphic]] of a [[process]] continually stretch vertically:
<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); // Create a new graphic
- 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_y += 1; //increase the height of the graphic by 1 pixel each frame.+ size_y += 1; // Increase the height of the graphic by 1 pixel each frame.
- frame;+ frame;
- End+ End
 +OnExit
 + unload_map(0,graph);
End End
</pre> </pre>
 +Used in example: [[new_map]](), [[x], [[y]], [[size_y]], [[unload_map]]()
 +
 +== See also ==
 +* [[size]]
 +* [[size_x]]
 +
 +{{Locals}}

Current revision

Up to Local Variables



[edit] Definition

INT size_y = 100

Size_y is a predefined local variable that can be used to stretch or compress a graphic along its 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.

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 vertically:

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_y += 1;          // Increase the height of the graphic by 1 pixel each frame.
        frame;
    End
OnExit
    unload_map(0,graph);
End

Used in example: new_map(), [[x], y, size_y, unload_map()

[edit] See also


Local variables
AngleBigbroFatherFileFlagsGraphIdRegionReservedResolutionSizeSize_xSize_ySmallbroSonXYZ
Personal tools