// TODO: do we really neeed this... // TODO: public FontDim() {} /// <summary> /// Constructor. /// </summary> /// <param name="name"> /// String holding the name suffix of the window to be accessed to obtain /// the font and / or text strings to be used when these items are not /// explicitly given. /// </param> /// <param name="font"> /// String holding the name of the font to use for this dimension. If the /// string is empty, the font assigned to the window passed to getValue will /// be used. /// </param> /// <param name="text"> /// String holding the text to be measured for horizontal extent. If this /// is empty, the text from the window passed to getValue will be used. /// </param> /// <param name="metric"> /// One of the FontMetricType values indicating what we should represent. /// </param> /// <param name="padding"> /// constant pixel padding value to be added. /// </param> public FontDim(string name, string font, string text, FontMetricType metric, float padding = 0) { _font = font; _text = text; _childName = name; _metric = metric; _padding = padding; }
/// <summary> /// Set the current metric of the FontDim. /// </summary> /// <param name="metric"></param> public void SetMetric(FontMetricType metric) { _metric = metric; }