Quadrangle

constructor(x1: Float, y1: Float, x2: Float, y2: Float, x3: Float, y3: Float, x4: Float, y4: Float)

Create a quadrangle from the coordinates of the corners. See Quadrangle for more details.


constructor(points: FloatArray = FloatArray(8))

Creates a new Quadrangle instance from the given coordinates. The order of the corners must be: TopLeft (x, y), TopRight (x, y), BottomLeft (x, y), BottomRight (x, y). Each coordinate must be between 0 and 1. x values are relative to the width of the image, y values are relative to the height of the image.