|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.latexdraw.parsers.CodeParser
net.sf.latexdraw.parsers.svg.parsers.AbstractSVGParser
net.sf.latexdraw.parsers.svg.parsers.SVGNumberParser
net.sf.latexdraw.parsers.svg.parsers.SVGPathParser
public class SVGPathParser
Defines an SVGPath parser.
This file is part of LaTeXDraw.
Copyright (c) 2005-2012 Arnaud BLOUIN
LaTeXDraw is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
LaTeXDraw is distributed without any warranty; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU General Public License for more details.
10/20/07
Field Summary | |
---|---|
protected SVGPathHandler |
handler
The handler of the SVGPath. |
Fields inherited from class net.sf.latexdraw.parsers.CodeParser |
---|
codeCore, EOC |
Constructor Summary | |
---|---|
SVGPathParser(java.lang.String code,
SVGPathHandler handler)
The main constructor. |
Method Summary | |
---|---|
void |
parse()
Launches the parsing. |
protected void |
parseClosepath()
Parses an SVGPath closepath. |
protected void |
parseCurveto(boolean isRelative)
Parses an SVGPath curveto. |
protected void |
parseEllipticalArcto(boolean isRelative)
Parses an SVGPath arc. |
protected void |
parseHorizontalLineto(boolean isRelative)
Parses an SVGPath horizontal lineto. |
protected void |
parseLineto(boolean isRelative)
Parses an SVGPath lineto. |
protected void |
parseMoveto(boolean isRelative)
Parses an SVGPath moveto. |
protected void |
parseQuadraticBezierCurveto(boolean isRelative)
Parses an SVGPath quadratic curveto. |
protected void |
parseShorthandCurveto(boolean isRelative)
Parses an SVGPath smooth curveto. |
protected void |
parseShorthandQuadraticBezierCurveto(boolean isRelative)
Parses an SVGPath quadratic smooth curveto. |
protected void |
parseVerticalLineto(boolean isRelative)
Parses an SVGPath vertical lineto. |
Methods inherited from class net.sf.latexdraw.parsers.svg.parsers.SVGNumberParser |
---|
isNumber, parseFlag, parseNumber, parseNumberAsString |
Methods inherited from class net.sf.latexdraw.parsers.svg.parsers.AbstractSVGParser |
---|
isComment, isWSP, skipComment, skipWSP, skipWSPComma |
Methods inherited from class net.sf.latexdraw.parsers.CodeParser |
---|
getChar, getCharAt, getCode, getCodeCore, getLinePosition, getPosition, incLinePosition, initialise, isEOC, isEOL, nextChar, setCode, setCodeCore, setLinePosition, setPosition, skipWSPComments |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected SVGPathHandler handler
Constructor Detail |
---|
public SVGPathParser(java.lang.String code, SVGPathHandler handler)
code
- The path to parse.handler
- The handler of the path.Method Detail |
---|
public void parse() throws java.text.ParseException
Parser
parse
in interface Parser
parse
in class SVGNumberParser
java.text.ParseException
- If an error occurs.protected void parseShorthandCurveto(boolean isRelative) throws java.text.ParseException
isRelative
- True if segment is relative.
java.text.ParseException
- If a problem occurs.protected void parseClosepath()
protected void parseHorizontalLineto(boolean isRelative) throws java.text.ParseException
isRelative
- True if segment is relative.
java.text.ParseException
- If a problem occurs.protected void parseVerticalLineto(boolean isRelative) throws java.text.ParseException
isRelative
- True if segment is relative.
java.text.ParseException
- If a problem occurs.protected void parseEllipticalArcto(boolean isRelative) throws java.text.ParseException
isRelative
- True if segment is relative.
java.text.ParseException
- If a problem occurs.protected void parseCurveto(boolean isRelative) throws java.text.ParseException
isRelative
- True if segment is relative.
java.text.ParseException
- If a problem occurs.protected void parseQuadraticBezierCurveto(boolean isRelative) throws java.text.ParseException
isRelative
- True if segment is relative.
java.text.ParseException
- If a problem occurs.protected void parseShorthandQuadraticBezierCurveto(boolean isRelative) throws java.text.ParseException
isRelative
- True if segment is relative.
java.text.ParseException
- If a problem occurs.protected void parseLineto(boolean isRelative) throws java.text.ParseException
isRelative
- True if segment is relative.
java.text.ParseException
- If a problem occurs.protected void parseMoveto(boolean isRelative) throws java.text.ParseException
isRelative
- True if segment is relative.
java.text.ParseException
- If a problem occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |