Changeset 1588:b79bcba43661 in lemon0.x for lemon
 Timestamp:
 07/26/05 16:31:29 (15 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@2092
 Location:
 lemon
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

lemon/graph_to_eps.h
r1575 r1588 720 720 double ns=_nodeSizes[n]*_nodeScale; 721 721 xy<double> p(ns,ns); 722 bb +=p+_coords[n];723 bb +=p+_coords[n];722 bb.add(p+_coords[n]); 723 bb.add(p+_coords[n]); 724 724 } 725 725 if (bb.empty()) { 
lemon/xy.h
r1435 r1588 307 307 308 308 ///Increments a bounding box with a point 309 BoundingBox& operator +=(const xy<T>& u){309 BoundingBox& add(const xy<T>& u){ 310 310 if (_empty){ 311 311 bottom_left=top_right=u; … … 321 321 } 322 322 323 ///Sums a bounding box and a point324 BoundingBox operator +(const xy<T>& u){325 BoundingBox b = *this;326 return b += u;327 }323 // ///Sums a bounding box and a point 324 // BoundingBox operator +(const xy<T>& u){ 325 // BoundingBox b = *this; 326 // return b += u; 327 // } 328 328 329 329 ///Increments a bounding box with an other bounding box 330 BoundingBox& operator +=(const BoundingBox &u){330 BoundingBox& add(const BoundingBox &u){ 331 331 if ( !u.empty() ){ 332 *this += u.bottomLeft();333 *this += u.topRight();332 this>add(u.bottomLeft()); 333 this>add(u.topRight()); 334 334 } 335 335 return *this; … … 339 339 BoundingBox operator +(const BoundingBox& u){ 340 340 BoundingBox b = *this; 341 return b += u; 341 return b.add(u); 342 } 343 344 345 ///Intersection of two bounding boxes 346 BoundingBox operator &(const BoundingBox& u){ 347 BoundingBox b; 348 b.bottom_left.x=std::max(this>bottom_left.x,u.bottom_left.x); 349 b.bottom_left.y=std::max(this>bottom_left.y,u.bottom_left.y); 350 b.top_right.x=std::min(this>top_right.x,u.top_right.x); 351 b.top_right.y=std::min(this>top_right.y,u.top_right.y); 352 b._empty = this>_empty  u._empty  353 b.bottom_left.x>top_right.x && b.bottom_left.y>top_right.y; 354 return b; 342 355 } 343 356
Note: See TracChangeset
for help on using the changeset viewer.