static string RelativeValueDesription(FieldViewModel ivm) { double rel = ivm.GetRelative(); if (double.IsNaN(rel)) { return(null); } else { return(string.Format("relative={0}", rel)); } }
static string RelativeInt16Description(FieldViewModel ivm) { //double em = (double)(UInt16)(uint16)((head)ivm.Parent.Value).unitsPerEm; //return string.Format("For all glyph bounding boxes (relative={0})", (double)(Int16)(int16)ivm.Value / em); double rel = ivm.GetRelative(); if (double.IsNaN(rel)) { return(string.Format("For all glyph bounding boxes")); } else { //return string.Format("relative={0}", rel); return(string.Format("For all glyph bounding boxes (relative={0})", rel)); } }