001/********************************************** 002 * Copyright (C) 2010 Lukas Laag 003 * This file is part of lib-gwt-svg. 004 * 005 * libgwtsvg is free software: you can redistribute it and/or modify 006 * it under the terms of the GNU Lesser General Public License as published by 007 * the Free Software Foundation, either version 3 of the License, or 008 * (at your option) any later version. 009 * 010 * libgwtsvg is distributed in the hope that it will be useful, 011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 013 * GNU Lesser General Public License for more details. 014 * 015 * You should have received a copy of the GNU Lesser General Public License 016 * along with libgwtsvg. If not, see http://www.gnu.org/licenses/ 017 **********************************************/ 018/* 019 * Copyright (c) 2004 World Wide Web Consortium, 020 * 021 * (Massachusetts Institute of Technology, European Research Consortium for 022 * Informatics and Mathematics, Keio University). All Rights Reserved. This 023 * work is distributed under the W3C(r) Software License [1] in the hope that 024 * it will be useful, but WITHOUT ANY WARRANTY; without even the implied 025 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 026 * 027 * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 028 */ 029 030package org.vectomatic.dom.svg; 031 032import com.google.gwt.core.client.JavaScriptObject; 033 034/** 035 * The {@link org.vectomatic.dom.svg.OMSVGPathSeg} interface is a base interface 036 * that corresponds to a single command within a path data specification. 037 */ 038public class OMSVGPathSeg extends JavaScriptObject { 039/** 040 * The unit type is not one of predefined types. It is invalid to attempt 041 * to define a new value of this type or to attempt to switch an existingvalue 042 * to this type. 043 */ 044 public static final short PATHSEG_UNKNOWN = 0; 045/** 046 * Corresponds to a "closepath" (z) path data command. 047 */ 048 public static final short PATHSEG_CLOSEPATH = 1; 049/** 050 * Corresponds to a "absolute moveto" (M) path data command. 051 */ 052 public static final short PATHSEG_MOVETO_ABS = 2; 053/** 054 * Corresponds to a "relative moveto" (m) path data command. 055 */ 056 public static final short PATHSEG_MOVETO_REL = 3; 057/** 058 * Corresponds to a "absolute lineto" (L) path data command. 059 */ 060 public static final short PATHSEG_LINETO_ABS = 4; 061/** 062 * Corresponds to a "relative lineto" (l) path data command. 063 */ 064 public static final short PATHSEG_LINETO_REL = 5; 065/** 066 * Corresponds to a "absolute cubic Bézier curveto" (C) path data command. 067 */ 068 public static final short PATHSEG_CURVETO_CUBIC_ABS = 6; 069/** 070 * Corresponds to a "relative cubic Bézier curveto" (c) path data command. 071 */ 072 public static final short PATHSEG_CURVETO_CUBIC_REL = 7; 073/** 074 * Corresponds to a "absolute quadratic Bézier curveto" (Q) path data command. 075 */ 076 public static final short PATHSEG_CURVETO_QUADRATIC_ABS = 8; 077/** 078 * Corresponds to a "relative quadratic Bézier curveto" (q) path data command. 079 */ 080 public static final short PATHSEG_CURVETO_QUADRATIC_REL = 9; 081/** 082 * Corresponds to a "absolute arcto" (A) path data command. 083 */ 084 public static final short PATHSEG_ARC_ABS = 10; 085/** 086 * Corresponds to a "relative arcto" (a) path data command. 087 */ 088 public static final short PATHSEG_ARC_REL = 11; 089/** 090 * Corresponds to a "absolute horizontal lineto" (H) path data command. 091 */ 092 public static final short PATHSEG_LINETO_HORIZONTAL_ABS = 12; 093/** 094 * Corresponds to a "relative horizontal lineto" (h) path data command. 095 */ 096 public static final short PATHSEG_LINETO_HORIZONTAL_REL = 13; 097/** 098 * Corresponds to a "absolute vertical lineto" (V) path data command. 099 */ 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}