ClipComponent.rectangle constructor

ClipComponent.rectangle({
  1. Vector2? position,
  2. Vector2? size,
  3. Vector2? scale,
  4. double? angle,
  5. Anchor? anchor,
  6. Iterable<Component>? children,
  7. int? priority,
  8. ComponentKey? key,
})

Clips the canvas in the form of a rectangle based on its size.

Implementation

ClipComponent.rectangle({
  Vector2? position,
  Vector2? size,
  Vector2? scale,
  double? angle,
  Anchor? anchor,
  Iterable<Component>? children,
  int? priority,
  ComponentKey? key,
}) : this(
        builder: (size) => Rectangle.fromRect(size.toRect()),
        position: position,
        size: size,
        scale: scale,
        angle: angle,
        anchor: anchor,
        children: children,
        priority: priority,
        key: key,
      );