Beispiel #1
0
 public void BlendLineShallow(int col, OutputMatrix out_)
 {
     AlphaBlend(1, 4, out_.Ref(Scale - 1, 0), col);
     AlphaBlend(1, 4, out_.Ref(Scale - 2, 2), col);
     AlphaBlend(3, 4, out_.Ref(Scale - 1, 1), col);
     out_.Ref(Scale - 1, 2).Set(col);
 }
Beispiel #2
0
 public void BlendLineSteep(int col, OutputMatrix out_)
 {
     AlphaBlend(1, 4, out_.Ref(0, Scale - 1), col);
     AlphaBlend(1, 4, out_.Ref(2, Scale - 2), col);
     AlphaBlend(3, 4, out_.Ref(1, Scale - 1), col);
     out_.Ref(2, Scale - 1).Set(col);
 }
Beispiel #3
0
 public void BlendCorner(int col, OutputMatrix out_)
 {
     //model a round corner
     AlphaBlend(68, 100, out_.Ref(3, 3), col); //exact: 0.6848532563
     AlphaBlend(9, 100, out_.Ref(3, 2), col);  //0.08677704501
     AlphaBlend(9, 100, out_.Ref(2, 3), col);  //0.08677704501
 }
Beispiel #4
0
 public void BlendCorner(int col, OutputMatrix out_)
 {
     //model a round corner
     AlphaBlend(45, 100, out_.Ref(2, 2), col); //exact: 0.4545939598
                                               //alphaBlend(14, 1000, out.ref(2, 1), col); //0.01413008627 -> negligable
                                               //alphaBlend(14, 1000, out.ref(1, 2), col); //0.01413008627
 }
Beispiel #5
0
 public void BlendLineSteepAndShallow(int col, OutputMatrix out_)
 {
     AlphaBlend(1, 4, out_.Ref(2, 0), col);
     AlphaBlend(1, 4, out_.Ref(0, 2), col);
     AlphaBlend(3, 4, out_.Ref(2, 1), col);
     AlphaBlend(3, 4, out_.Ref(1, 2), col);
     out_.Ref(2, 2).Set(col);
 }
Beispiel #6
0
 public void BlendCorner(int col, OutputMatrix out_)
 {
     //model a round corner
     AlphaBlend(86, 100, out_.Ref(4, 4), col); //exact: 0.8631434088
     AlphaBlend(23, 100, out_.Ref(4, 3), col); //0.2306749731
     AlphaBlend(23, 100, out_.Ref(3, 4), col); //0.2306749731
                                               //alphaBlend(8, 1000, out.ref(4, 2), col); //0.008384061834 -> negligable
                                               //alphaBlend(8, 1000, out.ref(2, 4), col); //0.008384061834
 }
Beispiel #7
0
 public void BlendLineDiagonal(int col, OutputMatrix out_)
 {
     AlphaBlend(1, 8, out_.Ref(Scale - 1, Scale / 2), col);
     AlphaBlend(1, 8, out_.Ref(Scale - 2, Scale / 2 + 1), col);
     AlphaBlend(1, 8, out_.Ref(Scale - 3, Scale / 2 + 2), col);
     AlphaBlend(7, 8, out_.Ref(4, 3), col);
     AlphaBlend(7, 8, out_.Ref(3, 4), col);
     out_.Ref(4, 4).Set(col);
 }
Beispiel #8
0
 public void BlendLineSteepAndShallow(int col, OutputMatrix out_)
 {
     AlphaBlend(3, 4, out_.Ref(3, 1), col);
     AlphaBlend(3, 4, out_.Ref(1, 3), col);
     AlphaBlend(1, 4, out_.Ref(3, 0), col);
     AlphaBlend(1, 4, out_.Ref(0, 3), col);
     AlphaBlend(1, 3, out_.Ref(2, 2), col); //[!] fixes 1/4 used in xBR
     out_.Ref(3, 3).Set(col);
     out_.Ref(3, 2).Set(col);
     out_.Ref(2, 3).Set(col);
 }
Beispiel #9
0
 public void BlendLineSteepAndShallow(int col, OutputMatrix out_)
 {
     AlphaBlend(1, 4, out_.Ref(0, Scale - 1), col);
     AlphaBlend(1, 4, out_.Ref(2, Scale - 2), col);
     AlphaBlend(3, 4, out_.Ref(1, Scale - 1), col);
     AlphaBlend(1, 4, out_.Ref(Scale - 1, 0), col);
     AlphaBlend(1, 4, out_.Ref(Scale - 2, 2), col);
     AlphaBlend(3, 4, out_.Ref(Scale - 1, 1), col);
     out_.Ref(2, Scale - 1).Set(col);
     out_.Ref(3, Scale - 1).Set(col);
     out_.Ref(Scale - 1, 2).Set(col);
     out_.Ref(Scale - 1, 3).Set(col);
     out_.Ref(4, Scale - 1).Set(col);
     AlphaBlend(2, 3, out_.Ref(3, 3), col);
 }
Beispiel #10
0
 public void BlendCorner(int col, OutputMatrix out_)
 {
     //model a round corner
     AlphaBlend(21, 100, out_.Ref(1, 1), col); //exact: 1 - pi/4 = 0.2146018366
 }
Beispiel #11
0
 public void BlendLineDiagonal(int col, OutputMatrix out_)
 {
     AlphaBlend(1, 2, out_.Ref(1, 1), col);
 }
Beispiel #12
0
 public void BlendLineSteepAndShallow(int col, OutputMatrix out_)
 {
     AlphaBlend(1, 4, out_.Ref(1, 0), col);
     AlphaBlend(1, 4, out_.Ref(0, 1), col);
     AlphaBlend(5, 6, out_.Ref(1, 1), col); //[!] fixes 7/8 used in xBR
 }
Beispiel #13
0
 public void BlendLineDiagonal(int col, OutputMatrix out_)
 {
     AlphaBlend(1, 2, out_.Ref(Scale - 1, Scale / 2), col);
     AlphaBlend(1, 2, out_.Ref(Scale - 2, Scale / 2 + 1), col);
     out_.Ref(Scale - 1, Scale - 1).Set(col);
 }