diff --git a/lib/painter_system/fun/dundun_view.dart b/lib/painter_system/fun/dundun_view.dart index ead4687..3763b80 100644 --- a/lib/painter_system/fun/dundun_view.dart +++ b/lib/painter_system/fun/dundun_view.dart @@ -24,7 +24,7 @@ class _DunDunViewState extends State { } void loadImage() async { - ByteData data2 = await rootBundle.load('assets/images/logo1.png'); + ByteData data2 = await rootBundle.load('assets/images/logo1.webp'); image = await decodeImageFromList(data2.buffer.asUint8List()); if (mounted) setState(() {}); } @@ -232,11 +232,10 @@ class DunDunPainter extends CustomPainter { pathPaint..color = Colors.red; starPath = starPath.shift(Offset(152, -20)); canvas.drawPath(starPath, pathPaint); - if (image != null) { Rect src2 = Rect.fromLTWH( 0, 0, image!.width.toDouble(), image!.height.toDouble()); - Rect dst2 = Rect.fromLTWH(50, 55, 899 / 27, 1066 / 27); + Rect dst2 = Rect.fromLTWH(50, 55, 899 / 28, 1066 / 28); canvas.drawImageRect(image!, src2, dst2, Paint()); } diff --git a/lib/painter_system/gallery_factory.dart b/lib/painter_system/gallery_factory.dart index 164355c..366c693 100644 --- a/lib/painter_system/gallery_factory.dart +++ b/lib/painter_system/gallery_factory.dart @@ -113,7 +113,7 @@ class GalleryFactory { title: "冰墩墩", author: "张风捷特烈", info: - " 本样例会绘制 2022 年北京冬奥会吉祥物冰墩墩的绘制,可以学到路径绘制、渐变色等知识。", + " 本样例是绘制 2022 年北京冬奥会吉祥物冰墩墩的形体,从中可以学到路径绘制、渐变色等知识。", content: DunDunView()), FrameShower( title: "井字棋",