strokedBounds method

DiagramRect strokedBounds(
  1. double width
)

Conservative exterior ink bounds for the renderer's miter limit of four. Curved/rectangular outlines need only half the stroke width; arbitrary corners may extend to four times that distance. This is a culling envelope, not a replacement for the outline used by hit testing or attachments.

Implementation

DiagramRect strokedBounds(double width) {
  if (!width.isFinite || width < 0) {
    throw ArgumentError.value(width, 'width');
  }
  final outset = this is RectangleOutline || this is EllipseOutline
      ? width / 2
      : width * 2;
  return bounds.inflate(outset);
}