1
package latexDraw.parsers.svg.elements.path;
4
* Defines the SVGPath quadratic curveto segment.<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 class SVGPathSegCurvetoQuadratic extends SVGPathSeg
25
/** The X-coordinate of the second point of the curve. @since 0.1 */
28
/** The Y-coordinate of the second point of the curve. @since 0.1 */
31
/** The x-coordinate of the first control point. @since 0.1 */
34
/** The y-coordinate of the first control point. @since 0.1 */
39
* The main constructor.
40
* @param x The X-coordinate of the second point of the curve.
41
* @param y The Y-coordinate of the second point of the curve.
42
* @param x1 The x-coordinate of the first control point.
43
* @param y1 The y-coordinate of the first control point
44
* @param isRelative isRelative True: the path segment is relative, false it is absolute.
46
public SVGPathSegCurvetoQuadratic(double x, double y, double x1, double y1, boolean isRelative)
59
public String toString()
61
StringBuffer stringBuffer = new StringBuffer();
63
stringBuffer.append((isRelative() ? "q" : "Q")); //$NON-NLS-1$ //$NON-NLS-2$
64
stringBuffer.append(' ');
65
stringBuffer.append(x1);
66
stringBuffer.append(' ');
67
stringBuffer.append(y1);
68
stringBuffer.append(' ');
69
stringBuffer.append(x);
70
stringBuffer.append(' ');
71
stringBuffer.append(y);
73
return stringBuffer.toString();
102
public double getX1()
112
public double getY1()
119
public PathSeg getType()
121
return isRelative() ? PathSeg.CURVETO_QUADRATIC_REL : PathSeg.CURVETO_QUADRATIC_ABS;