|
...
|
...
|
@@ -3253,8 +3253,11 @@ class Utils { |
|
|
|
textPainter.layout(); // 布局文本
|
|
|
|
final width = textPainter.size.width; // 获取宽度
|
|
|
|
|
|
|
|
Rect rect = Rect.fromLTWH((images.width.toDouble() - width - 5*scaleX*2) / 2,
|
|
|
|
56 * scaleY, width + 5*scaleX*2, 30 * scaleY);
|
|
|
|
Rect rect = Rect.fromLTWH(
|
|
|
|
(images.width.toDouble() - width - 5 * scaleX * 2) / 2,
|
|
|
|
56 * scaleY,
|
|
|
|
width + 5 * scaleX * 2,
|
|
|
|
30 * scaleY);
|
|
|
|
paint.color = MyColours.color_66FFEFC5;
|
|
|
|
RRect rRect = RRect.fromRectAndRadius(rect, Radius.circular(6));
|
|
|
|
canvas.drawRRect(rRect, paint);
|
|
...
|
...
|
@@ -3273,11 +3276,13 @@ class Utils { |
|
|
|
pb.addText(room);
|
|
|
|
|
|
|
|
// 设置文本的宽度约束
|
|
|
|
ParagraphConstraints pc =
|
|
|
|
ui.ParagraphConstraints(width: width);
|
|
|
|
ParagraphConstraints pc = ui.ParagraphConstraints(width: width);
|
|
|
|
ui.Paragraph paragraph = pb.build()..layout(pc);
|
|
|
|
canvas.drawParagraph(paragraph,
|
|
|
|
Offset((images.width.toDouble() - width - 5*scaleX*2) / 2+5*scaleX , 64 * scaleY));
|
|
|
|
canvas.drawParagraph(
|
|
|
|
paragraph,
|
|
|
|
Offset(
|
|
|
|
(images.width.toDouble() - width - 5 * scaleX * 2) / 2 + 5 * scaleX,
|
|
|
|
64 * scaleY));
|
|
|
|
|
|
|
|
// 绘制文字
|
|
|
|
ui.ParagraphBuilder pb3 = ui.ParagraphBuilder(ui.ParagraphStyle(
|
|
...
|
...
|
@@ -3644,7 +3649,7 @@ class Utils { |
|
|
|
mname = '晚上';
|
|
|
|
}
|
|
|
|
dsoltStr = mname;
|
|
|
|
} else if (liteStyle == '3') {
|
|
|
|
} else if (liteStyle == '3' || liteStyle == '4') {
|
|
|
|
dsoltStr = mname;
|
|
|
|
}
|
|
|
|
return dsoltStr;
|
|
...
|
...
|
@@ -3696,9 +3701,10 @@ class Utils { |
|
|
|
weekAndDsolt);
|
|
|
|
} else if (liteStyle == '4') {
|
|
|
|
String month =
|
|
|
|
'${Utils.addZeroNumber(DateTime.now().month)}月${Utils.addZeroNumber(DateTime.now().day)}日';
|
|
|
|
String week = returnWeek(DateTime.now(), context);
|
|
|
|
String section = '午餐';
|
|
|
|
'${Utils.addZeroNumber(dateTime.month)}月${Utils.addZeroNumber(dateTime.day)}日';
|
|
|
|
String week = returnWeek(dateTime, context);
|
|
|
|
String section =
|
|
|
|
_getDsoltStrShowOld(ddateHm, liteStyle, ddateSolt, mname);
|
|
|
|
String time = week + section;
|
|
|
|
|
|
|
|
_thumbnailUint8List = await canva4(
|
...
|
...
|
|