Home | Trees | Indices | Help |
|
---|
|
object --+ | ??.instance --+ | Box2d
Represents a spatial envelope (i.e. bounding box). Following operators are defined for Box2d: Addition: e1 + e2 is equvalent to e1.expand_to_include(e2) but yields a new envelope instead of modifying e1 Subtraction: Currently e1 - e2 returns e1. Multiplication and division with floats: Multiplication and division change the width and height of the envelope by the given factor without modifying its center.. That is, e1 * x is equivalent to: e1.width(x * e1.width()) e1.height(x * e1.height()), except that a new envelope is created instead of modifying e1. e1 / x is equivalent to e1 * (1.0/x). Equality: two envelopes are equal if their corner points are equal.
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
Static Methods | |||
|
Class Variables | |
__instance_size__ = 48
|
|
__safe_for_unpickling__ = True
|
|
_c___doc__ = None
|
|
_c___module__ =
|
Properties | |
maxx X coordinate for the upper right corner |
|
maxy Y coordinate for the upper right corner |
|
minx X coordinate for the lower left corner |
|
miny Y coordinate for the lower left corner |
|
Inherited from |
Method Details |
__add__( (Box2d)arg1, (Box2d)arg2) -> object : C++ signature : _object* __add__(mapnik::box2d<double> {lvalue},mapnik::box2d<double>) |
__deepcopy__( (Box2d)arg1, (dict)arg2) -> Box2d : C++ signature : mapnik::box2d<double> __deepcopy__(mapnik::box2d<double> {lvalue},boost::python::dict) |
__div__( (Box2d)arg1, (float)arg2) -> object : C++ signature : _object* __div__(mapnik::box2d<double> {lvalue},float) |
__eq__( (Box2d)arg1, (Box2d)arg2) -> object : C++ signature : _object* __eq__(mapnik::box2d<double> {lvalue},mapnik::box2d<double>) |
__getinitargs__( (Box2d)arg1) -> tuple : C++ signature : boost::python::tuple __getinitargs__(mapnik::box2d<double>) |
__getitem__( (Box2d)arg1, (int)arg2) -> float : C++ signature : double __getitem__(mapnik::box2d<double> {lvalue},int) |
__init__( (object)arg1, (float)minx, (float)miny, (float)maxx, (float)maxy) -> None : Constructs a new envelope from the coordinates of its lower left and upper right corner points. C++ signature : void __init__(_object*,double,double,double,double) __init__( (object)arg1) -> None : Equivalent to Box2d(0, 0, -1, -1). C++ signature : void __init__(_object*) __init__( (object)arg1, (Coord)ll, (Coord)ur) -> None : Equivalent to Box2d(ll.x, ll.y, ur.x, ur.y). C++ signature : void __init__(_object*,mapnik::coord<double, 2>,mapnik::coord<double, 2>)
|
__mul__( (Box2d)arg1, (float)arg2) -> object : C++ signature : _object* __mul__(mapnik::box2d<double> {lvalue},float) |
__ne__( (Box2d)arg1, (Box2d)arg2) -> object : C++ signature : _object* __ne__(mapnik::box2d<double> {lvalue},mapnik::box2d<double>) |
helper for pickle
|
repr(x)
|
__rmul__( (Box2d)arg1, (float)arg2) -> object : C++ signature : _object* __rmul__(mapnik::box2d<double> {lvalue},float) |
center( (Box2d)arg1) -> Coord : Returns the coordinates of the center of the bounding box. Example: >>> e = Box2d(0, 0, 100, 100) >>> e.center() Coord(50, 50) C++ signature : mapnik::coord<double, 2> center(mapnik::box2d<double> {lvalue}) center( (Box2d)arg1, (float)x, (float)y) -> None : Moves the envelope so that the given coordinates become its new center. The width and the height are preserved. Example: >>> e = Box2d(0, 0, 100, 100) >>> e.center(60, 60) >>> e.center() Coord(60.0,60.0) >>> (e.width(), e.height()) (100.0, 100.0) >>> e Box2d(10.0, 10.0, 110.0, 110.0) C++ signature : void center(mapnik::box2d<double> {lvalue},double,double) center( (Box2d)arg1, (Coord)Coord) -> None : Moves the envelope so that the given coordinates become its new center. The width and the height are preserved. Example: >>> e = Box2d(0, 0, 100, 100) >>> e.center(Coord60, 60) >>> e.center() Coord(60.0,60.0) >>> (e.width(), e.height()) (100.0, 100.0) >>> e Box2d(10.0, 10.0, 110.0, 110.0) C++ signature : void center(mapnik::box2d<double> {lvalue},mapnik::coord<double, 2>) |
clip( (Box2d)arg1, (Box2d)other) -> None : Clip the envelope based on the bounds of another envelope. Example: >>> e = Box2d(0, 0, 100, 100) >>> c = Box2d(-50, -50, 50, 50) >>> e.clip(c) >>> e Box2d(0.0,0.0,50.0,50.0 C++ signature : void clip(mapnik::box2d<double> {lvalue},mapnik::box2d<double>) |
contains( (Box2d)arg1, (float)x, (float)y) -> bool : Returns True iff this envelope contains the point given by x and y. C++ signature : bool contains(mapnik::box2d<double> {lvalue},double,double) contains( (Box2d)arg1, (Coord)p) -> bool : Equivalent to contains(p.x, p.y) C++ signature : bool contains(mapnik::box2d<double> {lvalue},mapnik::coord<double, 2>) contains( (Box2d)arg1, (Box2d)other) -> bool : Equivalent to: contains(other.minx, other.miny) and contains(other.maxx, other.maxy) C++ signature : bool contains(mapnik::box2d<double> {lvalue},mapnik::box2d<double>) |
expand_to_include( (Box2d)arg1, (float)x, (float)y) -> None : Expands this envelope to include the point given by x and y. Example: C++ signature : void expand_to_include(mapnik::box2d<double> {lvalue},double,double) expand_to_include( (Box2d)arg1, (Coord)p) -> None : Equivalent to expand_to_include(p.x, p.y) C++ signature : void expand_to_include(mapnik::box2d<double> {lvalue},mapnik::coord<double, 2>) expand_to_include( (Box2d)arg1, (Box2d)other) -> None : Equivalent to: expand_to_include(other.minx, other.miny) expand_to_include(other.maxx, other.maxy) C++ signature : void expand_to_include(mapnik::box2d<double> {lvalue},mapnik::box2d<double>) |
Projects the envelope from the geographic space into the cartesian space by projecting its corner points. See also: Coord.forward(self, projection) |
from_string( (str)arg1) -> Box2d : C++ signature : mapnik::box2d<double> from_string(std::string) |
height( (Box2d)arg1, (float)new_height) -> None : Sets the height to new_height of the envelope preserving its center. Example: >>> e = Box2d(0, 0, 100, 100) >>> e.height(120) >>> e.center() Coord(50.0,50.0) >>> e Box2d(0.0, -10.0, 100.0, 110.0) C++ signature : void height(mapnik::box2d<double> {lvalue},double) height( (Box2d)arg1) -> float : Returns the height of this envelope. C++ signature : double height(mapnik::box2d<double> {lvalue}) |
intersect( (Box2d)arg1, (Box2d)other) -> Box2d : Returns the overlap of this envelope and the other envelope as a new envelope. Example: >>> e1 = Box2d(0, 0, 100, 100) >>> e2 = Box2d(50, 50, 150, 150) >>> e1.intersect(e2) Box2d(50.0, 50.0, 100.0, 100.0) C++ signature : mapnik::box2d<double> intersect(mapnik::box2d<double> {lvalue},mapnik::box2d<double>) |
intersects( (Box2d)arg1, (float)x, (float)y) -> bool : Returns True iff this envelope intersects the point given by x and y. Note: For points, intersection is equivalent to containment, i.e. the following holds: e.contains(x, y) == e.intersects(x, y) C++ signature : bool intersects(mapnik::box2d<double> {lvalue},double,double) intersects( (Box2d)arg1, (Coord)p) -> bool : Equivalent to contains(p.x, p.y) C++ signature : bool intersects(mapnik::box2d<double> {lvalue},mapnik::coord<double, 2>) intersects( (Box2d)arg1, (Box2d)other) -> bool : Returns True iff this envelope intersects the other envelope, This relationship is symmetric. Example: >>> e1 = Box2d(0, 0, 100, 100) >>> e2 = Box2d(50, 50, 150, 150) >>> e1.intersects(e2) True >>> e1.contains(e2) False C++ signature : bool intersects(mapnik::box2d<double> {lvalue},mapnik::box2d<double>) |
Projects the envelope from the cartesian space into the geographic space by projecting its corner points. See also: Coord.inverse(self, projection). |
pad( (Box2d)arg1, (float)padding) -> None : Pad the envelope based on a padding value. Example: >>> e = Box2d(0, 0, 100, 100) >>> e.pad(10) >>> e Box2d(-10.0,-10.0,110.0,110.0 C++ signature : void pad(mapnik::box2d<double> {lvalue},double) |
valid( (Box2d)arg1) -> bool : C++ signature : bool valid(mapnik::box2d<double> {lvalue}) |
width( (Box2d)arg1, (float)new_width) -> None : Sets the width to new_width of the envelope preserving its center. Example: >>> e = Box2d(0, 0, 100, 100) >>> e.width(120) >>> e.center() Coord(50.0,50.0) >>> e Box2d(-10.0, 0.0, 110.0, 100.0) C++ signature : void width(mapnik::box2d<double> {lvalue},double) width( (Box2d)arg1) -> float : Returns the width of this envelope. C++ signature : double width(mapnik::box2d<double> {lvalue}) |
Property Details |
maxxX coordinate for the upper right corner
|
maxyY coordinate for the upper right corner
|
minxX coordinate for the lower left corner
|
minyY coordinate for the lower left corner
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Jun 3 18:45:01 2013 | http://epydoc.sourceforge.net |