diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/ExportRenderer/FixedDocumentCreator.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/ExportRenderer/FixedDocumentCreator.cs index bed62a7399..7152264fef 100644 --- a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/ExportRenderer/FixedDocumentCreator.cs +++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/ExportRenderer/FixedDocumentCreator.cs @@ -266,12 +266,41 @@ namespace ICSharpCode.Reporting.ExportRenderer } - Brush ConvertBrush(System.Drawing.Color color){ + public Brush ConvertBrush(System.Drawing.Color color){ if (brushConverter.IsValid(color.Name)){ return brushConverter.ConvertFromString(color.Name) as SolidColorBrush; } else{ return brushConverter.ConvertFromString("Black") as SolidColorBrush; } } + + /* + public DashStyle DashStyle (IExportGraphics exportGraphics) { + + switch (exportGraphics.DashStyle) { + case System.Drawing.Drawing2D.DashStyle.Solid: + + break; + case System.Drawing.Drawing2D.DashStyle.Dash: + + break; + case System.Drawing.Drawing2D.DashStyle.Dot: + + break; + case System.Drawing.Drawing2D.DashStyle.DashDot: + + break; + case System.Drawing.Drawing2D.DashStyle.DashDotDot: + + break; + case System.Drawing.Drawing2D.DashStyle.Custom: + + break; + default: + throw new Exception("Invalid value for DashStyle"); + } + return DashStyle.Solid(); + } + */ } } diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Exporter/Visitors/WpfVisitor.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Exporter/Visitors/WpfVisitor.cs index 3d005696e0..ca54d49926 100644 --- a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Exporter/Visitors/WpfVisitor.cs +++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Exporter/Visitors/WpfVisitor.cs @@ -10,6 +10,7 @@ using System; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; +using System.Windows.Media; using ICSharpCode.Reporting.ExportRenderer; using ICSharpCode.Reporting.Interfaces.Export; @@ -81,11 +82,26 @@ namespace ICSharpCode.Reporting.Exporter.Visitors } + public override void Visit(ExportLine exportGraphics) { -// base.Visit(exportGraphics); + var line = new System.Windows.Shapes.Line(); + + line.Stroke = documentCreator.ConvertBrush(exportGraphics.ForeColor); + + line.StrokeStartLineCap = PenLineCap.Round; + line.StrokeEndLineCap = PenLineCap.Round; + + line.StrokeThickness = exportGraphics.Thickness; + + line.X1 = exportGraphics.Location.X; + line.Y1 = exportGraphics.Location.Y; + line.X2 = exportGraphics.Size.Width; + line.Y2 = exportGraphics.Location.Y; + UIElement = line; } + protected UIElement UIElement {get;private set;}