public override string ToString() { return(LineStyleInfo.ToString() + " " + FillStyleInfo.ToString() + " " + FontStyleInfo.ToString()); }
public static LineStyle CreateLineStyle(LineStyleInfo styleInfo) { var style = new LineStyle { LinePaint = CreatePaintFromStyleInfo(styleInfo), ShowPoints = false }; return(style); }
public LineOverlay CreateLineOverlay(LineStyleInfo styleInfo) { var paint = MapquestStyleFactory.CreatePaintFromStyleInfo(styleInfo); var lineOverlay = new LineOverlay(paint); // get from styleInfo var paint1 = new Paint(PaintFlags.AntiAlias); paint1.StrokeWidth = styleInfo.StrokeWidth; paint1.Alpha = 100; paint1.Color = new Color(0, 0, 0, 255); lineOverlay.SetShowPoints(true, paint1); return(lineOverlay); }
private void Button_Click(object sender, RoutedEventArgs e) { int cha = c1Chart.Data.Children.Count - PubConstant.ConfigData.LineStyleInfoList.Count; if (cha > 0) { for (int i = 0; i < cha; i++) { PubConstant.ConfigData.LineStyleInfoList.Add(new LineStyleInfo()); } } for (int i = 0; i < c1Chart.Data.Children.Count; i++) { DataSeries ds = c1Chart.Data.Children[i]; LineStyleInfo lineStyle = PubConstant.ConfigData.LineStyleInfoList[i]; lineStyle.ID = i; lineStyle.ConnectionStroke = ds.ConnectionStroke; lineStyle.LineThickness = ds.ConnectionStrokeThickness; lineStyle.ConnectionStrokeDashes = ds.ConnectionStrokeDashes; lineStyle.SymbolMarker = ds.SymbolMarker; if (double.IsInfinity(ds.SymbolSize.Width)) { ds.SymbolSize = new Size(0, 0); } lineStyle.SymbolSize = ds.SymbolSize; lineStyle.SymbolFill = ds.SymbolFill; lineStyle.SymbolStroke = ds.SymbolStroke; lineStyle.SymbolStrokeThickness = ds.SymbolStrokeThickness; } //保存图形的大小 PubConstant.ConfigData.GraphicHeight = defRow.ActualHeight; PubConstant.ConfigData.GraphicWidth = defCol.ActualWidth; PubConstant.updateConfigData(); }