|
...
|
...
|
@@ -2507,6 +2507,7 @@ class Utils { |
|
|
|
textAlign: TextAlign.center,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
height: 1,
|
|
|
|
maxLines: 1,
|
|
|
|
ellipsis: '3',
|
|
|
|
fontSize: 24));
|
|
...
|
...
|
@@ -2517,7 +2518,7 @@ class Utils { |
|
|
|
// 设置文本的宽度约束
|
|
|
|
ParagraphConstraints pc2 = ui.ParagraphConstraints(width: 500);
|
|
|
|
ui.Paragraph paragraph2 = pb2.build()..layout(pc2);
|
|
|
|
canvas.drawParagraph(paragraph2, Offset(0, 12));
|
|
|
|
canvas.drawParagraph(paragraph2, Offset(0, 14));
|
|
|
|
|
|
|
|
canvas.drawRect(Rect.fromLTWH(0, 348, 500, 52), paint);
|
|
|
|
|
|
...
|
...
|
@@ -2526,6 +2527,7 @@ class Utils { |
|
|
|
textAlign: TextAlign.center,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
height: 1,
|
|
|
|
fontSize: 24));
|
|
|
|
pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 24));
|
|
|
|
pb.addText(time);
|
|
...
|
...
|
@@ -2533,7 +2535,7 @@ class Utils { |
|
|
|
// 设置文本的宽度约束
|
|
|
|
ParagraphConstraints pc = ui.ParagraphConstraints(width: 500);
|
|
|
|
ui.Paragraph paragraph = pb.build()..layout(pc);
|
|
|
|
canvas.drawParagraph(paragraph, Offset(0, 360));
|
|
|
|
canvas.drawParagraph(paragraph, Offset(0, 362));
|
|
|
|
|
|
|
|
// 绘制文字
|
|
|
|
// ui.ParagraphBuilder pb3 = ui.ParagraphBuilder(ui.ParagraphStyle(
|
|
...
|
...
|
@@ -2607,6 +2609,7 @@ class Utils { |
|
|
|
textAlign: TextAlign.center,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
maxLines: 2,
|
|
|
|
height: 1,
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontSize: 24));
|
|
|
|
pb2.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 24));
|
|
...
|
...
|
@@ -2622,6 +2625,7 @@ class Utils { |
|
|
|
ui.ParagraphBuilder pb3 = ui.ParagraphBuilder(ui.ParagraphStyle(
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
height: 1,
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontSize: 48));
|
|
|
|
pb3.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 48));
|
|
...
|
...
|
@@ -2637,6 +2641,7 @@ class Utils { |
|
|
|
textAlign: TextAlign.center,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
height: 1,
|
|
|
|
fontSize: 24));
|
|
|
|
pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 24));
|
|
|
|
pb.addText(time);
|
|
...
|
...
|
@@ -2644,7 +2649,7 @@ class Utils { |
|
|
|
// 设置文本的宽度约束
|
|
|
|
ParagraphConstraints pc = ui.ParagraphConstraints(width: 500);
|
|
|
|
ui.Paragraph paragraph = pb.build()..layout(pc);
|
|
|
|
canvas.drawParagraph(paragraph, Offset(0, 270));
|
|
|
|
canvas.drawParagraph(paragraph, Offset(0, 265));
|
|
|
|
|
|
|
|
//下面的代码是生成图片的关键代码,以上绘制文字和圆圈的代码可以忽略不计
|
|
|
|
var picture =
|
|
...
|
...
|
@@ -2681,7 +2686,7 @@ class Utils { |
|
|
|
? _getDsoltStrShow(dsolt, isCan: false)
|
|
|
|
: '';
|
|
|
|
|
|
|
|
if (hour != '') {
|
|
|
|
if (hour != '' && section != '') {
|
|
|
|
section = section + ' ';
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -2724,6 +2729,7 @@ class Utils { |
|
|
|
textAlign: TextAlign.center,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
height: 1,
|
|
|
|
fontSize: 48));
|
|
|
|
pb3.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 48));
|
|
|
|
pb3.addText(month);
|
|
...
|
...
|
@@ -2746,11 +2752,11 @@ class Utils { |
|
|
|
// 设置文本的宽度约束
|
|
|
|
ParagraphConstraints pc4 = ui.ParagraphConstraints(width: 30);
|
|
|
|
ui.Paragraph paragraph4 = pb4.build()..layout(pc4);
|
|
|
|
canvas.drawParagraph(paragraph4, Offset(430, 264));
|
|
|
|
canvas.drawParagraph(paragraph4, Offset(430, 250));
|
|
|
|
|
|
|
|
Rect rect = subType1 == '1'
|
|
|
|
? Rect.fromLTWH(315, 317, 140, 38)
|
|
|
|
: Rect.fromLTWH(387, 317, 67, 36);
|
|
|
|
? Rect.fromLTWH(315, 310, 140, 38)
|
|
|
|
: Rect.fromLTWH(386, 310, 67, 37);
|
|
|
|
paint.color = MyColours.color_66FFEFC5;
|
|
|
|
RRect rRect = RRect.fromRectAndRadius(rect, Radius.circular(6));
|
|
|
|
canvas.drawRRect(rRect, paint);
|
|
...
|
...
|
@@ -2760,14 +2766,15 @@ class Utils { |
|
|
|
ui.ParagraphBuilder pb = ui.ParagraphBuilder(ui.ParagraphStyle(
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
height: 1,
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontSize: 24));
|
|
|
|
pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 24));
|
|
|
|
pb.addText(time);
|
|
|
|
|
|
|
|
// 设置文本的宽度约束
|
|
|
|
double width = subType1 == '1' ? 200 : 100;
|
|
|
|
Offset offset = subType1 == '1' ? Offset(285, 320) : Offset(370, 320);
|
|
|
|
double width = subType1 == '1' ? 200 : 114;
|
|
|
|
Offset offset = subType1 == '1' ? Offset(285, 320) : Offset(360, 318);
|
|
|
|
ParagraphConstraints pc = ui.ParagraphConstraints(width: width);
|
|
|
|
ui.Paragraph paragraph = pb.build()..layout(pc);
|
|
|
|
canvas.drawParagraph(paragraph, offset);
|
|
...
|
...
|
@@ -2849,6 +2856,7 @@ class Utils { |
|
|
|
// 绘制文字
|
|
|
|
ui.ParagraphBuilder pb3 = ui.ParagraphBuilder(ui.ParagraphStyle(
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
height: 1,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontSize: 20));
|
|
...
|
...
|
@@ -2863,7 +2871,7 @@ class Utils { |
|
|
|
// 绘制文字
|
|
|
|
ui.ParagraphBuilder pb4 = ui.ParagraphBuilder(ui.ParagraphStyle(
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
// height: 1,
|
|
|
|
height: 1,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontSize: 20));
|
|
...
|
...
|
@@ -2875,16 +2883,18 @@ class Utils { |
|
|
|
ui.Paragraph paragraph4 = pb4.build()..layout(pc4);
|
|
|
|
canvas.drawParagraph(paragraph4, Offset(420, 320));
|
|
|
|
|
|
|
|
Rect rect = Rect.fromLTWH(350, 351, 118, 30);
|
|
|
|
Rect rect = Rect.fromLTWH(350, 348, 118, 30);
|
|
|
|
paint.color = MyColours.color_66FFEFC5;
|
|
|
|
RRect rRect = RRect.fromRectAndRadius(rect, Radius.circular(6));
|
|
|
|
canvas.drawRRect(rRect, paint);
|
|
|
|
|
|
|
|
paint.color = MyColours.color_99000000;
|
|
|
|
|
|
|
|
// 绘制文字
|
|
|
|
ui.ParagraphBuilder pb = ui.ParagraphBuilder(ui.ParagraphStyle(
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
height: 1,
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontSize: 20));
|
|
|
|
pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 20));
|
|
...
|
...
|
@@ -3198,6 +3208,9 @@ class Utils { |
|
|
|
if (liteStyle != '0') {
|
|
|
|
//画图
|
|
|
|
// 4种情况的图分别画出来
|
|
|
|
if (liteStyle == '1' || liteStyle == '2' || liteStyle == '3') {
|
|
|
|
liteStyle = '2-3';
|
|
|
|
}
|
|
|
|
List<String> subType = liteStyle!.split('-');
|
|
|
|
String subType0 = subType[0]; //几号模版
|
|
|
|
if (subType0 == '1') {
|
...
|
...
|
|