class WXResourceUtils {

  public static Shader getShader(String image, float width, float height) {
    List<String> valueList = parseGradientValues(image);
    if (valueList != null && valueList.size() == 3) {
      float[] points = parseGradientDirection(valueList.get(0), width, height);
      Shader shader = new LinearGradient(points[0], points[1],
                                         points[2], points[3],
                                         getColor(valueList.get(1), Color.WHITE), getColor(valueList.get(2), Color.WHITE),
                                         Shader.TileMode.REPEAT);
      return shader;
    }
    return null;
  }

}