public TexturePixelArray(Color[] pixels, int texWidth, IntRect subset, IndexingOrder indexingOrder = IndexingOrder.RowByRow) { this._pixels = pixels; this._texWidth = texWidth; this._subset = subset; this._indexingOrder = indexingOrder; }
// Old: quadrisection method used while debugging bisection and recursion algorithm. // /// <summary> Splits the TexturePixelArray into four quarters.</summary> // public void Quadrisect(out TexturePixelArray arr0, out TexturePixelArray arr1, // out TexturePixelArray arr2, out TexturePixelArray arr3) { // IntRect arr0Rect = new IntRect( X, Y, Width / 2, Height / 2); // IntRect arr1Rect = new IntRect(Width / 2 + X, Y, Width / 2, Height / 2); // IntRect arr2Rect = new IntRect( X, Height / 2 + Y, Width / 2, Height / 2); // IntRect arr3Rect = new IntRect(Width / 2 + X, Height / 2 + Y, Width / 2, Height / 2); // arr0 = new TexturePixelArray(_pixels, _texWidth, arr0Rect, indexingOrder: _indexingOrder); // arr1 = new TexturePixelArray(_pixels, _texWidth, arr1Rect, indexingOrder: _indexingOrder); // arr2 = new TexturePixelArray(_pixels, _texWidth, arr2Rect, indexingOrder: _indexingOrder); // arr3 = new TexturePixelArray(_pixels, _texWidth, arr3Rect, indexingOrder: _indexingOrder); // } public void FlipIndexingOrder() { if (this._indexingOrder == IndexingOrder.ColumnByColumn) { this._indexingOrder = IndexingOrder.RowByRow; } else { this._indexingOrder = IndexingOrder.ColumnByColumn; } }