VG3_sprite_imagesize()
Get a calculated constant width and height of an animated sprite.SYNTAX
void
VG3_sprite_imagesize(struct vg3_sprite *sprt,
const char *bflag,
int percent,
int *rwidth,
int *rheight)
FUNCTION PARAMETERS
sprt | Sprite |
bflag | Manner to calculate the constant width and height: - "min": return width and height of the smallest included image - "max": return width and height of the biggest included image - "avg": return average width and height of all included images - NULL: return width and height of the first included image |
percent | Resize width and height with given percentage before returning, default = 100 |
rwidth | For returning width in pixels, or NULL |
rheight | For returning height in pixels, or NULL |
DESCRIPTION
Get a calculated constant width and height of an animated sprite.
This can be reasonable if the sprite will be used
with collision-detection functions, to ignore variations in size
of the included images, which else could lead to unwanted effects.
SEE ALSO