Advertisement
Guest User

Untitled

a guest
Nov 12th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.82 KB | None | 0 0
  1. bool isBetween(int x, int L, int R)
  2.         {
  3.             return x >= L && x <= R;
  4.         }
  5.         //------------------
  6.         //------------------
  7.         public void Efekt3()
  8.         {
  9.             if (p == K)
  10.                 p = 0;
  11.  
  12.             for (int j = 1; j <= L - p * 2; j++)
  13.             {
  14.                 for (int i = 1; i <= K; i++)
  15.                 {
  16.                     ReadPixel(i, j);
  17.                 }
  18.             }
  19.  
  20.            
  21.             int x = 0;
  22.  
  23.             for (int j = L - p * 2 + 1; j <= L; j++)
  24.             {
  25.                 for (int i = 1; i <= x; i++)
  26.                 {
  27.                     if (isBetween(i, 1, L) && isBetween(j, 1, L))
  28.                         ReadTlo(N);
  29.                 }
  30.  
  31.                 for (int i = x + 1; i <= p * 2; i++)
  32.                 {
  33.                     if (isBetween(i, 1, L) && isBetween(j, 1, L))
  34.                         ReadPixel(i, j);
  35.                 }
  36.  
  37.                 for (int i = p * 2 + 1; i <= K; i++)
  38.                 {
  39.                     ReadPixel(i, j);
  40.                 }
  41.  
  42.                 x++;
  43.             }
  44.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement