TLIB documentation
 

tlRect.h

Go to the documentation of this file.
00001 /////////////////////////////////////////////////////////////////////////////////
00002 //
00003 //  This file is part of the TLIB computer vision library.
00004 //  Copyright (C) 2003-2008 Sebastien Grange
00005 //  Copyright (C) 2003-2007 VRAI Group, EPFL
00006 //  All rights reserved.
00007 // 
00008 //  This library is free software; you can redistribute it and/or modify
00009 //  it under the terms of the GNU General Public License("GPL") version 2
00010 //  as published by the Free Software Foundation.
00011 // 
00012 //  <http://www.tuyphon.com/tlib>
00013 //
00014 /////////////////////////////////////////////////////////////////////////////////
00015 
00016 
00017 #ifndef __TLRECT_H__
00018 #define __TLRECT_H__
00019 
00020 #include "tlVision.h"
00021 #include "tlLocation.h"
00022 #include "tlSize.h"
00023 
00024 
00025 class tlRect : public tlSize, public tlLocation
00026 {
00027 public:
00028 
00029   // constructors
00030   tlRect  ();
00031   tlRect  (int x, int y, int width, int height);
00032   virtual ~tlRect ();
00033 
00034   // parameters
00035   int set (int x, int y, int width, int height);
00036   int set (tlPoint *p1, tlPoint *p2);
00037   int set (tlPoint *p1, int width, int height);
00038 
00039   // shift and resize
00040   int collapse (int dsize);
00041   int collapse (int dwidth, int dheight);
00042   int expand   (int dsize);
00043   int expand   (int dwidth, int dheight);
00044 
00045   // location
00046   int setCenter   (int x, int y);
00047   int setCenter   (tlPoint *p);
00048 
00049   // duplication
00050   int     copy   (tlRect *rect);
00051   int     copyTo (tlRect *rect);
00052   tlRect *copy   ();
00053 
00054   // intersection
00055   int intersect (tlRect *rect);
00056 };
00057 
00058 
00059 #endif
00060 


TLIB documentation - generated on 7 May 2008
Please address any questions to seb@tuyphon.com
(C) 2001-2008 - S. Grange
(C) 2001-2007 - VRAI Group, EPFL
All Rights Reserved.