C# 클래스 Smrf.NodeXL.Visualization.Wpf.EdgeDrawer

Draws a graph's edges.
This class is responsible for drawing a graph's edges. The default edge appearance is determined by this class's properties. The appearance of an individual edge can be overridden by adding appropriate metadata to the edge. The following metadata keys are honored: ReservedMetadataKeys.Visibility ReservedMetadataKeys.PerColor ReservedMetadataKeys.PerAlpha ReservedMetadataKeys.PerEdgeWidth ReservedMetadataKeys.PerEdgeStyle ReservedMetadataKeys.PerEdgeLabel ReservedMetadataKeys.PerEdgeLabelTextColor ReservedMetadataKeys.IsSelected

The values of the ReservedMetadataKeys.PerColor and ReservedMetadataKeys.PerEdgeLabelTextColor keys can be of type System.Windows.Media.Color or System.Drawing.Color.

If VertexAndEdgeDrawerBase.UseSelection is true, an edge is drawn using VertexAndEdgeDrawerBase.Color or , depending on whether the edge has been marked as selected. If is false, is used regardless of whether the edge has been marked as selected.

When drawing the graph, call TryDrawEdge for each of the graph's edges.

상속: VertexAndEdgeDrawerBase
파일 보기 프로젝트 열기: 2014-sed-team3/term-project 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
MaximumRelativeArrowSize Double
MaximumWidth Double
MinimumRelativeArrowSize Double
MinimumWidth Double

보호된 프로퍼티들

프로퍼티 타입 설명
m_bDrawArrowOnDirectedEdge System.Boolean
m_dBezierDisplacementFactor Double
m_dRelativeArrowSize Double
m_dWidth Double
m_eCurveStyle EdgeCurveStyle
m_oLabelTextColor Color

공개 메소드들

메소드 설명
AssertValid ( ) : void
EdgeDrawer ( ) : System

Initializes a new instance of the EdgeDrawer class.

TryDrawEdge ( IEdge edge, GraphDrawingContext graphDrawingContext, EdgeDrawingHistory &edgeDrawingHistory ) : System.Boolean

보호된 메소드들

메소드 설명
DrawArrow ( System.Windows.Media.DrawingContext oDrawingContext, Point oArrowTipLocation, Double dArrowAngle, Color oColor, Double dEdgeWidth ) : Point
DrawBezierCurve ( IEdge oEdge, GraphDrawingContext oGraphDrawingContext, System.Windows.Media.DrawingContext oDrawingContext, Point oEdgeEndpoint1, Point oEdgeEndpoint2, System.Boolean bDrawAsSelected, System.Boolean bDrawArrow, System.Windows.Media.Pen oPen, Color oColor, Double dWidth, VisibilityKeyValue eVisibility, String sLabel ) : void
DrawBezierLabel ( System.Windows.Media.DrawingContext oDrawingContext, GraphDrawingContext oGraphDrawingContext, System.Windows.Media.FormattedText oFormattedText, Point oEdgeEndpoint1, Point oEdgeEndpoint2, System.Windows.Media.PathGeometry oBezierCurve, Double dLabelOriginAsFractionOfEdgeLength, Double dEdgeLength, Double dBufferWidth, Color oLabelTextColor, Color oTranslucentRectangleColor, Double dFontSize ) : void
DrawCurveThroughIntermediatePoints ( IEdge oEdge, GraphDrawingContext oGraphDrawingContext, System.Windows.Media.DrawingContext oDrawingContext, VertexDrawingHistory oVertex1DrawingHistory, VertexDrawingHistory oVertex2DrawingHistory, Point oEdgeEndpoint1, Point oEdgeEndpoint2, System.Windows.Media.Pen oPen ) : void
DrawLabel ( IEdge oEdge, System.Windows.Media.DrawingContext oDrawingContext, GraphDrawingContext oGraphDrawingContext, System.Boolean bDrawAsSelected, Color oEdgeColor, VisibilityKeyValue eVisibility, Point oEdgeEndpoint1, Point oEdgeEndpoint2, System.Windows.Media.PathGeometry oBezierCurve, Point oBezierControlPoint, String sLabel ) : void
DrawSelfLoopAt ( System.Windows.Media.DrawingContext oDrawingContext, GraphDrawingContext oGraphDrawingContext, Color oColor, Double dWidth, Point oSelfLoopEndpoint, RectangleEdge eFarthestGraphRectangleEdge, System.Boolean bDrawArrow ) : void
DrawStraightEdge ( IEdge oEdge, GraphDrawingContext oGraphDrawingContext, System.Windows.Media.DrawingContext oDrawingContext, Point oEdgeEndpoint1, Point oEdgeEndpoint2, System.Boolean bDrawAsSelected, System.Boolean bDrawArrow, System.Windows.Media.Pen oPen, Color oColor, Double dWidth, VisibilityKeyValue eVisibility, String sLabel ) : void
DrawStraightLabel ( System.Windows.Media.DrawingContext oDrawingContext, GraphDrawingContext oGraphDrawingContext, System.Windows.Media.FormattedText oFormattedText, Point oEdgeEndpoint1, Point oEdgeEndpoint2, Double dLabelOriginAsFractionOfEdgeLength, Double dEdgeLength, Double dBufferWidth, Color oTranslucentRectangleColor ) : void
DrawTranslucentRectangle ( System.Windows.Media.DrawingContext oDrawingContext, Rect oRectangle, Color oColor ) : void
FilterIntermediatePoints ( IEdge oEdge, VertexDrawingHistory oVertex1DrawingHistory, VertexDrawingHistory oVertex2DrawingHistory ) : List
GetDashStyle ( IEdge oEdge, Double dWidth, System.Boolean bDrawAsSelected ) : System.Windows.Media.DashStyle
GetLabelFontSize ( IEdge oEdge ) : Double
GetLabelTextColor ( IEdge oEdge, System.Boolean bDrawAsSelected, Color oEdgeColor, VisibilityKeyValue eVisibility ) : Color
GetWidth ( IEdge oEdge ) : Double
TryDrawSelfLoop ( IVertex oVertex, System.Windows.Media.DrawingContext oDrawingContext, GraphDrawingContext oGraphDrawingContext, Color oColor, Double dWidth, System.Boolean bDrawArrow ) : System.Boolean
TryGetVertexInformation ( IVertex oVertex1, IVertex oVertex2, VertexDrawingHistory &oVertex1DrawingHistory, VertexDrawingHistory &oVertex2DrawingHistory, Point &oEdgeEndpoint1, Point &oEdgeEndpoint2 ) : System.Boolean

메소드 상세

AssertValid() 공개 메소드

public AssertValid ( ) : void
리턴 void

DrawArrow() 보호된 메소드

protected DrawArrow ( System.Windows.Media.DrawingContext oDrawingContext, Point oArrowTipLocation, Double dArrowAngle, Color oColor, Double dEdgeWidth ) : Point
oDrawingContext System.Windows.Media.DrawingContext
oArrowTipLocation Point
dArrowAngle Double
oColor Color
dEdgeWidth Double
리턴 Point

DrawBezierCurve() 보호된 메소드

protected DrawBezierCurve ( IEdge oEdge, GraphDrawingContext oGraphDrawingContext, System.Windows.Media.DrawingContext oDrawingContext, Point oEdgeEndpoint1, Point oEdgeEndpoint2, System.Boolean bDrawAsSelected, System.Boolean bDrawArrow, System.Windows.Media.Pen oPen, Color oColor, Double dWidth, VisibilityKeyValue eVisibility, String sLabel ) : void
oEdge IEdge
oGraphDrawingContext GraphDrawingContext
oDrawingContext System.Windows.Media.DrawingContext
oEdgeEndpoint1 Point
oEdgeEndpoint2 Point
bDrawAsSelected System.Boolean
bDrawArrow System.Boolean
oPen System.Windows.Media.Pen
oColor Color
dWidth Double
eVisibility VisibilityKeyValue
sLabel String
리턴 void

DrawBezierLabel() 보호된 메소드

protected DrawBezierLabel ( System.Windows.Media.DrawingContext oDrawingContext, GraphDrawingContext oGraphDrawingContext, System.Windows.Media.FormattedText oFormattedText, Point oEdgeEndpoint1, Point oEdgeEndpoint2, System.Windows.Media.PathGeometry oBezierCurve, Double dLabelOriginAsFractionOfEdgeLength, Double dEdgeLength, Double dBufferWidth, Color oLabelTextColor, Color oTranslucentRectangleColor, Double dFontSize ) : void
oDrawingContext System.Windows.Media.DrawingContext
oGraphDrawingContext GraphDrawingContext
oFormattedText System.Windows.Media.FormattedText
oEdgeEndpoint1 Point
oEdgeEndpoint2 Point
oBezierCurve System.Windows.Media.PathGeometry
dLabelOriginAsFractionOfEdgeLength Double
dEdgeLength Double
dBufferWidth Double
oLabelTextColor Color
oTranslucentRectangleColor Color
dFontSize Double
리턴 void

DrawCurveThroughIntermediatePoints() 보호된 메소드

protected DrawCurveThroughIntermediatePoints ( IEdge oEdge, GraphDrawingContext oGraphDrawingContext, System.Windows.Media.DrawingContext oDrawingContext, VertexDrawingHistory oVertex1DrawingHistory, VertexDrawingHistory oVertex2DrawingHistory, Point oEdgeEndpoint1, Point oEdgeEndpoint2, System.Windows.Media.Pen oPen ) : void
oEdge IEdge
oGraphDrawingContext GraphDrawingContext
oDrawingContext System.Windows.Media.DrawingContext
oVertex1DrawingHistory VertexDrawingHistory
oVertex2DrawingHistory VertexDrawingHistory
oEdgeEndpoint1 Point
oEdgeEndpoint2 Point
oPen System.Windows.Media.Pen
리턴 void

DrawLabel() 보호된 메소드

protected DrawLabel ( IEdge oEdge, System.Windows.Media.DrawingContext oDrawingContext, GraphDrawingContext oGraphDrawingContext, System.Boolean bDrawAsSelected, Color oEdgeColor, VisibilityKeyValue eVisibility, Point oEdgeEndpoint1, Point oEdgeEndpoint2, System.Windows.Media.PathGeometry oBezierCurve, Point oBezierControlPoint, String sLabel ) : void
oEdge IEdge
oDrawingContext System.Windows.Media.DrawingContext
oGraphDrawingContext GraphDrawingContext
bDrawAsSelected System.Boolean
oEdgeColor Color
eVisibility VisibilityKeyValue
oEdgeEndpoint1 Point
oEdgeEndpoint2 Point
oBezierCurve System.Windows.Media.PathGeometry
oBezierControlPoint Point
sLabel String
리턴 void

DrawSelfLoopAt() 보호된 메소드

protected DrawSelfLoopAt ( System.Windows.Media.DrawingContext oDrawingContext, GraphDrawingContext oGraphDrawingContext, Color oColor, Double dWidth, Point oSelfLoopEndpoint, RectangleEdge eFarthestGraphRectangleEdge, System.Boolean bDrawArrow ) : void
oDrawingContext System.Windows.Media.DrawingContext
oGraphDrawingContext GraphDrawingContext
oColor Color
dWidth Double
oSelfLoopEndpoint Point
eFarthestGraphRectangleEdge RectangleEdge
bDrawArrow System.Boolean
리턴 void

DrawStraightEdge() 보호된 메소드

protected DrawStraightEdge ( IEdge oEdge, GraphDrawingContext oGraphDrawingContext, System.Windows.Media.DrawingContext oDrawingContext, Point oEdgeEndpoint1, Point oEdgeEndpoint2, System.Boolean bDrawAsSelected, System.Boolean bDrawArrow, System.Windows.Media.Pen oPen, Color oColor, Double dWidth, VisibilityKeyValue eVisibility, String sLabel ) : void
oEdge IEdge
oGraphDrawingContext GraphDrawingContext
oDrawingContext System.Windows.Media.DrawingContext
oEdgeEndpoint1 Point
oEdgeEndpoint2 Point
bDrawAsSelected System.Boolean
bDrawArrow System.Boolean
oPen System.Windows.Media.Pen
oColor Color
dWidth Double
eVisibility VisibilityKeyValue
sLabel String
리턴 void

DrawStraightLabel() 보호된 메소드

protected DrawStraightLabel ( System.Windows.Media.DrawingContext oDrawingContext, GraphDrawingContext oGraphDrawingContext, System.Windows.Media.FormattedText oFormattedText, Point oEdgeEndpoint1, Point oEdgeEndpoint2, Double dLabelOriginAsFractionOfEdgeLength, Double dEdgeLength, Double dBufferWidth, Color oTranslucentRectangleColor ) : void
oDrawingContext System.Windows.Media.DrawingContext
oGraphDrawingContext GraphDrawingContext
oFormattedText System.Windows.Media.FormattedText
oEdgeEndpoint1 Point
oEdgeEndpoint2 Point
dLabelOriginAsFractionOfEdgeLength Double
dEdgeLength Double
dBufferWidth Double
oTranslucentRectangleColor Color
리턴 void

DrawTranslucentRectangle() 보호된 메소드

protected DrawTranslucentRectangle ( System.Windows.Media.DrawingContext oDrawingContext, Rect oRectangle, Color oColor ) : void
oDrawingContext System.Windows.Media.DrawingContext
oRectangle System.Windows.Rect
oColor Color
리턴 void

EdgeDrawer() 공개 메소드

Initializes a new instance of the EdgeDrawer class.
public EdgeDrawer ( ) : System
리턴 System

FilterIntermediatePoints() 보호된 메소드

protected FilterIntermediatePoints ( IEdge oEdge, VertexDrawingHistory oVertex1DrawingHistory, VertexDrawingHistory oVertex2DrawingHistory ) : List
oEdge IEdge
oVertex1DrawingHistory VertexDrawingHistory
oVertex2DrawingHistory VertexDrawingHistory
리턴 List

GetDashStyle() 보호된 메소드

protected GetDashStyle ( IEdge oEdge, Double dWidth, System.Boolean bDrawAsSelected ) : System.Windows.Media.DashStyle
oEdge IEdge
dWidth Double
bDrawAsSelected System.Boolean
리턴 System.Windows.Media.DashStyle

GetLabelFontSize() 보호된 메소드

protected GetLabelFontSize ( IEdge oEdge ) : Double
oEdge IEdge
리턴 Double

GetLabelTextColor() 보호된 메소드

protected GetLabelTextColor ( IEdge oEdge, System.Boolean bDrawAsSelected, Color oEdgeColor, VisibilityKeyValue eVisibility ) : Color
oEdge IEdge
bDrawAsSelected System.Boolean
oEdgeColor Color
eVisibility VisibilityKeyValue
리턴 Color

GetWidth() 보호된 메소드

protected GetWidth ( IEdge oEdge ) : Double
oEdge IEdge
리턴 Double

TryDrawEdge() 공개 메소드

public TryDrawEdge ( IEdge edge, GraphDrawingContext graphDrawingContext, EdgeDrawingHistory &edgeDrawingHistory ) : System.Boolean
edge IEdge
graphDrawingContext GraphDrawingContext
edgeDrawingHistory EdgeDrawingHistory
리턴 System.Boolean

TryDrawSelfLoop() 보호된 메소드

protected TryDrawSelfLoop ( IVertex oVertex, System.Windows.Media.DrawingContext oDrawingContext, GraphDrawingContext oGraphDrawingContext, Color oColor, Double dWidth, System.Boolean bDrawArrow ) : System.Boolean
oVertex IVertex
oDrawingContext System.Windows.Media.DrawingContext
oGraphDrawingContext GraphDrawingContext
oColor Color
dWidth Double
bDrawArrow System.Boolean
리턴 System.Boolean

TryGetVertexInformation() 보호된 메소드

protected TryGetVertexInformation ( IVertex oVertex1, IVertex oVertex2, VertexDrawingHistory &oVertex1DrawingHistory, VertexDrawingHistory &oVertex2DrawingHistory, Point &oEdgeEndpoint1, Point &oEdgeEndpoint2 ) : System.Boolean
oVertex1 IVertex
oVertex2 IVertex
oVertex1DrawingHistory VertexDrawingHistory
oVertex2DrawingHistory VertexDrawingHistory
oEdgeEndpoint1 Point
oEdgeEndpoint2 Point
리턴 System.Boolean

프로퍼티 상세

MaximumRelativeArrowSize 공개적으로 정적으로 프로퍼티

Maximum value of the RelativeArrowSize property. The value is 20.
public static Double MaximumRelativeArrowSize
리턴 Double

MaximumWidth 공개적으로 정적으로 프로퍼티

Maximum value of the Width property. The value is 20.
public static Double MaximumWidth
리턴 Double

MinimumRelativeArrowSize 공개적으로 정적으로 프로퍼티

Minimum value of the RelativeArrowSize property. The value is 0.
public static Double MinimumRelativeArrowSize
리턴 Double

MinimumWidth 공개적으로 정적으로 프로퍼티

Minimum value of the Width property. The value is 1.
public static Double MinimumWidth
리턴 Double

m_bDrawArrowOnDirectedEdge 보호되어 있는 프로퍼티

protected Boolean,System m_bDrawArrowOnDirectedEdge
리턴 System.Boolean

m_dBezierDisplacementFactor 보호되어 있는 프로퍼티

protected Double m_dBezierDisplacementFactor
리턴 Double

m_dRelativeArrowSize 보호되어 있는 프로퍼티

protected Double m_dRelativeArrowSize
리턴 Double

m_dWidth 보호되어 있는 프로퍼티

protected Double m_dWidth
리턴 Double

m_eCurveStyle 보호되어 있는 프로퍼티

protected EdgeCurveStyle m_eCurveStyle
리턴 EdgeCurveStyle

m_oLabelTextColor 보호되어 있는 프로퍼티

protected Color m_oLabelTextColor
리턴 Color