Exemplo n.º 1
0
        private static void GetCurrentTransformAndClip(IMGUIContainer container, Event evt, out Matrix4x4 transform, out Rect clipRect)
        {
            clipRect  = container.GetCurrentClipRect();
            transform = container.worldTransform;
            bool flag = evt.rawType == EventType.Repaint && container.elementPanel != null;

            if (flag)
            {
                transform = container.elementPanel.repaintData.currentOffset * container.worldTransform;
            }
        }
Exemplo n.º 2
0
        private static void GetCurrentTransformAndClip(IMGUIContainer container, Event evt, out Matrix4x4 transform, out Rect clipRect)
        {
            clipRect = container.GetCurrentClipRect();

            transform = container.worldTransform;
            if (evt?.rawType == EventType.Repaint &&
                container.elementPanel != null)
            {
                // during repaint, we must use in case the current transform is not relative to Panel
                // this is to account for the pixel caching feature
                transform = container.elementPanel.repaintData.currentOffset * container.worldTransform;
            }
        }