Home | Trees | Indices | Help |
|
---|
|
object --+ | ??.instance --+ | LabelCollisionDetector
Object to detect collisions between labels, used in the rendering process.
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
Properties | |
Inherited from |
Method Details |
__init__( (object)arg1, (Box2d)arg2) -> object : Creates an empty collision detection object with a given extent. Note that the constructor from Map objects is a sensible default and usually what you want to do. Example: >>> m = Map(size_x, size_y) >>> buf_sz = m.buffer_size >>> extent = mapnik.Box2d(-buf_sz, -buf_sz, m.width + buf_sz, m.height + buf_sz) >>> detector = mapnik.LabelCollisionDetector(extent) C++ signature : void* __init__(boost::python::api::object,mapnik::box2d<double>) __init__( (object)arg1, (Map)arg2) -> object : Creates an empty collision detection object matching the given Map object. The created detector will have the same size, including the buffer, as the map object. This is usually what you want to do. Example: >>> m = Map(size_x, size_y) >>> detector = mapnik.LabelCollisionDetector(m) C++ signature : void* __init__(boost::python::api::object,mapnik::Map)
|
helper for pickle
|
boxes( (LabelCollisionDetector)arg1) -> list : Returns a list of all the label boxes inside the detector. C++ signature : boost::python::list boxes(boost::shared_ptr<mapnik::label_collision_detector4>) |
extent( (LabelCollisionDetector)arg1) -> Box2d : Returns the total extent (bounding box) of all labels inside the detector. Example: >>> detector.extent() Box2d(573.252589209,494.789179821,584.261023823,496.83610261) C++ signature : mapnik::box2d<double> extent(mapnik::label_collision_detector4 {lvalue}) |
insert( (LabelCollisionDetector)arg1, (Box2d)arg2) -> None : Insert a 2d box into the collision detector. This can be used to ensure that some space is left clear on the map for later overdrawing, for example by non-Mapnik processes. Example: >>> m = Map(size_x, size_y) >>> detector = mapnik.LabelCollisionDetector(m)>>> detector.insert(mapnik.Box2d(196, 254, 291, 389)) C++ signature : void insert(mapnik::label_collision_detector4 {lvalue},mapnik::box2d<double>) |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Jun 3 18:45:01 2013 | http://epydoc.sourceforge.net |