/// <summary> /// Creates exact copy of this object. /// </summary> /// <returns>Copy of this object.</returns> public CapSettings Clone() { CapSettings result = new CapSettings(); result.Assign(this); return(result); }
/// <summary> /// Initializes a new instance of the <see cref="LineObject"/> class with default settings. /// </summary> public LineObject() { startCap = new CapSettings(); endCap = new CapSettings(); FlagSimpleBorder = true; FlagUseFill = false; }
/// <summary> /// Serializes the cap settings. /// </summary> /// <param name="prefix">Name of the cap property.</param> /// <param name="writer">Writer object.</param> /// <param name="diff">Another cap to compare with.</param> /// <remarks> /// This method is for internal use only. /// </remarks> public void Serialize(string prefix, FRWriter writer, CapSettings diff) { if (Width != diff.Width) { writer.WriteFloat(prefix + ".Width", Width); } if (Height != diff.Height) { writer.WriteFloat(prefix + ".Height", Height); } if (Style != diff.Style) { writer.WriteValue(prefix + ".Style", Style); } }
/// <inheritdoc/> public override bool Equals(object obj) { CapSettings c = obj as CapSettings; return(c != null && Width == c.Width && Height == c.Height && Style == c.Style); }
/// <summary> /// Assigns values from another source. /// </summary> /// <param name="source">Source to assign from.</param> public void Assign(CapSettings source) { Width = source.Width; Height = source.Height; Style = source.Style; }