public override object Clone() { var lg = new LinearGradientBrush(); lg.GammaCorrection = GammaCorrection; lg._rect = _rect; lg._wrapMode = _wrapMode; lg._transform = _transform != null?_transform.Clone() : null; if (_linearColors != null) { lg._linearColors = new[] { _linearColors[0], _linearColors[1] }; } if (_colorBlend != null) { lg._colorBlend = _colorBlend.Clone(); } if (Blend != null) { lg.Blend = Blend.Clone(); } return(lg); }