public PolyLineMShapeContent(PolyLineM shape) { Shape = shape ?? throw new ArgumentNullException(nameof(shape)); ShapeType = ShapeType.PolyLineM; ContentLength = ContentHeaderLength .Plus(ByteLength.Int32.Times(shape.NumberOfParts)) // Parts .Plus(ByteLength.Double.Times(shape.NumberOfPoints * 2)) // Points(X,Y) .Plus(MeasureRangeByteLength) .Plus(ByteLength.Double.Times(shape.NumberOfPoints)) // Points(M) .ToWordLength(); }
public PolygonShapeContent(Polygon shape) { Shape = shape ?? throw new ArgumentNullException(nameof(shape)); ShapeType = ShapeType.Polygon; ContentLength = ContentHeaderLength .Plus(ByteLength.Int32.Times(shape.NumberOfParts)) .Plus(ByteLength.Double.Times(shape.NumberOfPoints).Times(2)) .ToWordLength(); }