Open
Graph Drawing
Framework

 v.2007.11
 

PlanarDrawLayout.h

Go to the documentation of this file.
00001 /*
00002  * $Revision: 1.5 $
00003  * 
00004  * last checkin:
00005  *   $Author: gutwenger $ 
00006  *   $Date: 2007-11-08 21:07:51 +0100 (Do, 08 Nov 2007) $ 
00007  ***************************************************************/
00008  
00052 #ifdef _MSC_VER
00053 #pragma once
00054 #endif
00055 
00056 
00057 #ifndef OGDF_PLANAR_DRAW_LAYOUT_H
00058 #define OGDF_PLANAR_DRAW_LAYOUT_H
00059 
00060 
00061 #include <ogdf/module/GridLayoutModule.h>
00062 #include <ogdf/basic/ModuleOption.h>
00063 #include <ogdf/module/AugmentationModule.h>
00064 #include <ogdf/module/ShellingOrderModule.h>
00065 
00066 
00067 namespace ogdf {
00068 
00069     class ShellingOrder;
00070 
00141 class PlanarDrawLayout : public PlanarGridLayoutModule
00142 {
00143 public:
00145     PlanarDrawLayout();
00146 
00147     ~PlanarDrawLayout() { }
00148 
00149 
00161     bool sizeOptimization() const { return m_sizeOptimization; }
00162 
00164     void sizeOptimization(bool opt) { m_sizeOptimization = opt; }
00165 
00172     bool sideOptimization() const { return m_sizeOptimization; }
00173 
00175     void sideOptimization(bool opt) { m_sizeOptimization = opt; }
00176 
00184     double baseRatio() const { return m_baseRatio; }
00185 
00187     void baseRatio(double ratio) { m_baseRatio = ratio; }
00188 
00189 
00201     void setAugmenter(AugmentationModule *pAugmenter) {
00202         m_augmenter.set(pAugmenter);
00203     }
00204     
00206     void setShellingOrder(ShellingOrderModule *pOrder){
00207         m_computeOrder.set(pOrder);
00208     }
00209 
00211 
00212 private:
00213     bool   m_sizeOptimization; 
00214     bool   m_sideOptimization; 
00215     double m_baseRatio; 
00216 
00217     ModuleOption<AugmentationModule>  m_augmenter;      
00218     ModuleOption<ShellingOrderModule> m_computeOrder;   
00219 
00220     // computes grid layout for graph G
00221     void doCall(
00222         const Graph &G,
00223         adjEntry adjExternal,
00224         GridLayout &gridLayout,
00225         IPoint &boundingBox,
00226         bool fixEmbedding);
00227 
00228     void computeCoordinates(const Graph &G,
00229         ShellingOrder &order,
00230         NodeArray<int> &x,
00231         NodeArray<int> &y);
00232 
00233 };
00234 
00235 
00236 } // end namespace ogdf
00237 
00238 
00239 #endif


© 1999-2007 by oreas GmbH, © 2005-2007 by University Dortmund and University Cologne.

Generated on Thu Nov 22 19:40:04 2007 by doxygen 1.5.4.