/* Last edited on 2013-03-23 12:05:18 by stolfilocal */ /* Representation for an element in a word candidate. */ package minetto.utils; public final class WordCandElem { /* === REPRESENTATION ========================================= */ public final int ich; /* Index of character in character list. */ public final int[][] box; /* Bounding box. */ public final double xctr; /* Y coordinate of assumed baseline. */ public final boolean asc; /* If true, assume it has an ascender. */ public final boolean des; /* If true, assume it has a descender. */ /* === CONSTRUCTORS =========================================== */ /* ---------------------------------------------------------------------- Creates a new candidate from its character index, its bounding box, and the assumed ascender/descender heights relative to the main body height. */ public WordCandElem(int ich, int[][] box, boolean asc, boolean des) { this.ich = ich; this.box = box; this.xctr = 0.5*(this.box[0][0] + this.box[0][1] + 1); this.asc = asc; this.des = des; } /* === METHODS ================================================= */ }