public List getScanbits(int pCurveType)
  {
    final List fScanBits = new ArrayList();

    // For each generateScanBits line containing points
    for(int lLineNo = fLineMin; lLineNo <= fLineMax; lLineNo++)
    {
      // Sort so that lowest x values come first.
      Double[] lScanLine = (Double[])fScanbuf[lLineNo].toArray(new Double[0]);
      CTSort lSort = new QuickSort();
      lSort.sort(lScanLine);

      // The length will be divisible by 2 because we render closed polyons,
      // so every generateScanBits line is crossed twice (left and right edge of polygon,
      // no intersections allowed!).
      for(int n = 0; n < lScanLine.length; n += 2)
      {
        // Round lLineFrom (but .5 is handled oddly)
        // 1.5001 - 2.5 -> 1.0001 - 2.0 -> 2
        int lXLo = (int)Math.ceil(lScanLine[n].doubleValue() - 0.5);
        // Round lLineTo, substract 1
        // 1.5 - 2.4999 -> 1.0 - 1.9999 -> 1
        int lXHi = (int)Math.floor(lScanLine[n + 1].doubleValue() - 0.5);

        // Limit low and high x to image dimensions
        if(lXLo < 0)
        {
          lXLo = 0;
        }
        if(lXHi >= fPoints)
        {
          lXHi = fPoints - 1;
        }

        if(lXLo <= lXHi)
        {
          /**
           * Shouldn't that always be true since we sorted? "Yes", BUT the
           * rounding might create lo 3.6 -> 4.0 and hi 3.7 -> 3.0
           */
          fScanBits.add(new ScanBit(lLineNo, lXLo, lXHi, pCurveType));
        }
      }
    }

    return fScanBits;
  }