- Main Page
- Classes
- Files
- Directories
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# KrTileResource Class Reference

Practically, a tile resource is used to create a tile. More...

`#include <tileresource.h>`

Inheritance diagram for KrTileResource:

List of all members.

## Public Member Functions
virtual U32 | Type ()
| The type of the resource. ( ex, KYRATAG_SPRITE ).
virtual const std::string & | TypeName ()
| The name of the type. ( ex, "Sprite" ).
virtual KrTileResource * | ToTileResource ()
| Return a pointer if this is a tile resource.
int | Size () const
| The width and height must be the same for a tile.
bool | Alpha ()
| Return true if this Tile supports alpha.
virtual void | CacheScale (GlFixed xScale, GlFixed yScale)
| Create a cached resourced.
virtual bool | IsScaleCached (GlFixed xScale, GlFixed yScale)
| Check the cache for a given scale.
virtual void | FreeScaleCache ()
| Free up the cache.

## Detailed Description

Practically, a tile resource is used to create a tile.

It contains a pixel block for its data.

## Member Function Documentation

virtual void KrTileResource::CacheScale | ( | GlFixed | xScale,
|  | GlFixed | yScale |
| ) |  |  | `[virtual]`

Create a cached resourced.

A resource can be drawn much more quickly if its scaled image is pre-calculated. This generates and scaled version of the resource and stores it for fast drawing. The cached version will always be used before a version generated on the fly.

Reimplemented from KrResource.

The documentation for this class was generated from the following file:

- tileresource.h