writeDrawImage method

void writeDrawImage(
  1. VectorGraphicsBuffer buffer,
  2. int imageId,
  3. double x,
  4. double y,
  5. double width,
  6. double height,
  7. Float64List? transform,
)

Implementation

void writeDrawImage(
  VectorGraphicsBuffer buffer,
  int imageId,
  double x,
  double y,
  double width,
  double height,
  Float64List? transform,
) {
  buffer._checkPhase(_CurrentSection.commands);
  buffer._addCommandsTag();
  assert(width > 0 && height > 0);

  buffer._putUint8(_drawImageTag);
  buffer._putUint16(imageId);
  buffer._putFloat32(x);
  buffer._putFloat32(y);
  buffer._putFloat32(width);
  buffer._putFloat32(height);
  buffer._writeTransform(transform);
}