/// <summary> /// Initialises a new GeometryAttributes object with the Brush initialised as /// a ColourBrush of the specified colour /// </summary> /// <param name="colour"></param> public GeometryAttributes(Colour colour, double thickness = 1.0) { Brush = new ColourBrush(colour); Weight = thickness; }
/// <summary> /// Convert a Nucleus ColourBrush to a WPF SolidColorBrush /// </summary> /// <param name="brush">The brush to convert</param> /// <param name="alphaLimit">Optional. The maximum value to which to limit the alpha channel of the colour. /// Use this to specify that the colour should be displayed as semitransparent even if the original to be converted /// was not. /// <returns></returns> public static Media.SolidColorBrush Convert(ColourBrush brush, byte alphaLimit = 255) { return(new Media.SolidColorBrush(Convert(brush.Colour, alphaLimit))); }