1 /**********************************************
2 * Copyright (C) 2010 Lukas Laag
3 * This file is part of lib-gwt-svg.
4 *
5 * libgwtsvg is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * libgwtsvg is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with libgwtsvg. If not, see http://www.gnu.org/licenses/
17 **********************************************/
18 /*
19 * Copyright (c) 2004 World Wide Web Consortium,
20 *
21 * (Massachusetts Institute of Technology, European Research Consortium for
22 * Informatics and Mathematics, Keio University). All Rights Reserved. This
23 * work is distributed under the W3C(r) Software License [1] in the hope that
24 * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
25 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
26 *
27 * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
28 */
29
30 package org.vectomatic.dom.svg;
31
32 import com.google.gwt.core.client.JavaScriptObject;
33
34 /**
35 * The {@link org.vectomatic.dom.svg.OMSVGPathSeg} interface is a base interface
36 * that corresponds to a single command within a path data specification.
37 */
38 public class OMSVGPathSeg extends JavaScriptObject {
39 /**
40 * The unit type is not one of predefined types. It is invalid to attempt
41 * to define a new value of this type or to attempt to switch an existingvalue
42 * to this type.
43 */
44 public static final short PATHSEG_UNKNOWN = 0;
45 /**
46 * Corresponds to a "closepath" (z) path data command.
47 */
48 public static final short PATHSEG_CLOSEPATH = 1;
49 /**
50 * Corresponds to a "absolute moveto" (M) path data command.
51 */
52 public static final short PATHSEG_MOVETO_ABS = 2;
53 /**
54 * Corresponds to a "relative moveto" (m) path data command.
55 */
56 public static final short PATHSEG_MOVETO_REL = 3;
57 /**
58 * Corresponds to a "absolute lineto" (L) path data command.
59 */
60 public static final short PATHSEG_LINETO_ABS = 4;
61 /**
62 * Corresponds to a "relative lineto" (l) path data command.
63 */
64 public static final short PATHSEG_LINETO_REL = 5;
65 /**
66 * Corresponds to a "absolute cubic Bézier curveto" (C) path data command.
67 */
68 public static final short PATHSEG_CURVETO_CUBIC_ABS = 6;
69 /**
70 * Corresponds to a "relative cubic Bézier curveto" (c) path data command.
71 */
72 public static final short PATHSEG_CURVETO_CUBIC_REL = 7;
73 /**
74 * Corresponds to a "absolute quadratic Bézier curveto" (Q) path data command.
75 */
76 public static final short PATHSEG_CURVETO_QUADRATIC_ABS = 8;
77 /**
78 * Corresponds to a "relative quadratic Bézier curveto" (q) path data command.
79 */
80 public static final short PATHSEG_CURVETO_QUADRATIC_REL = 9;
81 /**
82 * Corresponds to a "absolute arcto" (A) path data command.
83 */
84 public static final short PATHSEG_ARC_ABS = 10;
85 /**
86 * Corresponds to a "relative arcto" (a) path data command.
87 */
88 public static final short PATHSEG_ARC_REL = 11;
89 /**
90 * Corresponds to a "absolute horizontal lineto" (H) path data command.
91 */
92 public static final short PATHSEG_LINETO_HORIZONTAL_ABS = 12;
93 /**
94 * Corresponds to a "relative horizontal lineto" (h) path data command.
95 */
96 public static final short PATHSEG_LINETO_HORIZONTAL_REL = 13;
97 /**
98 * Corresponds to a "absolute vertical lineto" (V) path data command.
99 */
100 public static final short PATHSEG_LINETO_VERTICAL_ABS = 14;
101 /**
102 * Corresponds to a "relative vertical lineto" (v) path data command.
103 */
104 public static final short PATHSEG_LINETO_VERTICAL_REL = 15;
105 /**
106 * Corresponds to a "absolute smooth cubic curveto" (S) path data command.
107 */
108 public static final short PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16;
109 /**
110 * Corresponds to a "relative smooth cubic curveto" (s) path data command.
111 */
112 public static final short PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17;
113 /**
114 * Corresponds to a "absolute smooth quadratic curveto" (T) path data command.
115 */
116 public static final short PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18;
117 /**
118 * Corresponds to a "relative smooth quadratic curveto" (t) path data command.
119 */
120 public static final short PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19;
121 protected OMSVGPathSeg() {
122 }
123
124 // Implementation of the svg::SVGPathSeg W3C IDL interface
125 /**
126 * The type of the path segment as specified by one of the constants defined
127 * on this interface.
128 */
129 public final native short getPathSegType() /*-{
130 return this.pathSegType;
131 }-*/;
132 /**
133 * The type of the path segment, specified by the corresponding one character
134 * command name.
135 */
136 public final native String getPathSegTypeAsLetter() /*-{
137 return this.pathSegTypeAsLetter;
138 }-*/;
139
140 }