internal void updateScanLine(int x, CPixel cPixel) { if (_data[x].GetHashCode() != cPixel.GetHashCode()) { _colChangedStart = Math.Min(x, _colChangedStart); _colChangedEnd = Math.Max(x, _colChangedEnd); _data[x] = cPixel; } }
internal void clearScanLine(int color) { _colChangedStart = 1; _colChangedEnd = _width; CPixel pixel = new CPixel(color); for (int i = 0; i < _width; i++) { _data[i] = pixel; } }
internal IEnumerable <byte> getData(int diffXstart, int diffXend) { List <byte> t = new List <byte>(); int w = (diffXend - diffXstart) + 1; CPixel[] l = new CPixel[w]; Array.Copy(_data, diffXstart - 1, l, 0, w); foreach (CPixel p in l) { t.Add(p.hicolor); t.Add(p.locolor); } return(t.ToArray <byte>()); }