Ejemplo n.º 1
0
 internal static void MakeRect(RectStylePainterParameters rectParams, float posZ, AllocMeshData meshAlloc)
 {
     if (IsSimpleRect(rectParams.border))
     {
         MakeQuad(rectParams.rect, Rect.zero, rectParams.color, posZ, VertexFlags.IsSolid, meshAlloc);
     }
     else
     {
         UIRTessellation.TessellateBorderedRect(rectParams.rect, Rect.zero, rectParams.color, rectParams.border, posZ, VertexFlags.IsSolid, meshAlloc);
     }
 }
Ejemplo n.º 2
0
 internal static void MakeTexture(TextureStylePainterParameters textureParams, float posZ, VertexFlags vertexFlags, AllocMeshData meshAlloc)
 {
     if (textureParams.sliceLeft <= Mathf.Epsilon &&
         textureParams.sliceTop <= Mathf.Epsilon &&
         textureParams.sliceRight <= Mathf.Epsilon &&
         textureParams.sliceBottom <= Mathf.Epsilon)
     {
         if (IsSimpleRect(textureParams.border))
         {
             MakeQuad(textureParams.rect, textureParams.uv, textureParams.color, posZ, vertexFlags, meshAlloc);
         }
         else
         {
             UIRTessellation.TessellateBorderedRect(textureParams.rect, textureParams.uv, textureParams.color, textureParams.border, posZ, vertexFlags, meshAlloc);
         }
     }
     else
     {
         MakeSlicedQuad(textureParams, posZ, vertexFlags, meshAlloc);
     }
 }