Changeset 14643 in josm for trunk/src/com
- Timestamp:
- 2019-01-05T18:49:33+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/com/kitfox/svg/SVGElement.java
r14328 r14643 586 586 } 587 587 588 private static final Pattern TRANSFORM_PATTERN = Pattern.compile("\\w+\\([^)]*\\)"); 588 589 static protected AffineTransform parseTransform(String val) throws SVGException 589 590 { 590 final Matcher matchExpression = Pattern.compile("\\w+\\([^)]*\\)").matcher("");591 final Matcher matchExpression = TRANSFORM_PATTERN.matcher(""); 591 592 592 593 AffineTransform retXform = new AffineTransform(); … … 601 602 } 602 603 604 private static final Pattern WORD_PATTERN = Pattern.compile("([a-zA-Z]+|-?\\d+(\\.\\d+)?(e-?\\d+)?|-?\\.\\d+(e-?\\d+)?)"); 603 605 static public AffineTransform parseSingleTransform(String val) throws SVGException 604 606 { 605 final Matcher matchWord = Pattern.compile("([a-zA-Z]+|-?\\d+(\\.\\d+)?(e-?\\d+)?|-?\\.\\d+(e-?\\d+)?)").matcher("");607 final Matcher matchWord = WORD_PATTERN.matcher(""); 606 608 607 609 AffineTransform retXform = new AffineTransform(); … … 682 684 } 683 685 686 private static final Pattern COMMAND_PATTERN = Pattern.compile("([MmLlHhVvAaQqTtCcSsZz])|([-+]?((\\d*\\.\\d+)|(\\d+))([eE][-+]?\\d+)?)"); 684 687 static protected PathCommand[] parsePathList(String list) 685 688 { 686 final Matcher matchPathCmd = Pattern.compile("([MmLlHhVvAaQqTtCcSsZz])|([-+]?((\\d*\\.\\d+)|(\\d+))([eE][-+]?\\d+)?)").matcher(list);689 final Matcher matchPathCmd = COMMAND_PATTERN.matcher(list); 687 690 688 691 //Tokenize
Note:
See TracChangeset
for help on using the changeset viewer.