public void CreateGraphicsFromPageSize() { reportCreator.BuildExportList(); var page = reportCreator.Pages[0]; Graphics g = CreateGraphics.FromSize(page.Size); Assert.That(g, Is.Not.Null); }
public void GraphicsIsSameSizeAsPage() { reportCreator.BuildExportList(); var page = reportCreator.Pages[0]; var graphics = CreateGraphics.FromSize(page.Size); Assert.That(graphics.VisibleClipBounds.Width, Is.EqualTo(page.Size.Width)); Assert.That(graphics.VisibleClipBounds.Height, Is.EqualTo(page.Size.Height)); }
public BasePageBuilder(IReportModel reportModel) { if (reportModel == null) { throw new ArgumentNullException("reportModel"); } ReportModel = reportModel; Pages = new Collection <ExportPage>(); Graphics = CreateGraphics.FromSize(reportModel.ReportSettings.PageSize); }
public GdiPlusRenderer( CreateGraphics createGraphics, MarkerHandling markerHandling, double accuracy ) { if( createGraphics == null ) { throw new ArgumentNullException( "createGraphics" ); } if( accuracy <= 0 ) { throw new ArgumentException( "Accuracy must be greater than zero.", "accuracy" ); } _createGraphics = createGraphics; _markerHandling = markerHandling; _accuracy = accuracy; }