forked from MattRix/UnityDecompiled
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOutline.cs
More file actions
42 lines (40 loc) · 1.19 KB
/
Outline.cs
File metadata and controls
42 lines (40 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System;
using System.Collections.Generic;
namespace UnityEngine.UI
{
[AddComponentMenu("UI/Effects/Outline", 15)]
public class Outline : Shadow
{
protected Outline()
{
}
public override void ModifyMesh(VertexHelper vh)
{
if (this.IsActive())
{
List<UIVertex> list = ListPool<UIVertex>.Get();
vh.GetUIVertexStream(list);
int num = list.Count * 5;
if (list.Capacity < num)
{
list.Capacity = num;
}
int start = 0;
int count = list.Count;
base.ApplyShadowZeroAlloc(list, base.effectColor, start, list.Count, base.effectDistance.x, base.effectDistance.y);
start = count;
count = list.Count;
base.ApplyShadowZeroAlloc(list, base.effectColor, start, list.Count, base.effectDistance.x, -base.effectDistance.y);
start = count;
count = list.Count;
base.ApplyShadowZeroAlloc(list, base.effectColor, start, list.Count, -base.effectDistance.x, base.effectDistance.y);
start = count;
count = list.Count;
base.ApplyShadowZeroAlloc(list, base.effectColor, start, list.Count, -base.effectDistance.x, -base.effectDistance.y);
vh.Clear();
vh.AddUIVertexTriangleStream(list);
ListPool<UIVertex>.Release(list);
}
}
}
}