An object representing a quadrilateral or QuadPoint.
In TypeScript the Quad type is defined as follows:
type Quad = [ number, number, number, number number, number, number, number ]This is an interface, not a concrete class!
Quads are not represented by a class; they are just plain arrays of eight numbers.
only mutool run
A quad whose coordinates are such that it is categorized as empty.
only mutool run
A quad whose coordinates are such that it is categorized as invalid.
only mutool run
A quad whose coordinates are such that it is categorized as infinite.
only mutool run
Returns a boolean indicating if the quad is empty or not.
Quad) –
Rectangle to evaluate.var isEmpty = mupdf.Quad.isEmpty([0, 0, 0, 0]) // true
var isEmpty = mupdf.Quad.isEmpty([0, 0, 100, 100]) // falseonly mutool run
Returns a boolean indicating if the quad is valid or not.
Quad) –
Rectangle to evaluate.var isValid = mupdf.Quad.isValid([0, 0, 100, 100]) // true
var isValid = mupdf.Quad.isValid([0, 0, -100, 100]) // falseonly mutool run
Returns a boolean indicating if the quad is infinite or not.
Quad) –
Rectangle to evaluate.var isInfinite = mupdf.Quad.isInfinite([0x80000000, 0x80000000, 0x7fffff80, 0x7fffff80]) //true
var isInfinite = mupdf.Quad.isInfinite([0, 0, 100, 100]) // falseonly mutool run
Transforms the supplied quad by the given transformation matrix.
Transforming an invalid, empty or infinite quad results in the supplied quad being returned without change.
var m = mupdf.Quad.transform([0, 0, 100, 100], [1, 0.5, 1, 1, 1, 1])only mutool run
Return whether the point is inside the quad.
:returns boolean
var inside = mupdf.Rect.isPointInside([0, 0, 100, 100], [50, 50])only mutool run
Create a Quad that maps exactly to the coordinate of rectangle.