FontToTypefaceAndFontSize ( Font oFont, out System.Windows.Media.Typeface oTypeface, out Double dFontSize ) { Debug.Assert(oFont != null); AssertValid(); oTypeface = WpfGraphicsUtil.FontToTypeface(oFont); dFontSize = WpfGraphicsUtil.SystemDrawingFontSizeToWpfFontSize( oFont.Size); }
WorkbookToGraph ( Single valueWorkbook ) { AssertValid(); // Pin the value to the font size limits. valueWorkbook = Math.Max(valueWorkbook, MinimumFontSizeWorkbook); valueWorkbook = Math.Min(valueWorkbook, MaximumFontSizeWorkbook); // Values in the workbook are in the same units as those used by the // standard FontDialog. They need to be converted to WPF units. return((Single)WpfGraphicsUtil.SystemDrawingFontSizeToWpfFontSize( valueWorkbook)); }
TransferToNodeXLWithAxesControl ( NodeXLWithAxesControl nodeXLWithAxesControl ) { Debug.Assert(nodeXLWithAxesControl != null); AssertValid(); Font oAxisFont = this.AxisFont; nodeXLWithAxesControl.SetFont( WpfGraphicsUtil.FontToTypeface(oAxisFont), WpfGraphicsUtil.SystemDrawingFontSizeToWpfFontSize( oAxisFont.Size)); TransferToNodeXLControl(nodeXLWithAxesControl.NodeXLControl); }