static bool FindY(RasterizedLine.PixelIterator iter, int y, out int x0) { RasterizedLine.Pixel p; while (iter.Next(out p)) { if (p.y == y) { x0 = p.x; return(true); } } x0 = 0; return(false); }
static void CacheYOnChanged(RasterizedLine.PixelIterator iter, Array <RasterizedLine.Pixel> list) { RasterizedLine.Pixel p; int y = int.MaxValue; while (iter.Next(out p)) { if (y != p.y) { list.Push(p); y = p.y; } } }
static bool NextY(RasterizedLine.PixelIterator iter, int y, out int x0, out int y0) { RasterizedLine.Pixel p; while (iter.Next(out p)) { if (y != p.y) { x0 = p.x; y0 = p.y; return(true); } } x0 = 0; y0 = 0; return(false); }