internal static BoundaryPathBase CreateFromType(BoundaryPathType type) { if ((type & BoundaryPathType.Polyline) == BoundaryPathType.Polyline) { // special polyline case return(new PolylineBoundaryPath()); } return(new NonPolylineBoundaryPath(type)); }
internal override void Read(DxfReader r, Class259 objectBuilder) { base.Read(r, objectBuilder); if (r.CurrentGroup.Code != 100 || (string)r.CurrentGroup.Value != "AcDbHatchObjectContextData") { throw new DxfException("Expected subclass marker."); } r.method_85(); bool flag1 = true; BoundaryPathType type = BoundaryPathType.None; bool flag2 = true; while (!r.method_92("AcDbHatchScaleContextData")) { switch (r.CurrentGroup.Code) { case 10: this.vector3D_0.X = (double)r.CurrentGroup.Value; break; case 20: this.vector3D_0.Y = (double)r.CurrentGroup.Value; break; case 30: this.vector3D_0.Z = (double)r.CurrentGroup.Value; break; case 40: this.double_0 = (double)r.CurrentGroup.Value; break; case 78: short num = (short)r.CurrentGroup.Value; if (num > (short)0) { r.method_85(); this.dxfPattern_0 = new DxfPattern(); this.dxfPattern_0.Read(r, (int)num); flag2 = false; break; } break; case 90: if (flag1) { flag1 = false; break; } type = (BoundaryPathType)r.CurrentGroup.Value; break; case 290: if (!(bool)r.CurrentGroup.Value) { DxfHatch.BoundaryPath boundaryPath = new DxfHatch.BoundaryPath(type); if ((boundaryPath.Type & BoundaryPathType.IsAnnotative) != BoundaryPathType.None && boundaryPath.IsPolyline) { boundaryPath.PolylineData = new DxfHatch.BoundaryPath.Polyline(); r.method_85(); boundaryPath.PolylineData.Read(r); } else if (!boundaryPath.IsPolyline) { r.method_85(); int nrOfEdges = (int)r.CurrentGroup.Value; r.method_85(); boundaryPath.method_0(nrOfEdges, r); } this.list_0.Add(boundaryPath); flag2 = false; break; } break; } if (flag2) { r.method_85(); } else { flag2 = true; } } }
public NonPolylineBoundaryPath(BoundaryPathType pathType) { PathType = pathType; }