Exemplo n.º 1
0
 public void SetArea(int startLine, float startCharX, int endLine, float endCharX)
 {
     if (startLine == endLine && startCharX > endCharX)
     {
         float tmp = startCharX;
         startCharX = endCharX;
         endCharX   = tmp;
     }
     _shape.rects.Clear();
     _owner.textField.GetLinesShape(startLine, startCharX, endLine, endCharX, true, _shape.rects);
     _shape.Refresh();
 }
Exemplo n.º 2
0
        public void SetArea(int startLine, float startCharX, int endLine, float endCharX)
        {
            if (startLine == endLine && startCharX > endCharX)
            {
                float tmp = startCharX;
                startCharX = endCharX;
                endCharX   = tmp;
            }
            _shape.rects.Clear();
            _owner.textField.GetLinesShape(startLine, startCharX, endLine, endCharX, true, _shape.rects);
            int wAdd = _owner.htmlParseOptions.clickWidthAdd;
            int hAdd = _owner.htmlParseOptions.clickWidthAdd;

            for (int i = 0; i < _shape.rects.Count; i++)
            {
                var rect = _shape.rects[i];
                rect.x         -= wAdd * 0.5F;
                rect.y         -= hAdd * 0.5F;
                rect.width     += wAdd;
                rect.height    += hAdd;
                _shape.rects[i] = rect;
            }
            _shape.Refresh();
        }