test_class.file: CustomShapeImageViewlibrary/src/test/java/com/svgandroid/SVGParserTest.java
test_class.identifier: SVGParserTest
test_class.superclass: extends SVGTestSupport
test_case.body: @Test
      public void parseNumbers() {
          String numbers = "10.0  -10.0-1f";
          SVGParser.NumberParse numberParse = SVGParser.parseNumbers(numbers);
          assertThat(numberParse.getNumber(0), is(10.0f));
          assertThat(numberParse.getNumber(1), is(-10.0f));
          assertThat(numberParse.getNumber(2), is(-1.0f));
          assertThat(numberParse.getNextCmd(), is(numbers.length()));
      }
test_case.class_method_signature: SVGParserTest.parseNumbers()
test_case.full_signature: @Test public void parseNumbers()
test_case.identifier: parseNumbers
test_case.invocations: parseNumbers assertThat getNumber is assertThat getNumber is assertThat getNumber is assertThat getNextCmd is length
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void parseNumbers()
focal_class.declarator: TAG = "SVGAndroid"
focal_class.modifier: static final
focal_class.original_string: static final String TAG = "SVGAndroid";
focal_class.type: String
focal_class.var_name: TAG
focal_class.file: CustomShapeImageViewlibrary/src/main/java/com/svgandroid/SVGParser.java
focal_class.identifier: SVGParser
focal_class.class_method_signature: SVGParser.getSVGFromInputStream(InputStream svgData)
focal_class.full_signature: public static SVG getSVGFromInputStream(InputStream svgData)
focal_class.identifier: getSVGFromInputStream
focal_class.modifiers: public static
focal_class.parameters: (InputStream svgData)
focal_class.return: SVG
focal_class.signature: SVG getSVGFromInputStream(InputStream svgData)
focal_class.class_method_signature: SVGParser.getSVGFromInputStream(InputStream svgData, int targetWidth, int targetHeight)
focal_class.full_signature: public static SVG getSVGFromInputStream(InputStream svgData, int targetWidth, int targetHeight)
focal_class.identifier: getSVGFromInputStream
focal_class.modifiers: public static
focal_class.parameters: (InputStream svgData, int targetWidth, int targetHeight)
focal_class.return: SVG
focal_class.signature: SVG getSVGFromInputStream(InputStream svgData, int targetWidth, int targetHeight)
focal_class.class_method_signature: SVGParser.getSVGFromResource(Resources resources, int resId)
focal_class.full_signature: public static SVG getSVGFromResource(Resources resources, int resId)
focal_class.identifier: getSVGFromResource
focal_class.modifiers: public static
focal_class.parameters: (Resources resources, int resId)
focal_class.return: SVG
focal_class.signature: SVG getSVGFromResource(Resources resources, int resId)
focal_class.class_method_signature: SVGParser.getSVGFromAsset(AssetManager assetMngr, String svgPath)
focal_class.full_signature: public static SVG getSVGFromAsset(AssetManager assetMngr, String svgPath)
focal_class.identifier: getSVGFromAsset
focal_class.modifiers: public static
focal_class.parameters: (AssetManager assetMngr, String svgPath)
focal_class.return: SVG
focal_class.signature: SVG getSVGFromAsset(AssetManager assetMngr, String svgPath)
focal_class.class_method_signature: SVGParser.getSVGFromInputStream(InputStream svgData, int searchColor, int replaceColor,
                                              int targetWidth, int targetHeight)
focal_class.full_signature: public static SVG getSVGFromInputStream(InputStream svgData, int searchColor, int replaceColor,
                                              int targetWidth, int targetHeight)
focal_class.identifier: getSVGFromInputStream
focal_class.modifiers: public static
focal_class.parameters: (InputStream svgData, int searchColor, int replaceColor,
                                              int targetWidth, int targetHeight)
focal_class.return: SVG
focal_class.signature: SVG getSVGFromInputStream(InputStream svgData, int searchColor, int replaceColor,
                                              int targetWidth, int targetHeight)
focal_class.class_method_signature: SVGParser.getSVGFromString(String svgData, int searchColor, int replaceColor)
focal_class.full_signature: public static SVG getSVGFromString(String svgData, int searchColor, int replaceColor)
focal_class.identifier: getSVGFromString
focal_class.modifiers: public static
focal_class.parameters: (String svgData, int searchColor, int replaceColor)
focal_class.return: SVG
focal_class.signature: SVG getSVGFromString(String svgData, int searchColor, int replaceColor)
focal_class.class_method_signature: SVGParser.getSVGFromResource(Resources resources, int resId, int searchColor, int replaceColor)
focal_class.full_signature: public static SVG getSVGFromResource(Resources resources, int resId, int searchColor, int replaceColor)
focal_class.identifier: getSVGFromResource
focal_class.modifiers: public static
focal_class.parameters: (Resources resources, int resId, int searchColor, int replaceColor)
focal_class.return: SVG
focal_class.signature: SVG getSVGFromResource(Resources resources, int resId, int searchColor, int replaceColor)
focal_class.class_method_signature: SVGParser.getSVGFromAsset(AssetManager assetMngr, String svgPath, int searchColor, int replaceColor)
focal_class.full_signature: public static SVG getSVGFromAsset(AssetManager assetMngr, String svgPath, int searchColor, int replaceColor)
focal_class.identifier: getSVGFromAsset
focal_class.modifiers: public static
focal_class.parameters: (AssetManager assetMngr, String svgPath, int searchColor, int replaceColor)
focal_class.return: SVG
focal_class.signature: SVG getSVGFromAsset(AssetManager assetMngr, String svgPath, int searchColor, int replaceColor)
focal_class.class_method_signature: SVGParser.parsePath(String pathString)
focal_class.full_signature: public static Path parsePath(String pathString)
focal_class.identifier: parsePath
focal_class.modifiers: public static
focal_class.parameters: (String pathString)
focal_class.return: Path
focal_class.signature: Path parsePath(String pathString)
focal_class.class_method_signature: SVGParser.parse(InputStream in, Integer searchColor, Integer replaceColor, boolean whiteMode,
                               int targetWidth, int targetHeight)
focal_class.full_signature: private static SVG parse(InputStream in, Integer searchColor, Integer replaceColor, boolean whiteMode,
                               int targetWidth, int targetHeight)
focal_class.identifier: parse
focal_class.modifiers: private static
focal_class.parameters: (InputStream in, Integer searchColor, Integer replaceColor, boolean whiteMode,
                               int targetWidth, int targetHeight)
focal_class.return: SVG
focal_class.signature: SVG parse(InputStream in, Integer searchColor, Integer replaceColor, boolean whiteMode,
                               int targetWidth, int targetHeight)
focal_class.class_method_signature: SVGParser.parse(InputStream in, Integer searchColor, Integer replaceColor, boolean whiteMode)
focal_class.full_signature: private static SVG parse(InputStream in, Integer searchColor, Integer replaceColor, boolean whiteMode)
focal_class.identifier: parse
focal_class.modifiers: private static
focal_class.parameters: (InputStream in, Integer searchColor, Integer replaceColor, boolean whiteMode)
focal_class.return: SVG
focal_class.signature: SVG parse(InputStream in, Integer searchColor, Integer replaceColor, boolean whiteMode)
focal_class.class_method_signature: SVGParser.parseNumbers(String s)
focal_class.full_signature: protected static NumberParse parseNumbers(String s)
focal_class.identifier: parseNumbers
focal_class.modifiers: protected static
focal_class.parameters: (String s)
focal_class.return: NumberParse
focal_class.signature: NumberParse parseNumbers(String s)
focal_class.class_method_signature: SVGParser.parseTransform(String s)
focal_class.full_signature: private static Matrix parseTransform(String s)
focal_class.identifier: parseTransform
focal_class.modifiers: private static
focal_class.parameters: (String s)
focal_class.return: Matrix
focal_class.signature: Matrix parseTransform(String s)
focal_class.class_method_signature: SVGParser.doPath(String s)
focal_class.full_signature: private static Path doPath(String s)
focal_class.identifier: doPath
focal_class.modifiers: private static
focal_class.parameters: (String s)
focal_class.return: Path
focal_class.signature: Path doPath(String s)
focal_class.class_method_signature: SVGParser.getNumberParseAttr(String name, Attributes attributes)
focal_class.full_signature: private static NumberParse getNumberParseAttr(String name, Attributes attributes)
focal_class.identifier: getNumberParseAttr
focal_class.modifiers: private static
focal_class.parameters: (String name, Attributes attributes)
focal_class.return: NumberParse
focal_class.signature: NumberParse getNumberParseAttr(String name, Attributes attributes)
focal_class.class_method_signature: SVGParser.getStringAttr(String name, Attributes attributes)
focal_class.full_signature: private static String getStringAttr(String name, Attributes attributes)
focal_class.identifier: getStringAttr
focal_class.modifiers: private static
focal_class.parameters: (String name, Attributes attributes)
focal_class.return: String
focal_class.signature: String getStringAttr(String name, Attributes attributes)
focal_class.class_method_signature: SVGParser.getFloatAttr(String name, Attributes attributes)
focal_class.full_signature: private static Float getFloatAttr(String name, Attributes attributes)
focal_class.identifier: getFloatAttr
focal_class.modifiers: private static
focal_class.parameters: (String name, Attributes attributes)
focal_class.return: Float
focal_class.signature: Float getFloatAttr(String name, Attributes attributes)
focal_class.class_method_signature: SVGParser.getFloatAttr(String name, Attributes attributes, Float defaultValue)
focal_class.full_signature: private static Float getFloatAttr(String name, Attributes attributes, Float defaultValue)
focal_class.identifier: getFloatAttr
focal_class.modifiers: private static
focal_class.parameters: (String name, Attributes attributes, Float defaultValue)
focal_class.return: Float
focal_class.signature: Float getFloatAttr(String name, Attributes attributes, Float defaultValue)
focal_class.class_method_signature: SVGParser.getHexAttr(String name, Attributes attributes)
focal_class.full_signature: protected static Integer getHexAttr(String name, Attributes attributes)
focal_class.identifier: getHexAttr
focal_class.modifiers: protected static
focal_class.parameters: (String name, Attributes attributes)
focal_class.return: Integer
focal_class.signature: Integer getHexAttr(String name, Attributes attributes)
focal_method.body: protected static NumberParse parseNumbers(String s) {
          //Util.debug("Parsing numbers from: '" + s + "'");
          int n = s.length();
          int p = 0;
          ArrayList<Float> numbers = new ArrayList<Float>();
          boolean skipChar = false;
          for (int i = 1; i < n; i++) {
              if (skipChar) {
                  skipChar = false;
                  continue;
              }
              char c = s.charAt(i);
              switch (c) {
                  // This ends the parsing, as we are on the next element
                  case 'M':
                  case 'm':
                  case 'Z':
                  case 'z':
                  case 'L':
                  case 'l':
                  case 'H':
                  case 'h':
                  case 'V':
                  case 'v':
                  case 'C':
                  case 'c':
                  case 'S':
                  case 's':
                  case 'Q':
                  case 'q':
                  case 'T':
                  case 't':
                  case 'a':
                  case 'A':
                  case ')': {
                      String str = s.substring(p, i);
                      if (str.trim().length() > 0) {
                          //Util.debug("  Last: " + str);
                          Float f = Float.parseFloat(str);
                          numbers.add(f);
                      }
                      p = i;
                      return new NumberParse(numbers, p);
                  }
                  case '\n':
                  case '\t':
                  case ' ':
                  case ',':
                  case '-': {
                      String str = s.substring(p, i);
                      // Just keep moving if multiple whitespace
                      if (str.trim().length() > 0) {
                          //Util.debug("  Next: " + str);
                          Float f = Float.parseFloat(str);
                          numbers.add(f);
                          if (c == '-') {
                              p = i;
                          } else {
                              p = i + 1;
                              skipChar = true;
                          }
                      } else {
                          p++;
                      }
                      break;
                  }
              }
          }
          String last = s.substring(p);
          if (last.length() > 0) {
              //Util.debug("  Last: " + last);
              try {
                  numbers.add(Float.parseFloat(last));
              } catch (NumberFormatException nfe) {
                  // Just white-space, forget it
              }
              p = s.length();
          }
          return new NumberParse(numbers, p);
      }
focal_method.class_method_signature: SVGParser.parseNumbers(String s)
focal_method.full_signature: protected static NumberParse parseNumbers(String s)
focal_method.identifier: parseNumbers
focal_method.invocations: length charAt substring length trim parseFloat add substring length trim parseFloat add substring length add parseFloat length
focal_method.modifiers: protected static
focal_method.parameters: (String s)
focal_method.return: NumberParse
focal_method.signature: NumberParse parseNumbers(String s)