javae_logo_small
float getSX(int);

Function:
Returns the current width scale of the sent layer number. This number assumes 1.0 is "normal" size. In other words, 1.0 = 100%, 0.55 = 55%, and 1.25 = 125%.

Note: The value that's returned is not affected by any value that's being added to the transform data by the user. It only returns the value that is calculated from the keyframe data.

Send:
Layer number (int).

Returns:
Current width scale for defined layer.

example:

void draw(){
background(myComp.getBG());
myComp.calcLayer(2);
//get the current scaling for layer 4.
float rectWidth = (myComp.getSX(4)) * 100;
float rectHeight = (myComp.getSY(4)) * 100;
println ("the curent width of the rect is " + rectWidth+ "%.");
rect(200, 200, rectWidth, rectHeight);
}