Example #1
0
 public void Prepare(int count, int r, int g, int b, int a)
 {
     this.currentHeadIndex = 0;
     this.currentTailIndex = size - 1;
     for (int i = 0; i < count; ++i)
     {
         blurValues[i] = new BlurStack((byte)r, (byte)g, (byte)b, (byte)a);
         this.Next();
     }
 }
Example #2
0
 public CircularBlurStack(int size)
 {
     this.size             = size;
     this.blurValues       = new BlurStack[size];
     this.currentHeadIndex = 0;
     this.currentTailIndex = size - 1;
     for (int i = size - 1; i >= 0; --i)
     {
         blurValues[i] = new BlurStack();
     }
 }
Example #3
0
 public CircularBlurStack(int size)
 {
     _size             = size;
     _blurValues       = new BlurStack[size];
     _currentHeadIndex = 0;
     _currentTailIndex = size - 1;
     for (int i = size - 1; i >= 0; --i)
     {
         _blurValues[i] = new BlurStack();
     }
 }
Example #4
0
            public void Clear(int pa, int pr, int pg, int pb)
            {
                stack = stackStart;

                for (int i = 0; i < radiusPlus1; i++)
                {
                    stack.a = pa;
                    stack.r = pr;
                    stack.g = pg;
                    stack.b = pb;
                    stack   = stack.next;
                }
            }
Example #5
0
 public BlurStackState(int div, int radiusPlus1)
 {
     this.radiusPlus1 = radiusPlus1;
     stack            = stackStart;
     for (int i = 1; i < div; i++)
     {
         stack = stack.next = new BlurStack();
         if (i == radiusPlus1)
         {
             stackEnd = stack;
         }
     }
     stack.next = stackStart;
 }
Example #6
0
 public void Prepare(int count, int r, int g, int b, int a)
 {
     this.currentHeadIndex = 0;
     this.currentTailIndex = size - 1;
     for (int i = 0; i < count; ++i)
     {
         blurValues[i] = new BlurStack((byte)r, (byte)g, (byte)b, (byte)a);
         this.Next();
     }
 }
Example #7
0
 public CircularBlurStack(int size)
 {
     this.size = size;
     this.blurValues = new BlurStack[size];
     this.currentHeadIndex = 0;
     this.currentTailIndex = size - 1;
     for (int i = size - 1; i >= 0; --i)
     {
         blurValues[i] = new BlurStack();
     }
 }