示例#1
0
 /// <summary>
 /// Move to next line and reset currentX
 /// </summary>
 /// <param name="startPos">a start position</param>
 /// <returns>current line number</returns>
 public Int32 NewLine(float startPos)
 {
     if (currentLine == -1)
     {
         lineInfo.Add(new aLine(this, WidthLimit(), 0, 0, 0));
     }
     else
     if (currentX == startPos)
     {
         return(lineInfo.Count - 1);
     }
     else
     {
         aLine line = lineInfo[lineInfo.Count - 1];
         lineInfo.Add(new aLine(this, WidthLimit(), line.lineTop + line.lineHeight, 0, line.lineNumber + 1));
     }
     currentLine++;
     currentX = startPos;
     currentY = lineInfo[lineInfo.Count - 1].lineTop;
     return(lineInfo.Count - 1);
 }
示例#2
0
 public bool Contains(aLine value)
 {
     return(List.Contains(value));
 }
示例#3
0
 public void Remove(aLine value)
 {
     List.Remove(value);
 }
示例#4
0
 public void Insert(Int32 index, aLine value)
 {
     List.Insert(index, value);
 }
示例#5
0
 public Int32 Add(aLine value)
 {
     List.Add(value);
     return(List.Count - 1);
 }
示例#6
0
 public void setLine(Int32 aIndex, aLine value)
 {
     List[aIndex] = value;
 }