/// <summary>
 /// Writes the attribute.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="value">The value.</param>
 /// <param name="defaultValue">The default value.</param>
 protected void WriteAttribute(string name, Rect value, Rect defaultValue)
 {
     if (this.settings.WriteDefaultValues || !value.Equals(defaultValue)) {
         this.writer.WriteAttributeString(name, value.Format());
     }
 }