public bool TryAdd(ICharMetric cdi) { if (_rect.Y == cdi.CharRect.Y && cdi.IndexEachLine == _indexOnLine + 1) { _rect = _rect.Union(cdi.CharRect); _indexOnLine = cdi.IndexEachLine; return(true); } return(false); }
public void Init(ICharMetric cdi) { _buffer.Clear(); _indexOnLine = cdi.IndexEachLine; _location = new Point2D((int)cdi.Left, cdi.Y); _buffer.GetSpan(1)[0] = cdi.Char; _buffer.Advance(1); _font = cdi.Font; _color = cdi.Color; }
/// <summary> /// /// </summary> public bool TryAdd(ICharMetric cdi) { // 同じ種別の文字はまとめて描画する if (_location.Y == cdi.Y && cdi.IndexEachLine == _indexOnLine + 1 && object.ReferenceEquals(_font, cdi.Font) && (_color == cdi.Color || _color.IsTransparent || cdi.Color.IsTransparent)) { _buffer.GetSpan(1)[0] = cdi.Char; _buffer.Advance(1); _indexOnLine = cdi.IndexEachLine; if (_color.IsTransparent) { _color = cdi.Color; } return(true); } return(false); }
public void Init(ICharMetric cdi) { _color = cdi.BackgroundColor; _rect = cdi.CharRect; _indexOnLine = cdi.IndexEachLine; }
public void Init(ICharMetric cdi) { _rect = cdi.CharRect; _indexOnLine = cdi.IndexEachLine; }