1234567891011121314151617181920212223242526272829303132 |
- import 'package:fis_measure/view/paint/parts/index.dart';
- import 'package:flutter/material.dart';
- /// ai矩形
- class PaintAIRectangle extends CustomPainter {
- final double left;
- final double top;
- final double width;
- final double height;
- PaintAIRectangle(
- this.left,
- this.top,
- this.width,
- this.height,
- );
- @override
- void paint(Canvas canvas, Size size) {
- Rect rect = Rect.fromLTWH(
- left,
- top,
- width,
- height,
- );
- canvas.drawRect(rect, aiPaint);
- }
- @override
- bool shouldRepaint(covariant PaintAIRectangle oldDelegate) {
- return oldDelegate.hashCode != hashCode;
- }
- }
|