/// <summary> /// Default contructor /// </summary> public GraphvizGraph() { m_Url = null; m_BackgroundColor = Color.White; m_IsCentered = false; m_ClusterRank = ClusterMode.Local; m_Comment = null; m_IsCompounded = false; m_IsConcentrated = false; m_Font = null; m_FontColor = Color.Black; m_Label = null; m_LabelJustification = LabelJustification.C; m_LabelLocation = LabelLocation.B; m_Layers = new GraphvizLayerCollection(); m_McLimit = 1.0; m_NodeSeparation = 0.25; m_IsNormalized = false; m_NsLimit = -1; m_NsLimit1 = -1; m_OutputOrder = OutputMode.BreadthFirst; m_PageSize = new Size(0, 0); m_PageDirection = PageDirection.BL; m_Quantum = 0; m_RankSeparation = 0.5; m_Ratio = RatioMode.Auto; m_IsReMinCross = false; m_Resolution = 0.96; m_Rotate = 0; m_SamplePoints = 8; m_SearchSize = 30; m_Size = new Size(0, 0); m_StyleSheet = null; }
/// <summary> /// Default contructor /// </summary> public GraphvizGraph() { m_Url=null; m_BackgroundColor=Color.White; m_IsCentered=false; m_ClusterRank=ClusterMode.Local; m_Comment=null; m_IsCompounded=false; m_IsConcentrated=false; m_Font=null; m_FontColor=Color.Black; m_Label=null; m_LabelJustification=LabelJustification.C; m_LabelLocation=LabelLocation.B; m_Layers=new GraphvizLayerCollection(); m_McLimit=1.0; m_NodeSeparation=0.25; m_IsNormalized=false; m_NsLimit=-1; m_NsLimit1=-1; m_OutputOrder=OutputMode.BreadthFirst; m_PageSize=new Size(0,0); m_PageDirection=PageDirection.BL; m_Quantum=0; m_RankSeparation=0.5; m_Ratio = RatioMode.Auto; m_IsReMinCross=false; m_Resolution=0.96; m_Rotate=0; m_SamplePoints=8; m_SearchSize=30; m_Size=new Size(0,0); m_StyleSheet=null; }
/// <summary> /// Converts to dot code /// </summary> /// <returns>dot code</returns> public String ToDot() { Hashtable pairs = new Hashtable(); if (Url != null) { pairs["URL"] = Url; } if (BackgroundColor != Color.White) { pairs["bgcolor"] = BackgroundColor; } if (IsCentered) { pairs["center"] = true; } if (ClusterRank != ClusterMode.Local) { pairs["clusterrank"] = ClusterRank.ToString().ToLower(); } if (Comment != null) { pairs["comment"] = Comment; } if (IsCompounded) { pairs["compound"] = IsCompounded; } if (IsConcentrated) { pairs["concentrated"] = IsConcentrated; } if (Font != null) { pairs["fontname"] = Font.Name; pairs["fontsize"] = Font.SizeInPoints; } if (FontColor != Color.Black) { pairs["fontcolor"] = FontColor; } if (Label != null) { pairs["label"] = Label; } if (LabelJustification != LabelJustification.C) { pairs["labeljust"] = LabelJustification.ToString().ToLower(); } if (LabelLocation != LabelLocation.B) { pairs["labelloc"] = LabelLocation.ToString().ToLower(); } if (Layers.Count != 0) { pairs["layers"] = Layers.ToDot(); } if (McLimit != 1.0) { pairs["mclimit"] = McLimit; } if (NodeSeparation != 0.25) { pairs["nodesep"] = NodeSeparation; } if (IsNormalized) { pairs["normalize"] = IsNormalized; } if (NsLimit > 0) { pairs["nslimit"] = NsLimit; } if (NsLimit1 > 0) { pairs["nslimit1"] = NsLimit1; } if (OutputOrder != OutputMode.BreadthFirst) { pairs["outputorder"] = OutputOrder.ToString().ToLower(); } if (!PageSize.IsEmpty) { pairs["page"] = String.Format("({0},{1})", PageSize.Width, PageSize.Height); } if (PageDirection != PageDirection.BL) { pairs["pagedir"] = PageDirection.ToString().ToLower(); } if (Quantum > 0) { pairs["quantum"] = Quantum; } if (RankSeparation != 0.5) { pairs["ranksep"] = RankSeparation; } if (Ratio != RatioMode.Auto) { pairs["ratio"] = Ratio.ToString().ToLower(); } if (IsReMinCross) { pairs["remincross"] = IsReMinCross; } if (Resolution != 0.96) { pairs["resolution"] = Resolution; } if (Rotate != 0) { pairs["rotate"] = Rotate; } if (SamplePoints != 8) { pairs["samplepoints"] = SamplePoints; } if (SearchSize != 30) { pairs["searchsize"] = SearchSize; } if (!Size.IsEmpty) { pairs["size"] = String.Format("({0},{1})", Size.Width, Size.Height); } if (StyleSheet != null) { pairs["stylesheet"] = StyleSheet; } return(GenerateDot(pairs)); }
public RibbonLabelCapsule(string name, string text, string hint, IRibbonObject parent, int width) : base(name, text, hint, parent, width) { this.Justification = LabelJustification.far; }