private static real FullGetFont0Width(TFlxFont Fx) { if (String.Equals(Fx.Name, "ARIAL", StringComparison.InvariantCultureIgnoreCase) && Fx.Size20 == 200 && Fx.Style == TFlxFontStyles.None) { return(7); //Most usual case. } if (MissingFrameworkFont) { return(7); } if (String.Equals(Fx.Name, CachedFontName, StringComparison.InvariantCultureIgnoreCase) && Fx.Size20 == CachedFontSize && Fx.Style == CachedFontStyle) { return(CachedFontWidth); //Most usual case. } try { real Result = DoFullGetFont0Width(Fx); CachedFontWidth = Result; CachedFontName = Fx.Name; CachedFontSize = Fx.Size20; CachedFontStyle = Fx.Style; return(Result); } catch (MissingMethodException) { MissingFrameworkFont = true; return(7); } }
public int SetCellFontStyle(int Row, int Col, TFlxFontStyles fs) { int cellFormat = this.GetCellFormat(Row, Col); TFlxFormat format = this.GetFormat(cellFormat); format.Font.Style = fs; cellFormat = this.AddFormat(format); this.SetCellFormat(Row, Col, cellFormat); return(cellFormat); }
private static real FullGetFont0Width(TFlxFont Fx) { if (String.Equals(Fx.Name, "ARIAL", StringComparison.InvariantCultureIgnoreCase) && Fx.Size20 == 200 && Fx.Style == TFlxFontStyles.None) { return(7); //Most usual case. } if (String.Equals(Fx.Name, CachedFontName, StringComparison.InvariantCultureIgnoreCase) && Fx.Size20 == CachedFontSize && Fx.Style == CachedFontStyle) { return(CachedFontWidth); //Most usual case. } real Result = DoFullGetFont0Width(Fx); CachedFontWidth = Result; CachedFontName = Fx.Name; CachedFontSize = Fx.Size20; CachedFontStyle = Fx.Style; return(Result); }
internal TSubscriptData(TFlxFontStyles aStyle) { if ((aStyle & TFlxFontStyles.Subscript) != 0) { Factor = 2f / 3f; FOffset = 8F; } else if ((aStyle & TFlxFontStyles.Superscript) != 0) { Factor = 2f / 3f; FOffset = -1.5F; } else { Factor = 1; FOffset = 0; } }
public void SetCellValueStyled(int row, int col, object value, TFlxFontStyles fs) { SetCellValue(row, col, value); SetCellFontStyle(row, col, fs); }
public void SetFormulaStyled(int row, int col, ExcelFormula formula, TFlxFontStyles fs, int floatDecimals = 3) { SetFormula(row, col, formula, floatDecimals); SetCellFontStyle(row, col, fs); }
public void SetCellFloatValue(int Row, int Col, object value, int floatDecimals, TFlxFontStyles fs) { SetCellFloatValue(Row, Col, value, floatDecimals); SetCellFontStyle(Row, Col, fs); }
public RenderSummaryBehavior(AbstractBlock <InternalData> block, TFlxFontStyles style) { this.block = block; this.style = style; }