Package cz.vutbr.fit.layout.segm
Class AreaUtils
- java.lang.Object
-
- cz.vutbr.fit.layout.segm.AreaUtils
-
public class AreaUtils extends Object
General purpose area analysis functions.- Author:
- burgetr
-
-
Constructor Summary
Constructors Constructor Description AreaUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AreacreateSuperAreaFromVerticalRegion(Area root, Rectangular region)static booleanisLink(Area a)Checks if the given area has a target URL assigned (it acts as a link)static booleanisNeighbor(Area a1, Area a2)Checks if the given areas are in the same visual group (i.e.static booleanisOnSameLine(Area a1, Area a2)Checks if the given areas are on the same line.static booleanisOnSameLine(Area a1, Area a2, int threshold)Checks if the given areas are on the same line.static booleanisOnSameLineRoughly(Area a1, Area a2)
-
-
-
Method Detail
-
isNeighbor
public static boolean isNeighbor(Area a1, Area a2)
Checks if the given areas are in the same visual group (i.e. "are near each other").- Parameters:
a1-a2-- Returns:
-
isOnSameLine
public static boolean isOnSameLine(Area a1, Area a2)
Checks if the given areas are on the same line.- Parameters:
a1-a2-- Returns:
-
isOnSameLine
public static boolean isOnSameLine(Area a1, Area a2, int threshold)
Checks if the given areas are on the same line.- Parameters:
a1-a2-- Returns:
-
isLink
public static boolean isLink(Area a)
Checks if the given area has a target URL assigned (it acts as a link)- Parameters:
a-- Returns:
-
createSuperAreaFromVerticalRegion
public static Area createSuperAreaFromVerticalRegion(Area root, Rectangular region)
-
-