Table of Contents

 
RenderImages
 

Purpose

Renders any images not bound to an object and that are visible or a batch of images

 

Protoype

void CImageMngr::RenderImages (bool b_map = false, batch br_images = batch())
 

Parameters

map whether to bind images to a map (TRUE) or not (FALSE)
images a list of images to render exclusively
 

Description

This function handles the rendering of any images that are not bound to another object such as a button or sprite and thus will not be rendered independantly. However it can also render batches of images, bound and unbound. You first have to build a list of image IDs (much like an exclusion list) and then pass that list in for br_images. The function will then render only those images, whether they are bound or not. You can also automatically bind images to a map. When you do this it blits the image relative to the map's location on the screen by passing TRUE in for b_map. So if an image is located at (25, 25) and you bind it to a map located at (150, 150), then the image will automatically be blitted to (175, 175).

 

Use

CImageMngr image;
// normal render of unbound images
image.RenderImages();
// batch render of images bound to a map
batch br_images;
br_images.push_back("image1");
br_images.push_back("image2");
images.RenderImages(br_images, true);
 

Prev: RemoveImage
Next: SetAlpha