changeSize method

void changeSize(
  1. int objectId, {
  2. double? width,
  3. double? height,
})

Change the size of the object with the given objectId to the new width and height.

Implementation

void changeSize(int objectId, {double? width, double? height}) {
  if (width == null && height == null) return;
  final objects = _objects;
  if (objectId < 0 || objectId >= objects.length) return;
  final offset = objectId * _objectSize;
  if (width != null) objects[offset + 2] = width;
  if (height != null) objects[offset + 3] = height;
}