| 190 | } |
| 191 | |
| 192 | int LineLayout::FindBefore(XYPOSITION x, int lower, int upper) const { |
| 193 | do { |
| 194 | int middle = (upper + lower + 1) / 2; // Round high |
| 195 | XYPOSITION posMiddle = positions[middle]; |
| 196 | if (x < posMiddle) { |
| 197 | upper = middle - 1; |
| 198 | } else { |
| 199 | lower = middle; |
| 200 | } |
| 201 | } while (lower < upper); |
| 202 | return lower; |
| 203 | } |
| 204 | |
| 205 | int LineLayout::EndLineStyle() const { |
| 206 | return styles[numCharsBeforeEOL > 0 ? numCharsBeforeEOL-1 : 0]; |
no outgoing calls
no test coverage detected