Пример #1
0
 private void Awake()
 {
     maxIterations = PlayerPrefs.iteration;
     drawingMode   = PlayerPrefs.drawingMode;
     colorMap      = new ColorMap(drawingMode);
     texture       = new Texture2D(PlayerPrefs.ScreenSize, PlayerPrefs.ScreenSize);
     GetComponent <Renderer>().material.mainTexture = texture;
     rowMax = (int)Mathf.Sqrt(2 * texture.height);
 }
Пример #2
0
    public ColorMap(drawingMode mode)
    {
        colors = new List <Color>();
        float step = 1 / 255f;

        if (mode.Equals(drawingMode.NORMAL))
        {
            for (int i = 0; i < 127; i += 5)
            {
                for (int k = 0; k < 127; k += 5)
                {
                    for (int j = 0; j < 127; j += 5)
                    {
                        colors.Add(new Color(i * step, k * step, j * step));
                    }
                }
            }
        }

        else if (mode.Equals(drawingMode.WTF))
        {
            for (int i = 0; i < 255; i++)
            {
                colors.Add(new Color(i * step, 1 - (i * step), 1 - (i * step)));
                colors.Add(new Color(1 - (i * step), i * step, 1 - (i * step)));
                colors.Add(new Color(1 - (i * step), 1 - (i * step), i * step));
            }
        }
        else if (mode.Equals(drawingMode.ANOTHER))
        {
            for (int i = 0; i < 255; i++)
            {
                colors.Add(new Color(i * step, 0, 0));
                colors.Add(new Color(0, i * step, 0));
                colors.Add(new Color(0, 0, i * step));
            }
        }
    }
Пример #3
0
        private static extern int SetROP2(
            IntPtr hdc,            // handle of device context

            drawingMode fnDrawMode // drawing mode

            );
Пример #4
0
 public int SetROP2(drawingMode fnDrawMode)
 {
     return(SetROP2(hdc, fnDrawMode));
 }
Пример #5
0
 public static extern int SetROP2(IntPtr hdc, drawingMode fnDrawMode);
Пример #6
0
 public int SetROP2(drawingMode fnDrawMode)
 {
     return SetROP2(hdc,fnDrawMode);
 }
Пример #7
0
 public static extern int SetROP2(IntPtr hdc, drawingMode fnDrawMode);
Пример #8
0
        public static extern int SetROP2(
            IntPtr hdc,         // handle of device context

            drawingMode fnDrawMode      // drawing mode

            );  
Пример #9
0
 public int SetROP2(drawingMode fnDrawMode)
 {
     return(GDI.SetROP2(this.hdc, fnDrawMode));
 }