public void SimplePlotTest() { var vm = (PdfPlotterViewModel)PlotterFactory.CreatePlotterViewModel(); Workspace.Update(drawing: Workspace.Drawing.AddToCurrentLayer(new Line(new Point(0.0, 0.0, 0.0), new Point(8.5, 11.0, 0.0)))); vm.DisplayWidth = 8.5; vm.DisplayHeight = 11.0; vm.DisplayUnit = PdfMeasurementType.Inch; vm.ScalingType = PlotScalingType.Absolute; vm.ViewPortType = PlotViewPortType.Extents; var actual = PlotToString(vm); // line should be scaled to (8.5 * 72, 11 * 72) Assert.Contains(NormalizeToCrLf(@" 0.00 0.00 m 612.00 792.00 l "), actual); }
public void SimplePlotTest() { var vm = (PdfPlotterViewModel)PlotterFactory.CreatePlotterViewModel(); Assert.Equal(1, vm.Pages.Count); Workspace.Update(drawing: Workspace.Drawing.AddToCurrentLayer(new Line(new Point(0.0, 0.0, 0.0), new Point(8.5, 11.0, 0.0)))); vm.SelectedPage.PageSize = PdfPageSize.Portrait; vm.SelectedPage.ScalingType = PlotScalingType.Absolute; vm.SelectedPage.ViewPortType = PlotViewPortType.Extents; var actual = PlotToString(vm); // line should be scaled to (8.5 * 72, 11 * 72) Assert.Contains(NormalizeToCrLf(@" 0.00 0.00 m 612.00 792.00 l "), actual); }