UnityEditor.SpriteEditorWindow.DrawGizmos C# (CSharp) Method

DrawGizmos() protected method

protected DrawGizmos ( ) : void
return void
        protected override void DrawGizmos()
        {
            SpriteEditorUtility.BeginLines(new Color(0f, 0f, 0f, 0.25f));
            for (int i = 0; i < this.m_RectsCache.Count; i++)
            {
                Rect rect = this.m_RectsCache.RectAt(i).m_Rect;
                if (this.m_RectsCache.RectAt(i) != this.selected)
                {
                    SpriteEditorUtility.DrawBox(new Rect(rect.xMin + (1f / base.m_Zoom), rect.yMin + (1f / base.m_Zoom), rect.width, rect.height));
                }
            }
            SpriteEditorUtility.EndLines();
            SpriteEditorUtility.BeginLines(new Color(1f, 1f, 1f, 0.5f));
            for (int j = 0; j < this.m_RectsCache.Count; j++)
            {
                if (this.m_RectsCache.RectAt(j) != this.selected)
                {
                    SpriteEditorUtility.DrawBox(this.m_RectsCache.RectAt(j).m_Rect);
                }
            }
            SpriteEditorUtility.EndLines();
            SpriteEditorUtility.BeginLines(new Color(0f, 1f, 0f, 0.7f));
            for (int k = 0; k < this.m_RectsCache.Count; k++)
            {
                SpriteRect currentRect = this.m_RectsCache.RectAt(k);
                if (this.ShouldDrawBorders(currentRect))
                {
                    Vector4 border = currentRect.m_Border;
                    Rect rect3 = currentRect.m_Rect;
                    SpriteEditorUtility.DrawLine(new Vector3(rect3.xMin + border.x, rect3.yMin), new Vector3(rect3.xMin + border.x, rect3.yMax));
                    SpriteEditorUtility.DrawLine(new Vector3(rect3.xMax - border.z, rect3.yMin), new Vector3(rect3.xMax - border.z, rect3.yMax));
                    SpriteEditorUtility.DrawLine(new Vector3(rect3.xMin, rect3.yMin + border.y), new Vector3(rect3.xMax, rect3.yMin + border.y));
                    SpriteEditorUtility.DrawLine(new Vector3(rect3.xMin, rect3.yMax - border.w), new Vector3(rect3.xMax, rect3.yMax - border.w));
                }
            }
            SpriteEditorUtility.EndLines();
            if (this.ShouldShowRectScaling())
            {
                Rect position = this.selected.m_Rect;
                SpriteEditorUtility.BeginLines(new Color(0f, 0.1f, 0.3f, 0.25f));
                SpriteEditorUtility.DrawBox(new Rect(position.xMin + (1f / base.m_Zoom), position.yMin + (1f / base.m_Zoom), position.width, position.height));
                SpriteEditorUtility.EndLines();
                SpriteEditorUtility.BeginLines(new Color(0.25f, 0.5f, 1f, 0.75f));
                SpriteEditorUtility.DrawBox(position);
                SpriteEditorUtility.EndLines();
            }
        }