About Images

SwinGame has a range of functions and procedures allowing you to manipulate and draw images in a variety of formats. This will get you started using Images in SwinGame. 

Level

Beginner

Read these first

About Graphics | About Resources

Details

Bitmaps

SwinGame allows you to load image files and perform operations on those images, to view the full list of functions and procedures relating to bitmaps see the SwinGame API.


  • LoadBitmap
  • DrawBitmapOnScreen
  • BitmapWidth
  • ReleaseBitmap


Bitmap Cells

After loading or creating a bitmap you can specify cells for the Bitmap using SetBitmapCellDetails.

Cells are generated by SwinGame based off details you provide. They are numbered from 0, and are numbered in rows. A Bitmap with cells is able to be used in special circumstances. An example of this is in animation, In order to be used for an animation a bitmap must have cells, see About Animation.

Bitmap Part

Bitmaps can be drawn in full using DrawBitmapOnScreen, however sometimes it is useful to only draw a section of a Bitmap. This is done using DrawBitmapPartOnScreen, this lets us draw a section of a bitmap. This can be used to create things like progress bar.

Bitmap Rotation and Scaling

In SwinGame you can rotate and scale bitmaps using RotateScaleBitmap. This allows you to change a bitmap on the fly in your program. However rotating and scaling bitmaps should not be done in your game unless it's necessary because it will slow down your game. If need a set of rotated versions of an image in your game it would be a good idea to pre-generate them using image-editing software or using SwinGame to generate them and save them all.