@@ -5366,12 +5366,26 @@ abstract class Canvas {
5366
5366
void drawPath (Path path, Paint paint);
5367
5367
5368
5368
/// Draws the given [Image] into the canvas with its top-left corner at the
5369
- /// given [Offset] . The image is composited into the canvas using the given [Paint] .
5369
+ /// given [Offset] .
5370
+ ///
5371
+ /// The image is composited into the canvas using the given [Paint] , by
5372
+ /// applying the [Paint.color] (alpha channel only), [Paint.blendMode] ,
5373
+ /// [Paint.colorFilter] , [Paint.maskFilter] , and [Paint.imageFilter]
5374
+ /// properties of the `paint` argument (in that order).
5375
+ ///
5376
+ /// Multiple calls to this method with different arguments (from the same
5377
+ /// image) can be batched into a single call to [drawAtlas] to improve
5378
+ /// performance.
5370
5379
void drawImage (Image image, Offset offset, Paint paint);
5371
5380
5372
5381
/// Draws the subset of the given image described by the `src` argument into
5373
5382
/// the canvas in the axis-aligned rectangle given by the `dst` argument.
5374
5383
///
5384
+ /// The image is composited into the canvas using the given [Paint] , by
5385
+ /// applying the [Paint.color] (alpha channel only), [Paint.blendMode] ,
5386
+ /// [Paint.colorFilter] , [Paint.maskFilter] , and [Paint.imageFilter]
5387
+ /// properties of the `paint` argument (in that order).
5388
+ ///
5375
5389
/// This might sample from outside the `src` rect by up to half the width of
5376
5390
/// an applied filter.
5377
5391
///
@@ -5380,7 +5394,7 @@ abstract class Canvas {
5380
5394
/// performance.
5381
5395
void drawImageRect (Image image, Rect src, Rect dst, Paint paint);
5382
5396
5383
- /// Draws the given [Image] into the canvas using the given [Paint] .
5397
+ /// Draws the given [Image] into the canvas as a nine-patch image .
5384
5398
///
5385
5399
/// The image is drawn in nine portions described by splitting the image by
5386
5400
/// drawing two horizontal lines and two vertical lines, where the `center`
@@ -5393,6 +5407,15 @@ abstract class Canvas {
5393
5407
/// five regions are drawn by stretching them to fit such that they exactly
5394
5408
/// cover the destination rectangle while maintaining their relative
5395
5409
/// positions.
5410
+ ///
5411
+ /// The image is composited into the canvas using the given [Paint] , by
5412
+ /// applying the [Paint.color] (alpha channel only), [Paint.blendMode] ,
5413
+ /// [Paint.colorFilter] , [Paint.maskFilter] , and [Paint.imageFilter]
5414
+ /// properties of the `paint` argument (in that order).
5415
+ ///
5416
+ /// See also:
5417
+ ///
5418
+ /// * <https://en.wikipedia.org/wiki/9-slice_scaling>
5396
5419
void drawImageNine (Image image, Rect center, Rect dst, Paint paint);
5397
5420
5398
5421
/// Draw the given picture onto the canvas. To create a picture, see
@@ -5499,15 +5522,18 @@ abstract class Canvas {
5499
5522
/// [blendMode] argument (if a color is specified). In this part of the operation,
5500
5523
/// the image part will be considered the source of the operation and the associated
5501
5524
/// color will be considered the destination.
5502
- /// - Blend the result from the first step onto the canvas using the translation,
5503
- /// rotation, and scale properties expressed in the associated entry in the
5504
- /// [transforms] list using the properties of the [Paint] object.
5505
- ///
5506
- /// If the first stage of the operation which blends each part of the image with
5507
- /// a color is needed, then both the [colors] and [blendMode] arguments must
5508
- /// not be null and there must be an entry in the [colors] list for each
5509
- /// image part. If that stage is not needed, then the [colors] argument can
5510
- /// be either null or an empty list and the [blendMode] argument may also be null.
5525
+ ///
5526
+ /// - Blend the result from the first step onto the canvas using the
5527
+ /// translation, rotation, and scale properties expressed in the associated
5528
+ /// entry in the [transforms] list, and the [Paint.color] (alpha channel
5529
+ /// only), [Paint.blendMode] , [Paint.colorFilter] , [Paint.maskFilter] , and
5530
+ /// [Paint.imageFilter] properties of the `paint` argument (in that order).
5531
+ ///
5532
+ /// If the first stage of the operation which blends each part of the image
5533
+ /// with a color is needed, then both the [colors] and [blendMode] arguments
5534
+ /// must not be null and there must be an entry in the [colors] list for each
5535
+ /// image part. If the [colors] argument is null or empty, or if the
5536
+ /// [blendMode] argument is null, then this stage is skipped.
5511
5537
///
5512
5538
/// The optional [cullRect] argument can provide an estimate of the bounds of the
5513
5539
/// coordinates rendered by all components of the atlas to be compared against
0 commit comments