Index

Package: Atlases

Description

private package Tiles.Atlases is
Copyright (c) 2012 Kevin Wellwood All rights reserved. This source code is distributed under the Modified BSD License. For terms and conditions, see license.txt.

Classes

Atlas

type Atlas is new Limited_Object with private;

Ancestors:

Primitive operations:

Construct
Delete (overriding Objects.Delete)
Objects.Construct (Inherited)
Objects.To_String (Inherited)

Types

A_Atlas

type A_Atlas is access all Atlas'Class;

Subprograms & Entries

Create_Atlas

function Create_Atlas
( display: not null A_Allegro_Display;
pageWidth, pageHeight: Positive ) return A_Atlas;
Creates a new Atlas with pages of the specified size but no larger than the largest texture size supported by the display.

Add_Bitmap

procedure Add_Bitmap
( this: not null access Atlas'Class;
bmp: in out A_Allegro_Bitmap );
Adds a bitmap 'bmp' to the Atlas. It will be consumed and returned as a sub-bitmap of a page in the atlas. Be sure to destroy the bitmap before this atlas, or the bitmap will become invalid.

Save_Bitmaps

procedure Save_Bitmaps
( this: not null access Atlas'Class;
name: String );
Saves each page of the atlas as a bitmap in the current directory, using 'name' as the filename prefix and appending the page number. The bitmaps will be saved in .png format.

Delete

procedure Delete
( this: in out A_Atlas );
Deletes the Atlas. Make sure all sub-bitmap references previously returned from the atlas have been destroyed first or they will become invalid.