UnityEditor.SpriteEditorWindow.HandleRectCornerScalingHandles C# (CSharp) Method

HandleRectCornerScalingHandles() private method

private HandleRectCornerScalingHandles ( ) : void
return void
        private void HandleRectCornerScalingHandles()
        {
            if (this.selected != null)
            {
                GUIStyle dragdot = SpriteUtilityWindow.s_Styles.dragdot;
                GUIStyle dragdotactive = SpriteUtilityWindow.s_Styles.dragdotactive;
                Color white = Color.white;
                Rect rect = new Rect(this.selected.m_Rect);
                float xMin = rect.xMin;
                float xMax = rect.xMax;
                float yMax = rect.yMax;
                float yMin = rect.yMin;
                EditorGUI.BeginChangeCheck();
                this.HandleBorderPointSlider(ref xMin, ref yMax, MouseCursor.ResizeUpLeft, false, dragdot, dragdotactive, white);
                this.HandleBorderPointSlider(ref xMax, ref yMax, MouseCursor.ResizeUpRight, false, dragdot, dragdotactive, white);
                this.HandleBorderPointSlider(ref xMin, ref yMin, MouseCursor.ResizeUpRight, false, dragdot, dragdotactive, white);
                this.HandleBorderPointSlider(ref xMax, ref yMin, MouseCursor.ResizeUpLeft, false, dragdot, dragdotactive, white);
                if (EditorGUI.EndChangeCheck())
                {
                    Undo.RegisterCompleteObjectUndo(this.m_RectsCache, "Scale sprite");
                    rect.xMin = xMin;
                    rect.xMax = xMax;
                    rect.yMax = yMax;
                    rect.yMin = yMin;
                    this.selected.m_Rect = this.ClampSpriteRect(rect);
                    this.selected.m_Border = this.ClampSpriteBorder(this.selected.m_Border);
                    this.textureIsDirty = true;
                }
                if (GUIUtility.hotControl == 0)
                {
                    this.selected.m_Rect = this.FlipNegativeRect(this.selected.m_Rect);
                    this.selected.m_Border = this.ClampSpriteBorder(this.selected.m_Border);
                }
            }
        }