CPCLCanvas class

Inheritance

Constructors

CPCLCanvas()

Properties

buffer List<int>
getter/setter pairinherited
commandType CommandType
no setteroverride
config PrinterConfig?
getter/setter pairinherited
defaultConfig PrinterConfig?
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
pageSize PrinterSize?
getter/setter pairoverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addCommand(String str, {bool addEnd = true}) → dynamic
addFont(PrinterFontType fontType) → dynamic
inherited
calcTextLeft(String text, int width, AlignEnum fontAlign, PrinterTextStyle style) int
计算文字左侧位置
inherited
createChild(PrinterConfig config) PrinterCanvas
创建子Canvas
inherited
drawBarCode(String context, PrinterOffset offset, int height, [int lineWidth = 1]) → dynamic
打印二维码
override
drawBarCodeForSize(String? context, PrinterOffset offset, PrinterSize size, [int lineWidth = 1, AlignEnum align = AlignEnum.center]) → dynamic
打印二维码
inherited
drawBitmap(PrinterOffset offset, PrinterSize size, List<List<bool>> bytes) → dynamic
打印图片
override
drawLine(PrinterOffset offset, PrinterSize size) → dynamic
打印线条
override
drawQRCode(String context, PrinterOffset offset, PrinterSize size, ECCLevelEnum ecc) → dynamic
打印二维码
override
drawQRCodeBitmap(String context, PrinterOffset offset, PrinterSize size, ECCLevelEnum ecc) → dynamic
inherited
drawText(String? text, PrinterOffset offset, PrinterSize size, PrinterTextStyle textStyle) → dynamic
打印文字
override
end() → dynamic
结束
override
estimateLength(String text, int contentWidth, PrinterTextStyle style) int
获取text限制在contentWidth后的长度
inherited
getBarCodeWidth(String context, int lineWidth) int
计算条码宽度
inherited
getFontAsciiWidth(PrinterTextStyle style) int
获取字体宽度 Ascii
inherited
getFontHeight(PrinterTextStyle style) int
获取字体高度
inherited
getFontName(PrinterTextStyle style) String
获取字体名称
inherited
getFontWidth(PrinterTextStyle style) int
获取字体宽度
inherited
getTextLineHeight(PrinterTextStyle style) int
inherited
getTextWidth(String text, PrinterTextStyle style) int
获取文字宽度
inherited
insertCommand(int index, String str) → dynamic
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() → dynamic
重置
override
setFontBlod(bool fontBlod) → dynamic
setFontSize(int fontSize) → dynamic
setUnderline(bool underline) → dynamic
splitLine(String str, int contentWidth, PrinterTextStyle style) List<String>
文字自动换行裁剪
inherited
toCommand() List<int>
override
toHexString() String
toString() String
A string representation of this object.
inherited
uint16To8(List<int> bytes) → dynamic

Operators

operator ==(Object other) bool
The equality operator.
inherited