TransferToGraphDrawer
(
GraphDrawer graphDrawer
)
{
Debug.Assert(graphDrawer != null);
AssertValid();
Font oFont = this.Font;
System.Windows.Media.Typeface oTypeface =
WpfGraphicsUtil.FontToTypeface(oFont);
Double dFontSize = WpfGraphicsUtil.SystemDrawingFontSizeToWpfFontSize(
oFont.Size);
VertexDrawer oVertexDrawer = graphDrawer.VertexDrawer;
oVertexDrawer.SetFont(oTypeface, dFontSize);
oVertexDrawer.LabelFillColor =
WpfGraphicsUtil.ColorToWpfColor(this.VertexLabelFillColor);
oVertexDrawer.LabelPosition = this.VertexLabelPosition;
oVertexDrawer.MaximumLabelLength = this.VertexLabelMaximumLength;
oVertexDrawer.LabelWrapText = this.VertexLabelWrapText;
oVertexDrawer.LabelWrapMaxTextWidth =
this.VertexLabelWrapMaxTextWidth;
EdgeDrawer oEdgeDrawer = graphDrawer.EdgeDrawer;
oEdgeDrawer.SetFont(oTypeface, dFontSize);
oEdgeDrawer.LabelTextColor =
WpfGraphicsUtil.ColorToWpfColor(this.EdgeLabelTextColor);
oEdgeDrawer.MaximumLabelLength = this.EdgeLabelMaximumLength;
GroupDrawer oGroupDrawer = graphDrawer.GroupDrawer;
oGroupDrawer.SetFont(oTypeface, GroupLabelFontSize);
oGroupDrawer.LabelTextColor = WpfGraphicsUtil.ColorToWpfColor(
Color.FromArgb( (new AlphaConverter() ).WorkbookToGraphAsByte(
this.GroupLabelTextAlpha),
this.GroupLabelTextColor)
);
oGroupDrawer.LabelPosition = this.GroupLabelPosition;
}