summaryrefslogtreecommitdiff
path: root/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Mask
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Mask')
-rw-r--r--Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Mask/RectMask2D.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Mask/RectMask2D.cs b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Mask/RectMask2D.cs
index 87d2dbf..5f8f2e7 100644
--- a/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Mask/RectMask2D.cs
+++ b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Mask/RectMask2D.cs
@@ -22,6 +22,7 @@ namespace UnityEngine.UI
[NonSerialized]
private bool m_ShouldRecalculateClipRects;
+ // 父节点的所有RectMask2D,用来算交集
[NonSerialized]
private List<RectMask2D> m_Clippers = new List<RectMask2D>();
@@ -101,7 +102,7 @@ namespace UnityEngine.UI
public virtual void PerformClipping()
{
//TODO See if an IsActive() test would work well here or whether it might cause unexpected side effects (re case 776771)
-
+
// if the parents are changed
// or something similar we
// do a recalculate here
@@ -111,6 +112,8 @@ namespace UnityEngine.UI
m_ShouldRecalculateClipRects = false;
}
+ // 裁剪
+
// get the compound rects from
// the clippers that are valid
bool validRect = true;
@@ -125,6 +128,8 @@ namespace UnityEngine.UI
m_LastValidClipRect = validRect;
}
+ // 剔除
+
foreach (IClippable clipTarget in m_ClipTargets)
{
var maskable = clipTarget as MaskableGraphic;