Determine if a point is on or nearly on this rectangle.
Point to test
Is the point on the rectangle boundary?
Calculate the rectangle Zone for a given point located around, on, or in the rectangle. See https://en.wikipedia.org/wiki/Cohen%E2%80%93Sutherland_algorithm This differs from _getZone in how points on the edge are treated: they are not considered inside.
A point to test for location relative to the rectangle
Which edge zone does the point belong to?
Get all the points (corners) for a polygon approximation of a rectangle between two points on the rectangle. The two points can be anywhere in 2d space on or outside the rectangle. The starting and ending side are based on the zone of the corresponding a and b points. (See PIXI.Rectangle.CS_ZONES.) This is the rectangular version of PIXI.Circle.prototype.pointsBetween, and is similarly used to draw the portion of the shape between two intersection points on that shape.
A point on or outside the rectangle, representing the starting position.
A point on or outside the rectangle, representing the starting position.
Points returned are clockwise from start to end.
Get all intersection points for a segment A|B Intersections are sorted from A to B.
Endpoint A of the segment
Endpoint B of the segment
Array of intersections or empty if no intersection. If A|B is parallel to an edge of this rectangle, returns the two furthest points on the segment A|B that are on the edge.
Convert this PIXI.Rectangle into a PIXI.Polygon
The Rectangle expressed as a PIXI.Polygon
Calculate the rectangle Zone for a given point located around or in the rectangle. https://en.wikipedia.org/wiki/Cohen%E2%80%93Sutherland_algorithm
Point to test for location relative to the rectangle
Test whether a line segment AB intersects this rectangle.
The first endpoint of segment AB
The second endpoint of segment AB
Options affecting the intersect test.
True if intersects.
Intersect this PIXI.Rectangle with a PIXI.Polygon. Currently uses the clipper library. In the future we may replace this with more specialized logic which uses the line-line intersection formula.
A PIXI.Polygon
Options which configure how the intersection is computed
The intersected polygon or null if no solution was present
Intersect this PIXI.Rectangle with an array of ClipperPoints. Currently, uses the clipper library. In the future we may replace this with more specialized logic which uses the line-line intersection formula.
An array of ClipperPoints generated by PIXI.Polygon.toClipperPoints()
Options which configure how the intersection is computed
The intersected polygon or null if no solution was present
Determine whether some other Rectangle overlaps with this one. This check differs from the parent class Rectangle#intersects test because it is true for adjacency (zero area).
Some other rectangle against which to compare
Do the rectangles overlap?
Normalize the width and height of the rectangle in-place, enforcing that those dimensions be positive.
Generate a new rectangle by rotating this one clockwise about its center by a certain number of radians
The angle of rotation
A new rotated rectangle
Return the bounding box for a PIXI.Rectangle. The bounding rectangle is normalized such that the width and height are non-negative.