public void Write(bool validate) { Class809.smethod_0(Enum15.const_3); DxfMessage[] messages; if (validate && !this.dxfModel_0.Validate(out messages)) { throw new DxfException("Cannot write invalid model", messages); } if (this.dxfModel_0.Header.AcadVersion < DxfVersion.Dxf13 || this.dxfModel_0.Header.AcadVersion > DxfVersion.Dxf27) { throw new NotSupportedException("Currently DwgWriter only supports writing versions 13, 14, 15, 18, 21, 24 and 27."); } this.dxfModel_0.method_28(new Class1070(this.dxfModel_0, FileFormat.Dwg, this.dxfVersion_0)); DxfScale currentAnnotationScale = this.dxfModel_0.Header.CurrentAnnotationScale; this.dxfModel_0.Header.CurrentAnnotationScale = (DxfScale)null; switch (this.dxfVersion_0) { case DxfVersion.Dxf13: Class745.Write(this.stream_0, this.dxfModel_0); break; case DxfVersion.Dxf14: Class722.Write(this.stream_0, this.dxfModel_0); break; case DxfVersion.Dxf15: Class653.Write(this.stream_0, this.dxfModel_0); break; case DxfVersion.Dxf18: new Class499(this.stream_0, this.dxfModel_0).Write(); break; case DxfVersion.Dxf21: Class921.Write(this.stream_0, this.dxfModel_0); break; case DxfVersion.Dxf24: new Class499(this.stream_0, this.dxfModel_0).Write(); break; case DxfVersion.Dxf27: new Class500(this.stream_0, this.dxfModel_0).Write(); break; } this.dxfModel_0.Header.CurrentAnnotationScale = currentAnnotationScale; if (!this.bool_0) { return; } this.stream_0.Close(); }
public ModelToPaperSpace( DxfModel model, DxfLayout layout, GraphicsConfig config, DxfViewport viewport, Matrix4D postTransform) : base(model, layout, config, viewport.method_17(model, config, postTransform)) { this.dxfViewport_0 = viewport; if (viewport.AnnotationScale == null || !model.Header.PaperSpaceAnnotationScalingEnabled) { return; } this.double_0 = viewport.AnnotationScale.ScaleFactor; this.dxfScale_0 = model.Header.CurrentAnnotationScale; model.Header.CurrentAnnotationScale = viewport.AnnotationScale; }
internal override void vmethod_10(DxfModel model) { base.vmethod_10(model); DxfAnnotationScaleObjectContextData.smethod_8((DxfEntity)this); this.bool_2 = Class1064.smethod_0((DxfHandledObject)this.Block, model); if (!this.bool_2 || DxfAnnotationScaleObjectContextData.smethod_5((DxfHandledObject)this, true) != null) { return; } DxfScale currentAnnotationScale = model.Header.CurrentAnnotationScale; DxfInsert dxfInsert = this; dxfInsert.scaleFactor = dxfInsert.scaleFactor / currentAnnotationScale.ScaleFactor; DxfDictionary dxfDictionary = DxfAnnotationScaleObjectContextData.smethod_6((DxfHandledObject)this); DxfAnnotationScaleObjectContextData contextData = this.CreateContextData(currentAnnotationScale); contextData.IsDefault = true; dxfDictionary.Entries.Add((IDictionaryEntry) new DxfDictionaryEntry("*A", (DxfObject)contextData)); }
public DxfAnnotationScaleObjectContextData CreateContextData( DxfScale scale) { return((DxfAnnotationScaleObjectContextData) new DxfLeaderObjectContextData(this, scale)); }
public void Visit(DxfScale scale) { }
public new DxfAnnotationScaleObjectContextData CreateContextData( DxfScale scale) { return((DxfAnnotationScaleObjectContextData) new DxfAttributeObjectContextData(this, scale)); }
public void Visit(DxfScale scale) { this.bool_0 = true; }
public DxfAnnotationScaleObjectContextData CreateContextData( DxfScale scale) { return((DxfAnnotationScaleObjectContextData) new DxfBlockReferenceObjectContextData((DxfInsertBase)this, scale)); }