UICanvas class abstract
- Inheritance
-
- Object
- PrinterCanvas
- UICanvas
- Implementers
Constructors
- UICanvas()
Properties
- canvas → Canvas?
-
no setter
- config ↔ PrinterConfig?
-
getter/setter pairinherited
- defaultConfig → PrinterConfig?
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- pageSize ↔ PrinterSize?
-
getter/setter pairinherited
- 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 -
打印二维码
override
-
drawBarCodeForSize(
String? context, PrinterOffset offset, PrinterSize size, [int lineWidth = 1, AlignEnum align = AlignEnum.center]) → dynamic -
打印二维码
inherited
-
drawBitmap(
PrinterOffset offset, PrinterSize size, List< List< bytes) → dynamicbool> > -
打印图片
override
-
drawLine(
PrinterOffset offset, PrinterSize size, [Color color = const Color(0xFF000000)]) → 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 -
结束
inherited
-
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 -
重置
inherited
-
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