SetLayerScaleFactorY

From Spheriki

Jump to: navigation, search

Stretches or shrinks the drawing of a particular layer along the y axis.


Contents

Usage

SetLayerScaleFactorY(layer, factor);
  • layer Number, non-negative. The index number of the layer to modify.
  • factor Number, positive. How much to scale by. 1 == no scaling.


Examples

SetLayerScaleFactorY(0, 3);

Make layer 0 appear three times as tall as usual.


SetLayerScaleFactorX(0, 0.2);

Flatten layer 0 to 20% of its usual height.


Notes

  • The valid range of layer indices is between 0 and (GetNumLayers() - 1) inclusive.
  • If the amount of stretching or shrinking desired is fixed, consider setting the scale factor while editing the map.
  • The effect of using SetLayerScaleFactorY() is retained until a new map is loaded. The scaling factor set this way will not be remembered if the map in which it was used is unloaded and reloaded again by the map engine.


See also

Personal tools