UniPRT SDK v2.0.0.0
 
载入中...
搜索中...
未找到
Utilities类 参考

提供 TSPL 操作輔助功能的工具類。 更多...

#include <Utilities.h>

类 Utilities 继承关系图:

类方法

(NSData *) + TsplWindowsFontWithImageName:fontSize:rotation:fontStyle:fontFamilyName:content:
 將文字渲染為 1bpp BMP 資料並封裝成 TSPL DOWNLOAD 指令。
 

详细描述

提供 TSPL 操作輔助功能的工具類。

該類包含靜態方法,用於支援 TSPL 列印指令中的字體與圖片處理。

成员函数文档

◆ TsplWindowsFontWithImageName:fontSize:rotation:fontStyle:fontFamilyName:content:

+ (NSData *) TsplWindowsFontWithImageName: (NSString *) imageName
fontSize: (NSInteger) fontSize
rotation: (NSInteger) rotation
fontStyle: (NSInteger) fontStyle
fontFamilyName: (NSString *) fontFamilyName
content: (NSString *) content 

將文字渲染為 1bpp BMP 資料並封裝成 TSPL DOWNLOAD 指令。

此方法會根據指定的 Windows 字體屬性(家族、大小、樣式、旋轉)將文字轉換為單色點陣圖資料, 並包裝成可傳送至印表機的 TSPL DOWNLOAD 指令。

参数
imageName不含副檔名的圖片名稱。
fontSize字體大小(點)。
rotation字體旋轉角度(度:0、90、180、270)。
fontStyle字體樣式:
  • 0: 一般
  • 1: 粗體
  • 2: 斜體
  • 3: 粗斜體
fontFamilyName字體家族名稱(例如 Helvetica)。
content要渲染的文字。
返回
包含 TSPL DOWNLOAD 指令與嵌入 BMP 資料的 NSData 物件。

该类的文档由以下文件生成: