- /// 桁方向の座標に対応するインデックスを取得する
- /// </summary>
- /// <param name="row">対象となる行</param>
- /// <param name="x">テキストエリアからの相対位置</param>
- /// <returns></returns>
- public int GetIndexFromColPostion(int row, double x)
- {
- x -= this.render.TextArea.X;
- int lineLength = this.LayoutLines.GetLengthFromLineNumber(row);
- if (lineLength == 0)
- return 0;
- int index = this.LayoutLines.GetLayout(row).GetIndexFromColPostion(this.Src.X + x);
- return index;
- }
-
- /// <summary>
- /// インデックスに対応する桁方向の座標を得る
- /// </summary>
- /// <param name="row">対象となる行</param>
- /// <param name="index">インデックス</param>
- /// <returns>テキストエリアからの相対位置を返す</returns>
- public double GetColPostionFromIndex(int row, int index)
- {
- double x = this.LayoutLines.GetLayout(row).GetColPostionFromIndex(index);
- return x - Src.X + this.render.TextArea.X;
- }
-
- /// <summary>