Open
Graph Drawing
Framework

 v.2012.05
 

TileToRowsCCPacker.h
Go to the documentation of this file.
00001 /*
00002  * $Revision: 2299 $
00003  * 
00004  * last checkin:
00005  *   $Author: gutwenger $ 
00006  *   $Date: 2012-05-07 15:57:08 +0200 (Mon, 07 May 2012) $ 
00007  ***************************************************************/
00008  
00043 #ifdef _MSC_VER
00044 #pragma once
00045 #endif
00046 
00047 #ifndef OGDF_TILE_TO_ROWS_CC_PACKER_H
00048 #define OGDF_TILE_TO_ROWS_CC_PACKER_H
00049 
00050 
00051 
00052 #include <ogdf/module/CCLayoutPackModule.h>
00053 
00054 
00055 
00056 namespace ogdf {
00057 
00058 
00060 class OGDF_EXPORT TileToRowsCCPacker : public CCLayoutPackModule
00061 {
00062     template<class POINT> struct RowInfo;
00063 
00064 public:
00066     TileToRowsCCPacker() { }
00067 
00068     virtual ~TileToRowsCCPacker() { }
00069 
00082     void call(Array<DPoint> &box,
00083         Array<DPoint> &offset,
00084         double pageRatio = 1.0);
00085 
00098     void call(Array<IPoint> &box,
00099         Array<IPoint> &offset,
00100         double pageRatio = 1.0);
00101 
00102 private:
00103     template<class POINT>
00104     static void callGeneric(Array<POINT> &box,
00105         Array<POINT> &offset,
00106         double pageRatio);
00107 
00108     template<class POINT>
00109     static int findBestRow(Array<RowInfo<POINT> > &row,
00110         int nRows,
00111         double pageRatio,
00112         const POINT &rect);
00113 
00114 };
00115 
00116 
00117 } // end namespace ogdf
00118 
00119 
00120 #endif