protected DxfEntity(DxfEntity other) : this() { ((IDxfItemInternal)this).Handle = ((IDxfItemInternal)other).Handle; ((IDxfItemInternal)this).OwnerHandle = ((IDxfItemInternal)other).OwnerHandle; ((IDxfItemInternal)this).SetOwner(((IDxfItemInternal)other).Owner); this.IsInPaperSpace = other.IsInPaperSpace; this.Layer = other.Layer; this.LineTypeName = other.LineTypeName; this.Elevation = other.Elevation; this.MaterialHandle = other.MaterialHandle; this.Color = other.Color; this.LineweightEnumValue = other.LineweightEnumValue; this.LineTypeScale = other.LineTypeScale; this.IsVisible = other.IsVisible; this.ImageByteCount = other.ImageByteCount; this.PreviewImageData = other.PreviewImageData; this.Color24Bit = other.Color24Bit; this.ColorName = other.ColorName; this.Transparency = other.Transparency; this.PlotStylePointer.Handle = other.PlotStylePointer.Handle; this.PlotStylePointer.Item = other.PlotStylePointer.Item; this.ShadowMode = other.ShadowMode; }
protected virtual void CopyManualValues(DxfEntity other) { }
private static void EnsureFileContainsEntity(DxfEntity entity, string text) { var file = new DxfFile(); file.Entities.Add(entity); using (var stream = new MemoryStream()) { file.Save(stream); stream.Flush(); stream.Seek(0, SeekOrigin.Begin); using (var reader = new StreamReader(stream)) { var actual = reader.ReadToEnd(); Assert.Contains(text.Trim(), actual); } } }
protected DxfEntity(DxfEntity other) : this() { this.Handle = other.Handle; this.OwnerHandle = other.OwnerHandle; this.IsInPaperSpace = other.IsInPaperSpace; this.Layer = other.Layer; this.LinetypeName = other.LinetypeName; this.Elevation = other.Elevation; this.MaterialHandle = other.MaterialHandle; this.Color = other.Color; this.LineweightEnumValue = other.LineweightEnumValue; this.LinetypeScale = other.LinetypeScale; this.IsVisible = other.IsVisible; this.ImageByteCount = other.ImageByteCount; this.PreviewImageData = other.PreviewImageData; this.Color24Bit = other.Color24Bit; this.ColorName = other.ColorName; this.Transparency = other.Transparency; this.PlotStyleHandle = other.PlotStyleHandle; this.ShadowMode = other.ShadowMode; }
private void AssignCommonValues(DxfEntity entity) { entity.Color = _color; entity.Layer = _layerName; }