1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
| /// 画布状态相关
void save() native 'Canvas_save'; void saveLayer(Rect? bounds, Paint paint) void restore() native 'Canvas_restore'; int getSaveCount() native 'Canvas_getSaveCount';
/// 画布变换相关 void translate(double dx, double dy) native 'Canvas_translate'; void scale(double sx, [double? sy]) => _scale(sx, sy ?? sx); void rotate(double radians) native 'Canvas_rotate'; void skew(double sx, double sy) native 'Canvas_skew'; void transform(Float64List matrix4)
/// 画布裁剪相关 void clipRect(Rect rect, { ClipOp clipOp = ClipOp.intersect, bool doAntiAlias = true }) void clipRRect(RRect rrect, {bool doAntiAlias = true}) void clipPath(Path path, {bool doAntiAlias = true})
/// 线 void drawLine(Offset p1, Offset p2, Paint paint)
///矩形 void drawRect(Rect rect, Paint paint) void drawRRect(RRect rrect, Paint paint) void drawDRRect(RRect outer, RRect inner, Paint paint)
///圆相关 void drawOval(Rect rect, Paint paint) void drawCircle(Offset c, double radius, Paint paint) void drawArc(Rect rect, double startAngle, double sweepAngle, bool useCenter, Paint paint)
///图片 void drawImage(Image image, Offset offset, Paint paint) void drawImageRect(Image image, Rect src, Rect dst, Paint paint) void drawImageNine(Image image, Rect center, Rect dst, Paint paint) void drawPicture(Picture picture) void drawAtlas(Image atlas,List<RSTransform> transforms,List<Rect> rects,List<Color>? colors,BlendMode? blendMode,Rect? cullRect,Paint paint) void drawRawAtlas(Image atlas,Float32List rstTransforms,Float32List rects,Int32List? colors,BlendMode? blendMode,Rect? cullRect,Paint paint)
///文字 void drawParagraph(Paragraph paragraph, Offset offset)
///点 void drawPoints(PointMode pointMode, List<Offset> points, Paint paint) void drawRawPoints(PointMode pointMode, Float32List points, Paint paint) void drawVertices(Vertices vertices, BlendMode blendMode, Paint paint)
/// 其他 void drawColor(Color color, BlendMode blendMode) void drawPaint(Paint paint) void drawPath(Path path, Paint paint) void drawShadow(Path path, Color color, double elevation, bool transparentOccluder)
|