1
package latexDraw.parsers.svg.elements.path;
4
* Defines a model for the SVGPath segments.<br>
6
* This file is part of LaTeXDraw.<br>
7
* Copyright (c) 2005-2008 Arnaud BLOUIN<br>
9
* LaTeXDraw is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation; either version 2 of the License, or
12
* (at your option) any later version.<br>
14
* LaTeXDraw is distributed without any warranty; without even the
15
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16
* PURPOSE. See the GNU General Public License for more details.<br>
19
* @author Arnaud BLOUIN<br>
23
public abstract class SVGPathSeg
25
public static enum PathSeg { UNKNOWN, CLOSEPATH, MOVETO_ABS, MOVETO_REL,
26
LINETO_ABS, LINETO_REL, CURVETO_CUBIC_ABS, CURVETO_CUBIC_REL,
27
CURVETO_QUADRATIC_ABS, CURVETO_QUADRATIC_REL, ARC_ABS,
28
ARC_REL, LINETO_HORIZONTAL_ABS, LINETO_HORIZONTAL_REL,
29
LINETO_VERTICAL_ABS, LINETO_VERTICAL_REL, CURVETO_CUBIC_SMOOTH_ABS,
30
CURVETO_CUBIC_SMOOTH_REL, CURVETO_QUADRATIC_SMOOTH_ABS,
31
CURVETO_QUADRATIC_SMOOTH_REL }
34
/** Defines if the segment path is relative or absolute. @since 0.1 */
35
protected boolean isRelative;
37
/** The type of the segment path. @since 0.1 */
38
protected PathSeg type;
42
* The main constructor.
43
* @param isRelative True: the path segment is relative, false it is absolute.
46
public SVGPathSeg(boolean isRelative)
48
this.isRelative = isRelative;
54
* @return The type of the segment path.
57
public abstract PathSeg getType();
62
* @return the isRelative.
65
public boolean isRelative()
72
* @param isRelative the isRelative to set.
75
public void setRelative(boolean isRelative)
77
this.isRelative = isRelative;