Example #1
0
        public static void DrawBox(Rect position)
        {
            Vector3[] array = new Vector3[5];
            int       num   = 0;

            array[num++] = new Vector3(position.xMin, position.yMin, 0f);
            array[num++] = new Vector3(position.xMax, position.yMin, 0f);
            array[num++] = new Vector3(position.xMax, position.yMax, 0f);
            array[num++] = new Vector3(position.xMin, position.yMax, 0f);
            SVGEditorUtility.DrawLine(array[0], array[1]);
            SVGEditorUtility.DrawLine(array[1], array[2]);
            SVGEditorUtility.DrawLine(array[2], array[3]);
            SVGEditorUtility.DrawLine(array[3], array[0]);
        }
        protected void DrawTexturespaceBackground()
        {
            float   num  = Mathf.Max(this.maxRect.width, this.maxRect.height);
            Vector2 b    = new Vector2(this.maxRect.xMin, this.maxRect.yMin);
            float   num2 = num * 0.5f;
            float   a    = (!EditorGUIUtility.isProSkin) ? 0.08f : 0.15f;
            float   num3 = 8f;

            SVGEditorUtility.BeginLines(new Color(0f, 0f, 0f, a));
            for (float num4 = 0f; num4 <= num; num4 += num3)
            {
                SVGEditorUtility.DrawLine(new Vector2(-num2 + num4, num2 + num4) + b, new Vector2(num2 + num4, -num2 + num4) + b);
            }
            SVGEditorUtility.EndLines();
        }