{
}
- public List<LineToIndexTableData> BreakLine(Document doc, LineToIndexTable layoutLineCollection, int startIndex, int endIndex, double maxwidth)
- {
- List<LineToIndexTableData> output = new List<LineToIndexTableData>();
-
- foreach (string str in doc.GetLines(startIndex, endIndex))
- {
- LineToIndexTableData info;
-
- if (str.Length == 0)
- {
- info = layoutLineCollection.CreateLineToIndexTableData(startIndex, 0, true, null);
- output.Add(info);
- return output;
- }
-
- int fitlen, index = 0, x = 0, width;
- do
- {
- int linesFilled;
- SizeF metrics = g.MeasureString(str.Substring(index), this.font, new SizeF((float)maxwidth, this.font.Height + 1), this.sf, out fitlen, out linesFilled);
-
- x += width = (int)metrics.Width;
-
- info = layoutLineCollection.CreateLineToIndexTableData(index + startIndex, fitlen, false, null);
- output.Add(info);
-
- index += fitlen;
- } while (index < str.Length);
-
- output[output.Count - 1].LineEnd = true;
-
- startIndex += str.Length;
- }
-
- return output;
- }
-
public void DrawGripper(Point p, double radius)
{
//タッチには対応していないので実装する必要はない