Package technology.tabula
Class Ruling
java.lang.Object
java.awt.geom.Line2D
java.awt.geom.Line2D.Float
technology.tabula.Ruling
- All Implemented Interfaces:
Shape,Serializable,Cloneable
public class Ruling extends Line2D.Float
- See Also:
- Serialized Form
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description booleancolinear(Point2D point)static List<Ruling>collapseOrientedRulings(List<Ruling> lines)static List<Ruling>collapseOrientedRulings(List<Ruling> lines, int expandAmount)static List<Ruling>cropRulingsToArea(List<Ruling> rulings, Rectangle2D area)booleanequals(Object other)Rulingexpand(float amount)static Map<Point2D,Ruling[]>findIntersections(List<Ruling> horizontals, List<Ruling> verticals)doublegetAngle()floatgetBottom()floatgetEnd()floatgetHeight()floatgetLeft()floatgetPosition()floatgetRight()floatgetStart()floatgetTop()floatgetWidth()booleanhorizontal()Rulingintersect(Rectangle2D clip)Point2DintersectionPoint(Ruling other)doublelength()booleannearlyIntersects(Ruling another)booleannearlyIntersects(Ruling another, int colinearOrParallelExpandAmount)voidnormalize()Normalize almost horizontal or almost vertical linesbooleanoblique()booleanperpendicularTo(Ruling other)voidsetBottom(float v)voidsetEnd(float v)voidsetLeft(float v)voidsetPosition(float v)voidsetRight(float v)voidsetStart(float v)voidsetTop(float v)StringtoString()booleanvertical()Methods inherited from class java.awt.geom.Line2D.Float
getBounds2D, getP1, getP2, getX1, getX2, getY1, getY2, setLine, setLineMethods inherited from class java.awt.geom.Line2D
clone, contains, contains, contains, contains, getBounds, getPathIterator, getPathIterator, intersects, intersects, intersectsLine, intersectsLine, linesIntersect, ptLineDist, ptLineDist, ptLineDist, ptLineDistSq, ptLineDistSq, ptLineDistSq, ptSegDist, ptSegDist, ptSegDist, ptSegDistSq, ptSegDistSq, ptSegDistSq, relativeCCW, relativeCCW, relativeCCW, setLine, setLine
-
Constructor Details
-
Method Details
-
normalize
public void normalize()Normalize almost horizontal or almost vertical lines -
vertical
public boolean vertical() -
horizontal
public boolean horizontal() -
oblique
public boolean oblique() -
getPosition
public float getPosition() -
setPosition
public void setPosition(float v) -
getStart
public float getStart() -
setStart
public void setStart(float v) -
getEnd
public float getEnd() -
setEnd
public void setEnd(float v) -
perpendicularTo
-
colinear
-
nearlyIntersects
-
nearlyIntersects
-
length
public double length() -
intersect
-
expand
-
intersectionPoint
-
equals
-
getTop
public float getTop() -
setTop
public void setTop(float v) -
getLeft
public float getLeft() -
setLeft
public void setLeft(float v) -
getBottom
public float getBottom() -
setBottom
public void setBottom(float v) -
getRight
public float getRight() -
setRight
public void setRight(float v) -
getWidth
public float getWidth() -
getHeight
public float getHeight() -
getAngle
public double getAngle() -
toString
-
cropRulingsToArea
-
findIntersections
-
collapseOrientedRulings
-
collapseOrientedRulings
-