TransferToGraphDrawer
(
GraphDrawer graphDrawer
)
{
Debug.Assert(graphDrawer != null);
AssertValid();
this.LabelUserSettings.TransferToGraphDrawer(graphDrawer);
graphDrawer.BackColor =
WpfGraphicsUtil.ColorToWpfColor(this.BackColor);
if (!String.IsNullOrEmpty(this.BackgroundImageUri))
{
graphDrawer.BackgroundImage =
(new WpfImageUtil()).GetImageSynchronousIgnoreDpi(
this.BackgroundImageUri);
}
else
{
graphDrawer.BackgroundImage = null;
}
EdgeDrawer oEdgeDrawer = graphDrawer.EdgeDrawer;
VertexDrawer oVertexDrawer = graphDrawer.VertexDrawer;
EdgeWidthConverter oEdgeWidthConverter = new EdgeWidthConverter();
AlphaConverter oAlphaConverter = new AlphaConverter();
oEdgeDrawer.Width =
oEdgeWidthConverter.WorkbookToGraph(this.EdgeWidth);
oEdgeDrawer.Color = WpfGraphicsUtil.ColorToWpfColor(
Color.FromArgb(oAlphaConverter.WorkbookToGraphAsByte(
this.EdgeAlpha),
this.EdgeColor)
);
oEdgeDrawer.CurveStyle = this.EdgeCurveStyle;
oEdgeDrawer.BezierDisplacementFactor =
this.EdgeBezierDisplacementFactor;
oEdgeDrawer.SelectedColor = WpfGraphicsUtil.ColorToWpfColor(
this.SelectedEdgeColor);
oEdgeDrawer.RelativeArrowSize = this.RelativeArrowSize;
oVertexDrawer.Shape = this.VertexShape;
oVertexDrawer.Radius = (new VertexRadiusConverter()).WorkbookToGraph(
this.VertexRadius);
oVertexDrawer.Effect = this.VertexEffect;
oVertexDrawer.RelativeOuterGlowSize = this.VertexRelativeOuterGlowSize;
oVertexDrawer.Color = WpfGraphicsUtil.ColorToWpfColor(
Color.FromArgb(oAlphaConverter.WorkbookToGraphAsByte(
this.VertexAlpha),
this.VertexColor)
);
oVertexDrawer.SelectedColor = WpfGraphicsUtil.ColorToWpfColor(
this.SelectedVertexColor);
}