public eBreakAction whitespace() { if (state == eLineState.Overflow) { state = eLineState.None; return(eBreakAction.LineFeed); } if (state.HasFlag(eLineState.HaveGlyphs)) { state = eLineState.HaveWords; } return(eBreakAction.None); }
public eBreakAction glyph(int x) { if (state == eLineState.Overflow) { return(eBreakAction.None); } if (x < lineBreakPosition) { state |= eLineState.HaveGlyphs; return(eBreakAction.None); } if (state.HasFlag(eLineState.HaveWords)) { state = eLineState.HaveGlyphs; return(eBreakAction.MoveLastWord); } state = eLineState.Overflow; return(eBreakAction.None); }
public eBreakAction newline() { state = eLineState.None; return(eBreakAction.LineFeed); }
public LineBreaker(int right) { lineBreakPosition = checked ((ushort)right); state = eLineState.None; }