compositeRectFrom method

void compositeRectFrom(
  1. CellBuffer source,
  2. CellRect srcRect,
  3. CellOffset destOffset
)

Paints the srcRect region of source into this buffer with its top-left landing at destOffset, as compositeFrom does. Useful when the source is largely empty and only the tight bounding box of its content needs compositing.

Implementation

void compositeRectFrom(
  CellBuffer source,
  CellRect srcRect,
  CellOffset destOffset,
) {
  _copyRect(
    source,
    srcRect.offset.col,
    srcRect.offset.row,
    srcRect.size.cols,
    srcRect.size.rows,
    destOffset,
    transparent: true,
  );
}