ScanCutout Constructor

constructor(source: ScanCutout)

Creates an independent copy of another outline, sharing no native state with it.

Parameters

  • source — the outline to copy.
constructor(bounds: SizeF, points: Array<PointF>, transform: Matrix)

Creates an outline from explicit corner points.

Parameters

  • bounds — the size of the image the points are expressed in.
  • points — the corners, in clockwise order.
  • transform — maps the points onto the image they describe, carrying the page’s orientation. Pass an identity matrix when the points are already in the image’s own coordinates.
constructor(bytes: ByteArray)

Restores an outline previously serialised by writeBytes.

Parameters

  • bytes — the serialised outline.
@JvmOverloads constructor(points: Array<Point>, orientation: Int, bounds: Point, asOrigin: Boolean = true)

Creates an outline from integer corner points, for code holding corners rather than a ScanCutout.

Parameters

  • points — the corners, in clockwise order.
  • orientation — the orientation the points are expressed at.
  • bounds — the size of the image they belong to.
  • asOrigin — whether the points describe the untransformed image.
Top