Changeset 1927:12f289d6187f in lemon0.x
 Timestamp:
 01/30/06 10:31:15 (15 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@2502
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/xy.h
r1875 r1927 246 246 } 247 247 248 ///Gives back the bottom left corner (if the bounding box is empty, then the return value is not defined) 248 ///\brief Gives back the bottom left corner 249 ///(if the bounding box is empty, then the return value is not defined) 249 250 xy<T> bottomLeft() const { 250 251 return bottom_left; 251 252 } 252 253 253 ///Gives back the top right corner (if the bounding box is empty, then the return value is not defined) 254 ///\brief Sets the bottom left corner 255 ///(should only bee used for nonempty box) 256 void bottomLeft(xy<T> p) { 257 bottom_left = p; 258 } 259 260 ///\brief Gives back the top right corner 261 ///(if the bounding box is empty, then the return value is not defined) 254 262 xy<T> topRight() const { 255 263 return top_right; 256 264 } 257 265 258 ///Gives back the bottom right corner (if the bounding box is empty, then the return value is not defined) 266 ///\brief Sets the top right corner 267 ///(should only bee used for nonempty box) 268 void topRight(xy<T> p) { 269 top_right = p; 270 } 271 272 ///\brief Gives back the bottom right corner 273 ///(if the bounding box is empty, then the return value is not defined) 259 274 xy<T> bottomRight() const { 260 275 return xy<T>(top_right.x,bottom_left.y); 261 276 } 262 277 263 ///Gives back the top left corner (if the bounding box is empty, then the return value is not defined) 278 ///\brief Sets the bottom right corner 279 ///(should only bee used for nonempty box) 280 void bottomRight(xy<T> p) { 281 top_right.x = p.x; 282 bottom_left.y = p.y; 283 } 284 285 ///\brief Gives back the top left corner 286 ///(if the bounding box is empty, then the return value is not defined) 264 287 xy<T> topLeft() const { 265 288 return xy<T>(bottom_left.x,top_right.y); 266 289 } 267 290 268 ///Gives back the bottom of the box (if the bounding box is empty, then the return value is not defined) 291 ///\brief Sets the top left corner 292 ///(should only bee used for nonempty box) 293 void topLeft(xy<T> p) { 294 top_right.y = p.y; 295 bottom_left.x = p.x; 296 } 297 298 ///\brief Gives back the bottom of the box 299 ///(if the bounding box is empty, then the return value is not defined) 269 300 T bottom() const { 270 301 return bottom_left.y; 271 302 } 272 303 273 ///Gives back the top of the box (if the bounding box is empty, then the return value is not defined) 304 ///\brief Sets the bottom of the box 305 ///(should only bee used for nonempty box) 306 void bottom(T t) { 307 bottom_left.y = t; 308 } 309 310 ///\brief Gives back the top of the box 311 ///(if the bounding box is empty, then the return value is not defined) 274 312 T top() const { 275 313 return top_right.y; 276 314 } 277 315 278 ///Gives back the left side of the box (if the bounding box is empty, then the return value is not defined) 316 ///\brief Sets the top of the box 317 ///(should only bee used for nonempty box) 318 void top(T t) { 319 top_right.y = t; 320 } 321 322 ///\brief Gives back the left side of the box 323 ///(if the bounding box is empty, then the return value is not defined) 279 324 T left() const { 280 325 return bottom_left.x; 281 326 } 282 327 283 ///Gives back the right side of the box (if the bounding box is empty, then the return value is not defined) 328 ///\brief Sets the left side of the box 329 ///(should only bee used for nonempty box) 330 void left(T t) { 331 bottom_left.x = t; 332 } 333 334 ///\brief Gives back the right side of the box 335 ///(if the bounding box is empty, then the return value is not defined) 284 336 T right() const { 285 337 return top_right.x; 286 338 } 287 339 288 ///Gives back the height of the box (if the bounding box is empty, then the return value is not defined) 340 ///\brief Sets the right side of the box 341 ///(should only bee used for nonempty box) 342 void right(T t) { 343 top_right.x = t; 344 } 345 346 ///\brief Gives back the height of the box 347 ///(if the bounding box is empty, then the return value is not defined) 289 348 T height() const { 290 349 return top_right.ybottom_left.y; 291 350 } 292 351 293 ///Gives back the width of the box (if the bounding box is empty, then the return value is not defined) 352 ///\brief Gives back the width of the box 353 ///(if the bounding box is empty, then the return value is not defined) 294 354 T width() const { 295 355 return top_right.xbottom_left.x;
Note: See TracChangeset
for help on using the changeset viewer.