Files
QtGameMaker/help/files/408_01_sprites.html
T

77 lines
2.6 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Sprites</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body background="images/back.gif">
<!--START-->
<h3>Sprites</h3>
The following functions will give you information about a sprite:
<p>
<blockquote>
<tt><b>sprite_exists(ind)</b></tt>
Returns whether a sprite with the given index exists.<br>
<tt><b>sprite_get_name(ind)</b></tt>
Returns the name of the sprite with the given index.<br>
<tt><b>sprite_get_number(ind)</b></tt>
Returns the number of subimages of the sprite with the given index.<br>
<tt><b>sprite_get_width(ind)</b></tt>
Returns the width of the sprite with the given index.<br>
<tt><b>sprite_get_height(ind)</b></tt>
Returns the height of the sprite with the given index.<br>
<tt><b>sprite_get_xoffset(ind)</b></tt>
Returns the x-offset of the sprite with the given index.<br>
<tt><b>sprite_get_yoffset(ind)</b></tt>
Returns the y-offset of the sprite with the given index.<br>
<tt><b>sprite_get_bbox_left(ind)</b></tt>
Returns the left side of the bounding box of the sprite with the given index.<br>
<tt><b>sprite_get_bbox_right(ind)</b></tt>
Returns the right side of the bounding box of the sprite with the given index.<br>
<tt><b>sprite_get_bbox_top(ind)</b></tt>
Returns the top side of the bounding box of the sprite with the given index.<br>
<tt><b>sprite_get_bbox_bottom(ind)</b></tt>
Returns the bottom side of the bounding box of the sprite with the given index.<br>
</blockquote>
In certain situations you might want to save the bitmap corresponding to a particular
subimage of the sprite to a file. For this the following functions can be used:
<p>
<blockquote>
<tt><b>sprite_save(ind,subimg,fname)</b></tt>
Saves subimage subimg of sprite ind to the file with the name fname. This must
be a .png file. <b><i>Only available in the Pro Edition.</i></b><br>
<tt><b>sprite_save_strip(ind,fname)</b></tt>
Saves all subimages of sprite ind as a strip to the file with the name fname. This must
be a .png file. <b><i>Only available in the Pro Edition.</i></b><br>
</blockquote>
<!--END-->
</body>
</html>
<!-- KEYWORDS
sprite_exists()
sprite_get_name()
sprite_get_number()
sprite_get_width()
sprite_get_height()
sprite_get_transparent()
sprite_get_smooth()
sprite_get_preload()
sprite_get_xoffset()
sprite_get_yoffset()
sprite_get_bbox_mode()
sprite_get_bbox_left()
sprite_get_bbox_right()
sprite_get_bbox_top()
sprite_get_bbox_bottom()
sprite_get_precise()
sprite_save()
sprite_save_strip()
-->