AGK for Pascal
ContentsIndexHome
PreviousUpNext
TAgkSprite.Image Property

The image currently assigned to the sprite.

Syntax
Pascal
property Image: TAgkImage;

When you change this property and the new image has a different size or shape from the old image, the sprite may look distorted as a result, you can fix this by resetting the sprite dimensions using SetSize. If the sprite is animated you may also need to call SetAnimation again. 

The collision shape is not modified when you change the image. To update the collision shape as well, use SetImageAndUpdateShape.

Copyright (c) 2012. All rights reserved.