@@ -129,6 +129,23 @@ public void SingleLine()
129
129
this . Document . Entities . Add ( line ) ;
130
130
}
131
131
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
+
132
149
public void SingleMLine ( )
133
150
{
134
151
//It creates a valid dxf but the MLine is wrongly drawn
@@ -521,6 +538,7 @@ static WriterSingleObjectTests()
521
538
Data . Add ( new ( nameof ( SingleCaseGenerator . Empty ) ) ) ;
522
539
Data . Add ( new ( nameof ( SingleCaseGenerator . SingleEllipse ) ) ) ;
523
540
Data . Add ( new ( nameof ( SingleCaseGenerator . SingleLine ) ) ) ;
541
+ Data . Add ( new ( nameof ( SingleCaseGenerator . ViewZoom ) ) ) ;
524
542
Data . Add ( new ( nameof ( SingleCaseGenerator . SingleMLine ) ) ) ;
525
543
Data . Add ( new ( nameof ( SingleCaseGenerator . EntityColorByLayer ) ) ) ;
526
544
Data . Add ( new ( nameof ( SingleCaseGenerator . EntityColorTrueColor ) ) ) ;
0 commit comments