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

Draws a graph's vertices.
This class is responsible for drawing a graph's vertices. The default vertex appearance is determined by this class's properties. The appearance of an individual vertex can be overridden by adding appropriate metadata to the vertex. The following metadata keys are honored: ReservedMetadataKeys.Visibility ReservedMetadataKeys.IsSelected ReservedMetadataKeys.PerColor ReservedMetadataKeys.PerAlpha ReservedMetadataKeys.PerVertexShape ReservedMetadataKeys.PerVertexRadius ReservedMetadataKeys.PerVertexLabel ReservedMetadataKeys.PerVertexLabelFillColor ReservedMetadataKeys.PerVertexLabelPosition ReservedMetadataKeys.PerVertexImage

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

If a vertex has the shape VertexShape.Label and has the ReservedMetadataKeys.PerVertexLabel key, the vertex is drawn as a rectangle containing the text specified by the key's value. The default color of the text and the rectangle's outline is , but can be overridden with the ReservedMetadataKeys.PerColor key. The default fill color of the rectangle is LabelFillColor, but can be overridden with the ReservedMetadataKeys.PerVertexLabelFillColor key.

If a vertex has a shape other than VertexShape.Label and has the ReservedMetadataKeys.PerVertexLabel key, the vertex is drawn as the specified shape, and the text specified by the key's value is drawn next to the vertex as an annotation at the position determined by .

If a vertex has the shape VertexShape.Image and has the key, the vertex is drawn as the image specified by the key's value.

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

When drawing the graph, call TryDrawVertex for each of the graph's vertices.

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

공개 프로퍼티들

프로퍼티 타입 설명
MaximumRadius Double
MaximumRelativeOuterGlowSize Double
MinimumRadius Double
MinimumRelativeOuterGlowSize Double

보호된 프로퍼티들

프로퍼티 타입 설명
m_bLabelWrapText System.Boolean
m_bLimitVerticesToBounds System.Boolean
m_btBackgroundAlpha Byte
m_dLabelWrapMaxTextWidth Double
m_dRadius Double
m_dRelativeOuterGlowSize Double
m_eEffect VertexEffect
m_eLabelPosition VertexLabelPosition
m_eShape VertexShape
m_oLabelFillColor Color

공개 메소드들

메소드 설명
AssertValid ( ) : void
TryDrawVertex ( IVertex vertex, GraphDrawingContext graphDrawingContext, VertexDrawingHistory &vertexDrawingHistory ) : System.Boolean
VertexDrawer ( ) : System

Initializes a new instance of the VertexDrawer class.

보호된 메소드들

메소드 설명
CheckDrawVertexArguments ( IVertex oVertex, GraphDrawingContext oGraphDrawingContext ) : void
CreateFormattedTextWithWrap ( String sText, Color oColor, Double dFontSize ) : System.Windows.Media.FormattedText
DrawImageShape ( IVertex oVertex, GraphDrawingContext oGraphDrawingContext, System.Windows.Media.DrawingContext oDrawingContext, DrawingVisualPlus oDrawingVisual, VisibilityKeyValue eVisibility, System.Boolean bDrawAsSelected, String sAnnotation, System.Windows.Media.ImageSource oImageSource, VertexLabelDrawer oVertexLabelDrawer, CollapsedGroupDrawingManager oCollapsedGroupDrawingManager ) : VertexDrawingHistory
DrawLabelShape ( IVertex oVertex, GraphDrawingContext oGraphDrawingContext, System.Windows.Media.DrawingContext oDrawingContext, DrawingVisualPlus oDrawingVisual, VisibilityKeyValue eVisibility, System.Boolean bDrawAsSelected, String sLabel, CollapsedGroupDrawingManager oCollapsedGroupDrawingManager ) : VertexDrawingHistory
DrawSimpleShape ( IVertex oVertex, VertexShape eShape, GraphDrawingContext oGraphDrawingContext, System.Windows.Media.DrawingContext oDrawingContext, DrawingVisualPlus oDrawingVisual, VisibilityKeyValue eVisibility, System.Boolean bDrawAsSelected, String sAnnotation, VertexLabelDrawer oVertexLabelDrawer, CollapsedGroupDrawingManager oCollapsedGroupDrawingManager ) : VertexDrawingHistory
GetDropShadowEffect ( Color oColor, Double dShadowDepth, Double dBlurRadius, Double dOpacity ) : System.Windows.Media.Effects.DropShadowEffect
GetEffectForDropShadow ( GraphDrawingContext oGraphDrawingContext, Double dShadowDepth, Double dOpacity ) : System.Windows.Media.Effects.Effect
GetEffectForOuterGlow ( Color oColor, Double dGlowSize, Double dOpacity ) : System.Windows.Media.Effects.Effect
GetLabelFontSize ( IVertex oVertex ) : Double
GetLabelPadding ( Double dLabelFontSize ) : Double
GetRadius ( IVertex oVertex ) : Double
GetRectangleEffect ( GraphDrawingContext oGraphDrawingContext, Color oColor ) : System.Windows.Media.Effects.Effect
GetShape ( IVertex oVertex ) : VertexShape
GetSimpleShapeEffect ( GraphDrawingContext oGraphDrawingContext, Double dRadius, Color oColor ) : System.Windows.Media.Effects.Effect
GetVertexLocation ( IVertex oVertex ) : Point
GetVertexRectangle ( Point oLocation, Double dWidth, Double dHeight ) : Rect
MoveVertexIfNecessary ( IVertex oVertex, GraphDrawingContext oGraphDrawingContext, CollapsedGroupDrawingManager oCollapsedGroupDrawingManager, Rect &oVertexBounds ) : void

메소드 상세

AssertValid() 공개 메소드

public AssertValid ( ) : void
리턴 void

CheckDrawVertexArguments() 보호된 메소드

protected CheckDrawVertexArguments ( IVertex oVertex, GraphDrawingContext oGraphDrawingContext ) : void
oVertex IVertex
oGraphDrawingContext GraphDrawingContext
리턴 void

CreateFormattedTextWithWrap() 보호된 메소드

protected CreateFormattedTextWithWrap ( String sText, Color oColor, Double dFontSize ) : System.Windows.Media.FormattedText
sText String
oColor Color
dFontSize Double
리턴 System.Windows.Media.FormattedText

DrawImageShape() 보호된 메소드

protected DrawImageShape ( IVertex oVertex, GraphDrawingContext oGraphDrawingContext, System.Windows.Media.DrawingContext oDrawingContext, DrawingVisualPlus oDrawingVisual, VisibilityKeyValue eVisibility, System.Boolean bDrawAsSelected, String sAnnotation, System.Windows.Media.ImageSource oImageSource, VertexLabelDrawer oVertexLabelDrawer, CollapsedGroupDrawingManager oCollapsedGroupDrawingManager ) : VertexDrawingHistory
oVertex IVertex
oGraphDrawingContext GraphDrawingContext
oDrawingContext System.Windows.Media.DrawingContext
oDrawingVisual Smrf.WpfGraphicsLib.DrawingVisualPlus
eVisibility VisibilityKeyValue
bDrawAsSelected System.Boolean
sAnnotation String
oImageSource System.Windows.Media.ImageSource
oVertexLabelDrawer VertexLabelDrawer
oCollapsedGroupDrawingManager CollapsedGroupDrawingManager
리턴 VertexDrawingHistory

DrawLabelShape() 보호된 메소드

protected DrawLabelShape ( IVertex oVertex, GraphDrawingContext oGraphDrawingContext, System.Windows.Media.DrawingContext oDrawingContext, DrawingVisualPlus oDrawingVisual, VisibilityKeyValue eVisibility, System.Boolean bDrawAsSelected, String sLabel, CollapsedGroupDrawingManager oCollapsedGroupDrawingManager ) : VertexDrawingHistory
oVertex IVertex
oGraphDrawingContext GraphDrawingContext
oDrawingContext System.Windows.Media.DrawingContext
oDrawingVisual Smrf.WpfGraphicsLib.DrawingVisualPlus
eVisibility VisibilityKeyValue
bDrawAsSelected System.Boolean
sLabel String
oCollapsedGroupDrawingManager CollapsedGroupDrawingManager
리턴 VertexDrawingHistory

DrawSimpleShape() 보호된 메소드

protected DrawSimpleShape ( IVertex oVertex, VertexShape eShape, GraphDrawingContext oGraphDrawingContext, System.Windows.Media.DrawingContext oDrawingContext, DrawingVisualPlus oDrawingVisual, VisibilityKeyValue eVisibility, System.Boolean bDrawAsSelected, String sAnnotation, VertexLabelDrawer oVertexLabelDrawer, CollapsedGroupDrawingManager oCollapsedGroupDrawingManager ) : VertexDrawingHistory
oVertex IVertex
eShape VertexShape
oGraphDrawingContext GraphDrawingContext
oDrawingContext System.Windows.Media.DrawingContext
oDrawingVisual Smrf.WpfGraphicsLib.DrawingVisualPlus
eVisibility VisibilityKeyValue
bDrawAsSelected System.Boolean
sAnnotation String
oVertexLabelDrawer VertexLabelDrawer
oCollapsedGroupDrawingManager CollapsedGroupDrawingManager
리턴 VertexDrawingHistory

GetDropShadowEffect() 보호된 메소드

protected GetDropShadowEffect ( Color oColor, Double dShadowDepth, Double dBlurRadius, Double dOpacity ) : System.Windows.Media.Effects.DropShadowEffect
oColor Color
dShadowDepth Double
dBlurRadius Double
dOpacity Double
리턴 System.Windows.Media.Effects.DropShadowEffect

GetEffectForDropShadow() 보호된 메소드

protected GetEffectForDropShadow ( GraphDrawingContext oGraphDrawingContext, Double dShadowDepth, Double dOpacity ) : System.Windows.Media.Effects.Effect
oGraphDrawingContext GraphDrawingContext
dShadowDepth Double
dOpacity Double
리턴 System.Windows.Media.Effects.Effect

GetEffectForOuterGlow() 보호된 메소드

protected GetEffectForOuterGlow ( Color oColor, Double dGlowSize, Double dOpacity ) : System.Windows.Media.Effects.Effect
oColor Color
dGlowSize Double
dOpacity Double
리턴 System.Windows.Media.Effects.Effect

GetLabelFontSize() 보호된 메소드

protected GetLabelFontSize ( IVertex oVertex ) : Double
oVertex IVertex
리턴 Double

GetLabelPadding() 보호된 메소드

protected GetLabelPadding ( Double dLabelFontSize ) : Double
dLabelFontSize Double
리턴 Double

GetRadius() 보호된 메소드

protected GetRadius ( IVertex oVertex ) : Double
oVertex IVertex
리턴 Double

GetRectangleEffect() 보호된 메소드

protected GetRectangleEffect ( GraphDrawingContext oGraphDrawingContext, Color oColor ) : System.Windows.Media.Effects.Effect
oGraphDrawingContext GraphDrawingContext
oColor Color
리턴 System.Windows.Media.Effects.Effect

GetShape() 보호된 메소드

protected GetShape ( IVertex oVertex ) : VertexShape
oVertex IVertex
리턴 VertexShape

GetSimpleShapeEffect() 보호된 메소드

protected GetSimpleShapeEffect ( GraphDrawingContext oGraphDrawingContext, Double dRadius, Color oColor ) : System.Windows.Media.Effects.Effect
oGraphDrawingContext GraphDrawingContext
dRadius Double
oColor Color
리턴 System.Windows.Media.Effects.Effect

GetVertexLocation() 보호된 메소드

protected GetVertexLocation ( IVertex oVertex ) : Point
oVertex IVertex
리턴 Point

GetVertexRectangle() 보호된 메소드

protected GetVertexRectangle ( Point oLocation, Double dWidth, Double dHeight ) : Rect
oLocation Point
dWidth Double
dHeight Double
리턴 System.Windows.Rect

MoveVertexIfNecessary() 보호된 메소드

protected MoveVertexIfNecessary ( IVertex oVertex, GraphDrawingContext oGraphDrawingContext, CollapsedGroupDrawingManager oCollapsedGroupDrawingManager, Rect &oVertexBounds ) : void
oVertex IVertex
oGraphDrawingContext GraphDrawingContext
oCollapsedGroupDrawingManager CollapsedGroupDrawingManager
oVertexBounds System.Windows.Rect
리턴 void

TryDrawVertex() 공개 메소드

public TryDrawVertex ( IVertex vertex, GraphDrawingContext graphDrawingContext, VertexDrawingHistory &vertexDrawingHistory ) : System.Boolean
vertex IVertex
graphDrawingContext GraphDrawingContext
vertexDrawingHistory VertexDrawingHistory
리턴 System.Boolean

VertexDrawer() 공개 메소드

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

프로퍼티 상세

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

Maximum value of the Radius property. The value is 549.0.
public static Double MaximumRadius
리턴 Double

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

Maximum value of the RelativeOuterGlowSize property. The value is 10.0.
public static Double MaximumRelativeOuterGlowSize
리턴 Double

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

Minimum value of the Radius property. The value is 0.1.
public static Double MinimumRadius
리턴 Double

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

Minimum value of the RelativeOuterGlowSize property. The value is 1.0.
public static Double MinimumRelativeOuterGlowSize
리턴 Double

m_bLabelWrapText 보호되어 있는 프로퍼티

protected Boolean,System m_bLabelWrapText
리턴 System.Boolean

m_bLimitVerticesToBounds 보호되어 있는 프로퍼티

protected Boolean,System m_bLimitVerticesToBounds
리턴 System.Boolean

m_btBackgroundAlpha 보호되어 있는 프로퍼티

protected Byte m_btBackgroundAlpha
리턴 Byte

m_dLabelWrapMaxTextWidth 보호되어 있는 프로퍼티

protected Double m_dLabelWrapMaxTextWidth
리턴 Double

m_dRadius 보호되어 있는 프로퍼티

protected Double m_dRadius
리턴 Double

m_dRelativeOuterGlowSize 보호되어 있는 프로퍼티

protected Double m_dRelativeOuterGlowSize
리턴 Double

m_eEffect 보호되어 있는 프로퍼티

protected VertexEffect m_eEffect
리턴 VertexEffect

m_eLabelPosition 보호되어 있는 프로퍼티

protected VertexLabelPosition m_eLabelPosition
리턴 VertexLabelPosition

m_eShape 보호되어 있는 프로퍼티

protected VertexShape m_eShape
리턴 VertexShape

m_oLabelFillColor 보호되어 있는 프로퍼티

protected Color m_oLabelFillColor
리턴 Color