AGK for Pascal
ContentsIndexHome
PreviousUpNext
TAgkSprite.SetScaleByOffset Method

Sets the sprite scale as an absolute multiple of its original size. For example a scale value of 2 would double the sprite's size whilst a value of 1 will return it to its original size.

Syntax
Pascal
procedure SetScaleByOffset(const XScale: Single; const YScale: Single);
Parameters 
Description 
const XScale: Single 
the value to scale the sprite in the X direction. 
const YScale: Single 
the value to scale the sprite in the Y direction. 

This function scales from the sprite's center of rotation (its current offset point) so any increase in size will keep the offset point stationary whilst all four sides expand away from it. To scale from the top left corner use SetScale.

Copyright (c) 2012. All rights reserved.