phpDocumentor SMap
Objects
[ class tree: SMap ] [ index: SMap ] [ all elements ]

Class: SMap_Object_Cached

Source Location: /SMap/Object.php

Class SMap_Object_Cached

Class Overview

Manipulate a cache

The Cached class is inserted between the actual cache logic, the layer's objects, the canvas, and the layer. It is not intended to be used by any class outside of SMap_Tile.

Located in /SMap/Object.php [line 2945]

SMap_Object
   |
   --SMap_Object_Cached

Properties

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From SMap_Object

SMap_Object::$alt
SMap_Object::$color
SMap_Object::$label
SMap_Object::$layer
SMap_Object::$map
SMap_Object::$tile
SMap_Object::$url
SMap_Object::$view

Inherited From SMap_Object

SMap_Object::__construct()
Give the object a context
SMap_Object::applyTile()
Apply a tile to this object
SMap_Object::draw()
Draw this object on a canvas
SMap_Object::getInnerBounds()
Get the rough inner rectangular bounds for this object.
SMap_Object::label()
Are we drawing a label for this object?
SMap_Object::map()
Return a map of this object
SMap_Object::setColor()
Set the color for this object
SMap_Object::setLink()
Set this to link to something

[ Top ]
Property Summary
object   $cache   The cache to draw onto
array   $objs   The objects to be cached

[ Top ]
Method Summary
SMap_Object_Cached   __construct()   Construct with cache
void   addObjs()   Add the cached objects
boolean   applyTile()   Apply tile to each object
void   draw()   Draw/Load the bitmap onto the canvas
void   label()  
void   map()  

[ Top ]
Properties
object   $cache [line 2952]

The cache to draw onto

API Tags:
Access:  protected


[ Top ]
array   $objs = null [line 2959]

The objects to be cached

API Tags:
Access:  protected


[ Top ]
Methods
Constructor __construct  [line 2970]

  SMap_Object_Cached __construct( SMap_View $view, SMap_Layer $layer, SMap_Canvas_Cache $cache  )

Construct with cache

Include an SMap_Canvas_Cache object for better file access.

Parameters:
object   $view: 
object   $layer: 
object   $cache: 

API Tags:
Access:  public


Redefinition of:
SMap_Object::__construct()
Give the object a context

[ Top ]
addObjs  [line 3028]

  void addObjs( array $objs  )

Add the cached objects

Parameters:
array   $objs:  Objects

API Tags:
Access:  public


[ Top ]
applyTile  [line 3044]

  boolean applyTile( SMap_Tile $tile  )

Apply tile to each object

Because this is a front end for a set of objects, we need to call applyTile() on each one of them. Once we do that, use the tile to generate and save a fresh SMap_Canvas object in $cache.

Silently does nothing when there is a cache hit.

Parameters:
object A   $tile:  tile

API Tags:
Return:  The cache is always visible (true)
Access:  public


Redefinition of:
SMap_Object::applyTile()
Apply a tile to this object

[ Top ]
draw  [line 3006]

  void draw( SMap_Canvas $canvas  )

Draw/Load the bitmap onto the canvas

This should be called after applyTile(), which creates a SMap_Canvas object from the tile and loads it into $cache.

If the $cache is not loaded, this function applies all of the objects to the canvas, and caches the result.

Once $cache is set, it is composited atop the passed in canvas object which is currently being drawn.

Parameters:
object The   $canvas:  canvas to layer onto

API Tags:
Access:  public


Redefinition of:
SMap_Object::draw()
Draw this object on a canvas

[ Top ]
label  [line 2983]

  void label( SMap_Object_Area_Label $obj  )

Parameters:
SMap_Object_Area_Label   $obj: 

API Tags:
Access:  public


Redefinition of:
SMap_Object::label()
Are we drawing a label for this object?

[ Top ]
map  [line 2986]

  void map( )


API Tags:
Access:  public


Redefinition of:
SMap_Object::map()
Return a map of this object

[ Top ]

Documentation generated on Mon, 09 Apr 2007 18:55:03 -0500 by phpDocumentor 1.3.0