PreviewCanvas class

Inheritance

Constructors

PreviewCanvas()

Properties

canvas Canvas?
getter/setter pairoverride-getter
config PrinterConfig?
getter/setter pairinherited
defaultConfig PrinterConfig?
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
pageSize PrinterSize?
getter/setter pairoverride
picture Picture?
getter/setter pair
recorder PictureRecorder?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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
打印二维码
inherited
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
打印图片
inherited
drawLine(PrinterOffset offset, PrinterSize size, [Color color = const Color(0xFF000000)]) → dynamic
打印线条
inherited
drawQRCode(String context, PrinterOffset offset, PrinterSize size, ECCLevelEnum ecc) → dynamic
打印二维码
inherited
drawQRCodeBitmap(String context, PrinterOffset offset, PrinterSize size, ECCLevelEnum ecc) → dynamic
inherited
drawText(String? text, PrinterOffset offset, PrinterSize size, PrinterTextStyle textStyle) → dynamic
打印文字
inherited
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
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() → dynamic
重置
override
splitLine(String str, int contentWidth, PrinterTextStyle style) List<String>
文字自动换行裁剪
inherited
toString() String
A string representation of this object.
inherited

Operators

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