drawPixels method

void drawPixels(
  1. BitmapData source,
  2. Rectangle<num> sourceRect,
  3. Point<num> destPoint, [
  4. BlendMode? blendMode,
])

Draws pixels from source onto this object.

Unlike copyPixels, the target location is not erased first. That means pixels on this BitmapData may be visible if pixels from source are transparent. Select a blendMode to customize how two pixels are blended.

Implementation

void drawPixels(
    BitmapData source, Rectangle<num> sourceRect, Point<num> destPoint,
    [BlendMode? blendMode]) {
  final updateBatch = BitmapDataUpdateBatch(this);
  updateBatch.drawPixels(source, sourceRect, destPoint, blendMode);
  updateBatch.update();
}