protected virtual void OnCanvasGUI()
        {
            GUI.BeginClip(clipRect);
            GlobalMousePosition = Event.current.mousePosition;
            Rect r = new Rect(Vector2.zero, clipRect.size);

            RootCanvas.LocalRect   = r;
            ScaledCanvas.LocalRect = r;
            RootCanvas.OnCalculateGlobalRect(true, r);
            OnResized();
            RootCanvas.OnGUI(r);
            OnPainted();
            GUI.EndClip();
        }