private void ShapeRelatedPropertiesToDot( [CanBeNull] GraphvizVertex commonFormat, [NotNull] IDictionary <string, object> properties) { if (Shape != GraphvizVertexShape.Unspecified) { properties["shape"] = Shape; } GraphvizVertexShape shape = Shape == GraphvizVertexShape.Unspecified && commonFormat != null ? commonFormat.Shape : Shape; LabelOrRecordToDot(properties, shape); if (shape == GraphvizVertexShape.Polygon) { if (Sides != 0) { properties["sides"] = Sides; } if (!IsZero(Skew)) { properties["skew"] = Skew; } if (!IsZero(Distortion)) { properties["distortion"] = Distortion; } } }
/// <summary> /// Default constructor /// </summary> public GraphvizVertex() { m_Font = null; m_Shape = GraphvizVertexShape.Unspecified; m_FixedSize = false; m_Size = new SizeF(0, 0); m_Label = null; m_Style = GraphvizVertexStyle.Unspecified; m_Regular = false; m_Url = null; m_ToolTip = null; m_StrokeColor = Color.Black; m_FillColor = Color.White; m_FontColor = Color.Black; m_Comment = null; m_Group = null; m_Layer = null; m_Orientation = 0; m_Peripheries = -1; m_Z = -1; m_Sides = 4; m_Skew = 0.0; m_Distorsion = 0.0; m_TopLabel = null; m_BottomLabel = null; }
/// <summary> /// Default constructor /// </summary> public GraphvizVertex() { m_Font = null; m_Shape = GraphvizVertexShape.Unspecified; m_FixedSize=false; m_Size=new SizeF(0,0); m_Label = null; m_Style = GraphvizVertexStyle.Unspecified; m_Regular = false; m_Url = null; m_ToolTip = null; m_StrokeColor = Color.Black; m_FillColor = Color.White; m_FontColor = Color.Black; m_Comment = null; m_Group = null; m_Layer = null; m_Orientation = 0; m_Peripheries = -1; m_Z = -1; m_Sides = 4; m_Skew = 0.0; m_Distorsion = 0.0; m_TopLabel = null; m_BottomLabel = null; }
private void LabelOrRecordToDot( [NotNull] IDictionary <string, object> properties, GraphvizVertexShape shape) { if (shape == GraphvizVertexShape.Record) { // Priority to label to allow custom record generation process if (!string.IsNullOrEmpty(Label)) { properties["label"] = Label; } else if (Record != null && Record.Cells.Count > 0) { properties["label"] = Record; } } else if (!string.IsNullOrEmpty(Label)) { properties["label"] = IsHtmlLabel ? (object)new HtmlString(Label) : Escape(Label); } }
public Visualize(GraphvizVertexShape vertexShape = GraphvizVertexShape.Ellipse, GraphvizVertexStyle vertexStyle = GraphvizVertexStyle.Rounded) { _VertexShape = vertexShape; _VertexStyle = vertexStyle; }