Package net.runelite.api.geometry
Class SimplePolygon
- java.lang.Object
-
- net.runelite.api.geometry.SimplePolygon
-
-
Constructor Summary
Constructors Constructor Description SimplePolygon()
SimplePolygon(int[] x, int[] y, int length)
SimplePolygon(int[] x, int[] y, int left, int right)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
appendTo(SimplePolygon other)
boolean
contains(double cx, double cy)
boolean
contains(double x, double y, double w, double h)
boolean
contains(Point2D p)
boolean
contains(Rectangle2D r)
void
copyTo(int[] xDest, int[] yDest, int offset)
protected void
expandLeft(int grow)
protected void
expandRight(int grow)
Rectangle
getBounds()
Rectangle2D
getBounds2D()
int
getLeft()
PathIterator
getPathIterator(AffineTransform at)
PathIterator
getPathIterator(AffineTransform at, double flatness)
int
getRight()
int[]
getX()
int
getX(int index)
int[]
getY()
int
getY(int index)
boolean
intersects(double x0, double y0, double w, double h)
boolean
intersects(Rectangle2D r)
void
intersectWithConvex(SimplePolygon convex)
Clips the polygon with the passed convex polygonvoid
popLeft()
void
popRight()
void
pushLeft(int xCoord, int yCoord)
void
pushRight(int xCoord, int yCoord)
void
reverse()
void
setLeft(int left)
void
setRight(int right)
void
setX(int[] x)
void
setY(int[] y)
int
size()
List<Point>
toRuneLitePointList()
-
-
-
Method Detail
-
pushLeft
public void pushLeft(int xCoord, int yCoord)
-
popLeft
public void popLeft()
-
expandLeft
protected void expandLeft(int grow)
-
pushRight
public void pushRight(int xCoord, int yCoord)
-
popRight
public void popRight()
-
expandRight
protected void expandRight(int grow)
-
getX
public int getX(int index)
-
getY
public int getY(int index)
-
size
public int size()
-
copyTo
public void copyTo(int[] xDest, int[] yDest, int offset)
-
appendTo
public void appendTo(SimplePolygon other)
-
reverse
public void reverse()
-
intersectWithConvex
public void intersectWithConvex(SimplePolygon convex)
Clips the polygon with the passed convex polygon
-
getBounds2D
public Rectangle2D getBounds2D()
- Specified by:
getBounds2D
in interfaceShape
-
intersects
public boolean intersects(double x0, double y0, double w, double h)
- Specified by:
intersects
in interfaceShape
-
intersects
public boolean intersects(Rectangle2D r)
- Specified by:
intersects
in interfaceShape
-
contains
public boolean contains(double x, double y, double w, double h)
-
contains
public boolean contains(Rectangle2D r)
-
getPathIterator
public PathIterator getPathIterator(AffineTransform at)
- Specified by:
getPathIterator
in interfaceShape
-
getPathIterator
public PathIterator getPathIterator(AffineTransform at, double flatness)
- Specified by:
getPathIterator
in interfaceShape
-
getX
public int[] getX()
-
getY
public int[] getY()
-
getLeft
public int getLeft()
-
getRight
public int getRight()
-
setX
public void setX(int[] x)
-
setY
public void setY(int[] y)
-
setLeft
public void setLeft(int left)
-
setRight
public void setRight(int right)
-
-