C# Class Smrf.NodeXL.Visualization.Wpf.GroupDrawer

Provides methods that draw a graph's groups.
This class provides methods for drawing groups when the user has specified a layout style of LayoutStyle.UseGroups. This is sometimes called "group in a box."

Call the TryDrawGroupRectangles, and methods to draw the group elements.

Inheritance: DrawerBase
Mostra file Open project: 2014-sed-team3/term-project Class Usage Examples

Protected Properties

Property Type Description
m_dLabelScale Double
m_eLabelPosition VertexLabelPosition
m_oFormattedTextManager FormattedTextManager
m_oLabelTextColor Color

Public Methods

Method Description
AssertValid ( ) : void
GroupDrawer ( ) : System

Initializes a new instance of the GroupDrawer class.

SetFont ( System.Windows.Media.Typeface typeface, Double fontSize ) : void
TryDrawCombinedIntergroupEdges ( IGraph graph, GraphDrawingContext graphDrawingContext, Visual &visual ) : System.Boolean
TryDrawGroupLabels ( IGraph graph, GraphDrawingContext graphDrawingContext, Visual &visual ) : System.Boolean
TryDrawGroupRectangles ( IGraph graph, GraphDrawingContext graphDrawingContext, Visual &visual ) : System.Boolean

Protected Methods

Method Description
DrawCombinedIntergroupEdge ( System.Windows.Media.DrawingContext oDrawingContext, GraphDrawingContext oGraphDrawingContext, IntergroupEdgeInfo oCombinedIntergroupEdge, GroupLayoutDrawingInfo oGroupLayoutDrawingInfo ) : void
DrawGroupLabel ( System.Windows.Media.DrawingContext oDrawingContext, GraphDrawingContext oGraphDrawingContext, GroupInfo oGroupInfo ) : void
GetCombinedIntergroupEdgePenWidth ( IntergroupEdgeInfo oCombinedIntergroupEdge ) : Double
GetContrastingColor ( GraphDrawingContext oGraphDrawingContext, Byte btAlpha, System.Boolean bUseMaximumContrast ) : Color
SetTextAlignment ( System.Windows.Media.FormattedText oFormattedText, VertexLabelPosition eLabelPosition ) : void
TryGetGroupRectangle ( GroupInfo oGroupInfo, Rect &oGroupRectangle ) : System.Boolean

Method Details

AssertValid() public method

public AssertValid ( ) : void
return void

DrawCombinedIntergroupEdge() protected method

protected DrawCombinedIntergroupEdge ( System.Windows.Media.DrawingContext oDrawingContext, GraphDrawingContext oGraphDrawingContext, IntergroupEdgeInfo oCombinedIntergroupEdge, GroupLayoutDrawingInfo oGroupLayoutDrawingInfo ) : void
oDrawingContext System.Windows.Media.DrawingContext
oGraphDrawingContext GraphDrawingContext
oCombinedIntergroupEdge Smrf.NodeXL.Core.IntergroupEdgeInfo
oGroupLayoutDrawingInfo Smrf.NodeXL.Layouts.GroupLayoutDrawingInfo
return void

DrawGroupLabel() protected method

protected DrawGroupLabel ( System.Windows.Media.DrawingContext oDrawingContext, GraphDrawingContext oGraphDrawingContext, GroupInfo oGroupInfo ) : void
oDrawingContext System.Windows.Media.DrawingContext
oGraphDrawingContext GraphDrawingContext
oGroupInfo Smrf.NodeXL.Core.GroupInfo
return void

GetCombinedIntergroupEdgePenWidth() protected method

protected GetCombinedIntergroupEdgePenWidth ( IntergroupEdgeInfo oCombinedIntergroupEdge ) : Double
oCombinedIntergroupEdge Smrf.NodeXL.Core.IntergroupEdgeInfo
return Double

GetContrastingColor() protected method

protected GetContrastingColor ( GraphDrawingContext oGraphDrawingContext, Byte btAlpha, System.Boolean bUseMaximumContrast ) : Color
oGraphDrawingContext GraphDrawingContext
btAlpha Byte
bUseMaximumContrast System.Boolean
return Color

GroupDrawer() public method

Initializes a new instance of the GroupDrawer class.
public GroupDrawer ( ) : System
return System

SetFont() public method

public SetFont ( System.Windows.Media.Typeface typeface, Double fontSize ) : void
typeface System.Windows.Media.Typeface
fontSize Double
return void

SetTextAlignment() protected method

protected SetTextAlignment ( System.Windows.Media.FormattedText oFormattedText, VertexLabelPosition eLabelPosition ) : void
oFormattedText System.Windows.Media.FormattedText
eLabelPosition VertexLabelPosition
return void

TryDrawCombinedIntergroupEdges() public method

public TryDrawCombinedIntergroupEdges ( IGraph graph, GraphDrawingContext graphDrawingContext, Visual &visual ) : System.Boolean
graph IGraph
graphDrawingContext GraphDrawingContext
visual Visual
return System.Boolean

TryDrawGroupLabels() public method

public TryDrawGroupLabels ( IGraph graph, GraphDrawingContext graphDrawingContext, Visual &visual ) : System.Boolean
graph IGraph
graphDrawingContext GraphDrawingContext
visual Visual
return System.Boolean

TryDrawGroupRectangles() public method

public TryDrawGroupRectangles ( IGraph graph, GraphDrawingContext graphDrawingContext, Visual &visual ) : System.Boolean
graph IGraph
graphDrawingContext GraphDrawingContext
visual Visual
return System.Boolean

TryGetGroupRectangle() protected method

protected TryGetGroupRectangle ( GroupInfo oGroupInfo, Rect &oGroupRectangle ) : System.Boolean
oGroupInfo Smrf.NodeXL.Core.GroupInfo
oGroupRectangle System.Windows.Rect
return System.Boolean

Property Details

m_dLabelScale protected_oe property

protected Double m_dLabelScale
return Double

m_eLabelPosition protected_oe property

protected VertexLabelPosition m_eLabelPosition
return VertexLabelPosition

m_oFormattedTextManager protected_oe property

protected FormattedTextManager,Smrf.NodeXL.Visualization.Wpf m_oFormattedTextManager
return FormattedTextManager

m_oLabelTextColor protected_oe property

protected Color m_oLabelTextColor
return Color