Fixed overlapping vertex redraws
parent
387d85f775
commit
172775a8f7
|
@ -153,6 +153,7 @@ namespace UnityEngine.UI.Extensions
|
|||
{
|
||||
Vector2 reversedVector = _topRightCurvedVert[i];
|
||||
reversedVector.y = -reversedVector.y - pivotOffsetYTimesTwo;
|
||||
//reversedVector.x = reversedVector.x + pivotOffsetXTimesTwo;
|
||||
vert.Add(reversedVector);
|
||||
}
|
||||
}
|
||||
|
@ -167,9 +168,14 @@ namespace UnityEngine.UI.Extensions
|
|||
}
|
||||
}
|
||||
|
||||
//Reset the vertex pointer to center
|
||||
vert.Add(new Vector2(-pivotOffsetX, -pivotOffsetY));
|
||||
|
||||
if (corners.bottomLeft)
|
||||
{
|
||||
//vert.AddRange(_topRightCurvedVert.AsEnumerable().Reverse().Select(t => new Vector2(-t.x - pivotOffsetXTimesTwo, -t.y - pivotOffsetYTimesTwo)));
|
||||
|
||||
|
||||
for (int i = _topRightCurvedVert.Count - 1; i >= 0; i--)
|
||||
{
|
||||
Vector2 reversedVector = _topRightCurvedVert[i];
|
||||
|
@ -190,6 +196,9 @@ namespace UnityEngine.UI.Extensions
|
|||
}
|
||||
}
|
||||
|
||||
//Reset the vertex pointer to center
|
||||
vert.Add(new Vector2(-pivotOffsetX, -pivotOffsetY));
|
||||
|
||||
if (corners.topLeft)
|
||||
{
|
||||
//vert.AddRange(_topRightCurvedVert.AsEnumerable().Reverse().Select(t => new Vector2(-t.x - pivotOffsetXTimesTwo, t.y)));
|
||||
|
|
Loading…
Reference in New Issue