Band class

Represents a horizontal band (aka strip) in an image/document.

A Band contains multiple Artifact objects and provides methods for analyzing their layout and characteristics.

Constructors

Band()
Creates a new Band with the specified rectangle.

Properties

artifacts List<Artifact>
List of artifacts contained within this band.
final
averageKerning double
Gets the average kerning between adjacent artifacts in the band.
no setter
averageWidth double
Gets the average width of artifacts in the band.
no setter
hashCode int
The hash code for this object.
no setterinherited
rectangle Rect
Gets the bounding rectangle of this object.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
spacesCount int
Returns the count of space characters in the artifacts.
no setter

Methods

addArtifact(Artifact artifact) → void
Adds the given artifact to the band.
identifySpacesInBand() → void
Identifies and inserts space artifacts between existing artifacts in the band.
insertArtifactForSpace(int indexOfArtifact, double x1, double x2) → void
Inserts a space artifact at a specified position in the artifacts list.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
packArtifactLeftToRight() → void
Adjusts the positions of artifacts to pack them from left to right.
sortLeftToRight() → void
Sorts the artifacts in this band from left to right.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

kerningWidth int
Kerning between each artifact when applying packing
getter/setter pair

Static Methods

getBoundingBox(List<Artifact> artifacts) Rect
Calculates the bounding rectangle that encloses a list of artifacts.