示例#1
0
 /// <summary>
 /// Formats the specified scalar value as the appropriate format.
 /// </summary>
 public static string FormatScalar(this Drawing drawing, double value) => DrawingSettings.FormatUnits(value, UnitFormat.Metric, drawing.Settings.UnitPrecision);
示例#2
0
 /// <summary>
 /// Format the specified value as per the current drawing settings.
 /// </summary>
 /// <param name="workspace">The workspace containing the drawing.</param>
 /// <param name="value">The value to format.</param>
 /// <returns>The formatted value.</returns>
 public static string Format(this IWorkspace workspace, double value)
 {
     return(DrawingSettings.FormatUnits(value, workspace.Drawing.Settings.UnitFormat, workspace.Drawing.Settings.UnitPrecision));
 }
示例#3
0
 /// <summary>
 /// Formats the specified unit as the appropriate format.
 /// </summary>
 public static string FormatUnits(this Drawing drawing, double value) => DrawingSettings.FormatUnits(value, drawing.Settings.UnitFormat, drawing.Settings.UnitPrecision);