/// <summary> /// 计算字体大小 /// </summary> /// <param name="strPrt"></param> /// <param name="intLen"></param> /// <param name="align"></param> /// <param name="isBigSize"></param> public PrintString(string strPrt, int intLen, TextAlign align, bool isBigSize) { this._prtSrt = ""; this._isBigSize = false; this._prtSrt = Gfunc.PrintStrAlign(strPrt, intLen, align); this._isBigSize = isBigSize; if (this._isBigSize && (Gattr.PosPrinter != null)) { if (Gattr.PosPrinter.IsWindowPrinter) { this._prtSrt = Gfunc.PrintStrAlign(strPrt, (int)(((double)intLen) / 1.23), align); } else if (Gattr.PosPrinter._isHzPrinter) { this._prtSrt = Gfunc.PrintStrAlign(strPrt, (int)(((double)intLen) / 1.8), align); } } }
/// <summary> /// 自定义对齐方式 /// </summary> /// <param name="strPrt"></param> /// <param name="intLen"></param> /// <param name="align"></param> public PrintString(string strPrt, int intLen, TextAlign align) { this._prtSrt = ""; this._isBigSize = false; this._prtSrt = Gfunc.PrintStrAlign(strPrt, intLen, align); }