Browse Source

Pdf - draw Rectangle

reports
Peter Forstmeier 12 years ago
parent
commit
7fd082f52b
  1. 20
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Pdf/PdfVisitor.cs
  2. 2
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Wpf/Visitor/WpfVisitor.cs

20
src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Pdf/PdfVisitor.cs

@ -66,17 +66,25 @@ namespace ICSharpCode.Reporting.Pdf
public override void Visit(ExportLine exportGraphics) public override void Visit(ExportLine exportLine)
{ {
var columnLocation = containerLocation; var columnLocation = containerLocation;
columnLocation.Offset(exportGraphics.Location); columnLocation.Offset(exportLine.Location);
var pen = PdfHelper.PdfPen(exportGraphics); var pen = PdfHelper.PdfPen(exportLine);
pen.DashStyle = PdfHelper.DashStyle(exportGraphics); pen.DashStyle = PdfHelper.DashStyle(exportLine);
pen.LineCap = PdfHelper.LineCap(exportGraphics); pen.LineCap = PdfHelper.LineCap(exportLine);
gfx.DrawLine(pen,columnLocation.ToXPoints(),new Point(exportGraphics.Size.Width,columnLocation.Y).ToXPoints()); gfx.DrawLine(pen,columnLocation.ToXPoints(),new Point(exportLine.Size.Width,columnLocation.Y).ToXPoints());
} }
public override void Visit (ExportRectangle exportRectangle) {
var columnLocation = containerLocation;
columnLocation.Offset(exportRectangle.Location);
var pen = PdfHelper.PdfPen(exportRectangle);
pen.DashStyle = PdfHelper.DashStyle(exportRectangle);
gfx.DrawRectangle(pen,new XRect(columnLocation.ToXPoints(),
exportRectangle.Size.ToXSize()));
}
public PdfPage PdfPage {get; private set;} public PdfPage PdfPage {get; private set;}
} }
} }

2
src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Wpf/Visitor/WpfVisitor.cs

@ -96,8 +96,8 @@ namespace ICSharpCode.Reporting.WpfReportViewer.Visitor
public override void Visit(ExportRectangle exportRectangle) public override void Visit(ExportRectangle exportRectangle)
{ {
var pen = FixedDocumentCreator.CreateWpfPen(exportRectangle); var pen = FixedDocumentCreator.CreateWpfPen(exportRectangle);
var visual = new DrawingVisual();
var visual = new DrawingVisual();
using (var dc = visual.RenderOpen()) using (var dc = visual.RenderOpen())
{dc.DrawRectangle(FixedDocumentCreator.ConvertBrush(exportRectangle.BackColor), {dc.DrawRectangle(FixedDocumentCreator.ConvertBrush(exportRectangle.BackColor),
pen, pen,

Loading…
Cancel
Save