public static FillHorizontal ( OriginHorizontal origin, float amount, |
||
origin | OriginHorizontal | |
amount | float | |
vertRect | ||
uvRect | ||
verts | ||
uv | ||
리턴 | void |
public void Fill(FillMethod method, float amount, int origin, bool clockwise, Rect vertRect, Rect uvRect) { amount = Mathf.Clamp01(amount); switch (method) { case FillMethod.Horizontal: Alloc(4); FillUtils.FillHorizontal((OriginHorizontal)origin, amount, vertRect, uvRect, vertices, uv); break; case FillMethod.Vertical: Alloc(4); FillUtils.FillVertical((OriginVertical)origin, amount, vertRect, uvRect, vertices, uv); break; case FillMethod.Radial90: Alloc(4); FillUtils.FillRadial90((Origin90)origin, amount, clockwise, vertRect, uvRect, vertices, uv); break; case FillMethod.Radial180: Alloc(8); FillUtils.FillRadial180((Origin180)origin, amount, clockwise, vertRect, uvRect, vertices, uv); break; case FillMethod.Radial360: Alloc(12); FillUtils.FillRadial360((Origin360)origin, amount, clockwise, vertRect, uvRect, vertices, uv); break; } }
/// <summary> /// /// </summary> /// <param name="vertRect"></param> /// <param name="uvRect"></param> /// <param name="method"></param> /// <param name="amount"></param> /// <param name="origin"></param> /// <param name="clockwise"></param> public void DrawRectWithFillMethod(Rect vertRect, Rect uvRect, Color fillColor, FillMethod method, float amount, int origin, bool clockwise) { amount = Mathf.Clamp01(amount); switch (method) { case FillMethod.Horizontal: Alloc(4); FillUtils.FillHorizontal((OriginHorizontal)origin, amount, vertRect, uvRect, vertices, uv); break; case FillMethod.Vertical: Alloc(4); FillUtils.FillVertical((OriginVertical)origin, amount, vertRect, uvRect, vertices, uv); break; case FillMethod.Radial90: Alloc(4); FillUtils.FillRadial90((Origin90)origin, amount, clockwise, vertRect, uvRect, vertices, uv); break; case FillMethod.Radial180: Alloc(8); FillUtils.FillRadial180((Origin180)origin, amount, clockwise, vertRect, uvRect, vertices, uv); break; case FillMethod.Radial360: Alloc(12); FillUtils.FillRadial360((Origin360)origin, amount, clockwise, vertRect, uvRect, vertices, uv); break; } FillColors(fillColor); FillTriangles(); }