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
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.awt.geom.Line2D
Line2D.Double, Line2D.Float -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intFields inherited from class java.awt.geom.Line2D.Float
x1, x2, y1, y2 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancollapseOrientedRulings(List<Ruling> lines) collapseOrientedRulings(List<Ruling> lines, int colinearExpandAmount) collapseOrientedRulings(List<Ruling> lines, int colinearExpandAmount, int perpendicularExpandAmout) collapseOrientedRulings(List<Ruling> lines, int colinearExpandAmount, int perpendicularExpandAmount, float magnetRadius) cropRulingsToArea(List<Ruling> rulings, Rectangle2D area) booleanexpand(float amount) findIntersections(List<Ruling> horizontals, List<Ruling> verticals) findIntersections(List<Ruling> horizontals, List<Ruling> verticals, int horizontalExpandAmount, int verticalExpandAmount) doublegetAngle()floatfloatgetEnd()floatfloatgetLeft()floatfloatgetRight()floatgetStart()floatgetTop()floatgetWidth()booleanintersect(Rectangle2D clip) intersectionPoint(Ruling other, int perpendicularExpandAmount) doublelength()booleannearlyIntersects(Ruling another) booleannearlyIntersects(Ruling another, int colinearOrParallelExpandAmount, int perpendicularExpandAmout) voidNormalize almost horizontal or almost vertical linesbooleanoblique()booleanparallelTo(Ruling other) booleanperpendicularTo(Ruling other) voidsetBottom(float v) voidsetEnd(float v) voidsetLeft(float v) voidsetPosition(float v) voidsetRight(float v) voidsetStart(float v) voidsetTop(float v) toString()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
-
Field Details
-
PERPENDICULAR_PIXEL_EXPAND_AMOUNT
public static final int PERPENDICULAR_PIXEL_EXPAND_AMOUNT- See Also:
-
COLINEAR_OR_PARALLEL_PIXEL_EXPAND_AMOUNT
public static final int COLINEAR_OR_PARALLEL_PIXEL_EXPAND_AMOUNT- See Also:
-
-
Constructor Details
-
Ruling
public Ruling(float top, float left, float width, float height) -
Ruling
-
-
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
public boolean nearlyIntersects(Ruling another, int colinearOrParallelExpandAmount, int perpendicularExpandAmout) -
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() -
parallelTo
-
toString
-
cropRulingsToArea
-
findIntersections
-
findIntersections
-
collapseOrientedRulings
-
collapseOrientedRulings
-
collapseOrientedRulings
-
collapseOrientedRulings
-