{
var map = new PropertyMap();
+ map.Add("enable", new PropertyValue(underline.Enable));
+
if (underline.Color != null)
map.Add("color", new PropertyValue(underline.Color));
- map.Add("enable", new PropertyValue(underline.Enable));
- map.Add("height", new PropertyValue(underline.Height));
+ if (underline.Height != null)
+ map.Add("height", new PropertyValue((float)underline.Height));
return map;
}
if (shadow.Color != null)
map.Add("color", new PropertyValue(shadow.Color));
- map.Add("blurRadius", new PropertyValue(shadow.BlurRadius));
+ if (shadow.BlurRadius != null)
+ map.Add("blurRadius", new PropertyValue((float)shadow.BlurRadius));
return map;
}
if (outline.Color != null)
map.Add("color", new PropertyValue(outline.Color));
- map.Add("width", new PropertyValue(outline.Width));
+ if (outline.Width != null)
+ map.Add("width", new PropertyValue((float)outline.Width));
return map;
}
{
var map = new PropertyMap();
map.Add("enable", new PropertyValue(textFit.Enable));
- map.Add("minSize", new PropertyValue(textFit.MinSize));
- map.Add("maxSize", new PropertyValue(textFit.MaxSize));
- map.Add("stepSize", new PropertyValue(textFit.StepSize));
map.Add("fontSizeType", new PropertyValue(GetFontSizeString(textFit.FontSizeType)));
+ if (textFit.MinSize != null)
+ map.Add("minSize", new PropertyValue((float)textFit.MinSize));
+
+ if (textFit.MaxSize != null)
+ map.Add("maxSize", new PropertyValue((float)textFit.MaxSize));
+
+ if (textFit.StepSize != null)
+ map.Add("stepSize", new PropertyValue((float)textFit.StepSize));
+
return map;
}
public Color Color { get; set; }
/// <summary>
- /// The height in pixels of the underline (the default value is 1.0f, value can not be set to 0.0f, if set to 0.0f then the height is set to 1.0f).
+ /// The height in pixels of the underline (if null, the default value is 1.0f).
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public float Height { get; set; }
+ public float? Height { get; set; }
}
/// <summary>
public Color Color { get; set; }
/// <summary>
- /// The offset in pixels of the shadow (If not provided then the shadow is not enabled).
+ /// The offset in pixels of the shadow (if null, the default value is 0, 0). <br />
+ /// If not provided then the shadow is not enabled. <br />
+ ///
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public Vector2 Offset { get; set; }
/// <summary>
- /// The radius of the Gaussian blur for the soft shadow (If not provided then the soft shadow is not enabled).
+ /// The radius of the Gaussian blur for the soft shadow (if null, the default value is 0.0f). <br />
+ /// If not provided then the soft shadow is not enabled. <br />
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public float BlurRadius { get; set; }
+ public float? BlurRadius { get; set; }
}
/// <summary>
public Color Color { get; set; }
/// <summary>
- /// The width in pixels of the outline (If not provided then the outline is not enabled).
+ /// The width in pixels of the outline (if null, the default value is 0.0f). <br />
+ /// If not provided then the outline is not enabled. <br />
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public float Width { get; set; }
+ public float? Width { get; set; }
}
/// <summary>
public bool Enable { get; set; }
/// <summary>
- /// Minimum Size for text fit.
+ /// Minimum Size for text fit (if null, the default value is 10.0f).
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public float MinSize { get; set; }
+ public float? MinSize { get; set; }
/// <summary>
- /// Maximum Size for text fit.
+ /// Maximum Size for text fit (if null, the default value is 100.0f).
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public float MaxSize { get; set; }
+ public float? MaxSize { get; set; }
/// <summary>
- /// Step Size for font increase.
+ /// Step Size for font increase (if null, the default value is 1.0f).
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public float StepSize { get; set; }
+ public float? StepSize { get; set; }
/// <summary>
/// The size type of font, PointSize or PixelSize (the default value is PointSize).