public static RVIShape CreatePolygon(RVIVector2[] vertexList, int color32) { RVIShape result = new RVIShape(); result.Color32 = color32; result.VertexList.AddRange(vertexList); return(result); }
public static RVIShape CreateLine(RVIVector2 posA, RVIVector2 posB, int color32) { RVIShape result = new RVIShape(); result.VertexList.Add(posA); result.VertexList.Add(posB); result.Color32 = color32; return(result); }
public static RVIShape CreateRect(RVIRectangle rect, int color32) { RVIVector2 v1 = new RVIVector2(rect.x, rect.y); RVIVector2 v2 = new RVIVector2(rect.x + rect.w, rect.y); RVIVector2 v3 = new RVIVector2(rect.x + rect.w, rect.y + rect.h); RVIVector2 v4 = new RVIVector2(rect.x, rect.y + rect.h); RVIShape result = new RVIShape(); result.VertexList.Add(v1); result.VertexList.Add(v2); result.VertexList.Add(v3); result.VertexList.Add(v4); result.VertexList.Add(v1); result.VertexList.Add(v4); result.VertexList.Add(v3); result.VertexList.Add(v2); result.Color32 = color32; return(result); }