Skip to content

Commit 4dd19e5

Browse files
committed
ViewZoom test
1 parent 96301c1 commit 4dd19e5

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/ACadSharp.Tests/IO/WriterSingleObjectTests.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,23 @@ public void SingleLine()
129129
this.Document.Entities.Add(line);
130130
}
131131

132+
public void ViewZoom()
133+
{
134+
Line line = new Line(XYZ.Zero, new XYZ(100, 100, 0));
135+
Line line1 = new Line(new XYZ(0, 100, 0), new XYZ(100, 0, 0));
136+
137+
this.Document.Entities.Add(line);
138+
this.Document.Entities.Add(line1);
139+
140+
var box = line.GetBoundingBox();
141+
142+
VPort active = this.Document.VPorts[VPort.DefaultName];
143+
active.Center = (XY)box.Center;
144+
//active.BottomLeft = (XY)box.Min;
145+
//active.TopRight = (XY)box.Max;
146+
active.ViewHeight = 100;
147+
}
148+
132149
public void SingleMLine()
133150
{
134151
//It creates a valid dxf but the MLine is wrongly drawn
@@ -521,6 +538,7 @@ static WriterSingleObjectTests()
521538
Data.Add(new(nameof(SingleCaseGenerator.Empty)));
522539
Data.Add(new(nameof(SingleCaseGenerator.SingleEllipse)));
523540
Data.Add(new(nameof(SingleCaseGenerator.SingleLine)));
541+
Data.Add(new(nameof(SingleCaseGenerator.ViewZoom)));
524542
Data.Add(new(nameof(SingleCaseGenerator.SingleMLine)));
525543
Data.Add(new(nameof(SingleCaseGenerator.EntityColorByLayer)));
526544
Data.Add(new(nameof(SingleCaseGenerator.EntityColorTrueColor)));

0 commit comments

Comments
 (0)