View Javadoc
1   /*
2    * Copyright (c) 2002-2026 Gargoyle Software Inc.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * https://www.apache.org/licenses/LICENSE-2.0
8    *
9    * Unless required by applicable law or agreed to in writing, software
10   * distributed under the License is distributed on an "AS IS" BASIS,
11   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12   * See the License for the specific language governing permissions and
13   * limitations under the License.
14   */
15  package org.htmlunit.javascript.host.svg;
16  
17  import static org.htmlunit.javascript.configuration.SupportedBrowser.CHROME;
18  import static org.htmlunit.javascript.configuration.SupportedBrowser.EDGE;
19  import static org.htmlunit.javascript.configuration.SupportedBrowser.FF;
20  
21  import org.htmlunit.javascript.configuration.JsxClass;
22  import org.htmlunit.javascript.configuration.JsxConstant;
23  import org.htmlunit.javascript.configuration.JsxConstructor;
24  import org.htmlunit.svg.SvgTextPath;
25  
26  /**
27   * JavaScript host object for {@code SVGTextPathElement}.
28   *
29   * @author Ahmed Ashour
30   * @author Ronald Brill
31   *
32   * @see <a href="https://developer.mozilla.org/en-US/docs/Web/API/SVGTextPathElement">MDN Documentation</a>
33   */
34  @JsxClass(domClass = SvgTextPath.class)
35  public class SVGTextPathElement extends SVGTextContentElement {
36  
37      /** The constant {@code TEXTPATH_METHODTYPE_UNKNOWN}. */
38      @JsxConstant
39      public static final int TEXTPATH_METHODTYPE_UNKNOWN = 0;
40  
41      /** The constant {@code TEXTPATH_SPACINGTYPE_UNKNOWN}. */
42      @JsxConstant
43      public static final int TEXTPATH_SPACINGTYPE_UNKNOWN = 0;
44  
45      /** The constant {@code TEXTPATH_SIDETYPE_UNKNOWN}. */
46      @JsxConstant({CHROME, EDGE, FF})
47      public static final int TEXTPATH_SIDETYPE_UNKNOWN = 0;
48  
49      /** The constant {@code TEXTPATH_METHODTYPE_ALIGN}. */
50      @JsxConstant
51      public static final int TEXTPATH_METHODTYPE_ALIGN = 1;
52  
53      /** The constant {@code TEXTPATH_SPACINGTYPE_AUTO}. */
54      @JsxConstant
55      public static final int TEXTPATH_SPACINGTYPE_AUTO = 1;
56  
57      /** The constant {@code TEXTPATH_SIDETYPE_LEFT}. */
58      @JsxConstant({CHROME, EDGE, FF})
59      public static final int TEXTPATH_SIDETYPE_LEFT = 1;
60  
61      /** The constant {@code TEXTPATH_METHODTYPE_STRETCH}. */
62      @JsxConstant
63      public static final int TEXTPATH_METHODTYPE_STRETCH = 2;
64  
65      /** The constant {@code TEXTPATH_SPACINGTYPE_EXACT}. */
66      @JsxConstant
67      public static final int TEXTPATH_SPACINGTYPE_EXACT = 2;
68  
69      /** The constant {@code TEXTPATH_SIDETYPE_RIGHT}. */
70      @JsxConstant({CHROME, EDGE, FF})
71      public static final int TEXTPATH_SIDETYPE_RIGHT = 2;
72  
73      /**
74       * Creates an instance of this object.
75       */
76      @Override
77      @JsxConstructor
78      public void jsConstructor() {
79          super.jsConstructor();
80      }
81  }