Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2012 Google Inc.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
   * use this file except in compliance with the License. You may obtain a copy of
   * the License at
   * 
   * http://www.apache.org/licenses/LICENSE-2.0
   * 
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  * License for the specific language governing permissions and limitations under
  * the License.
  */
 package elemental.svg;
 
 
 import java.util.Date;

The SVGPathElement interface corresponds to the <path> element.
 
 
 
 
Corresponds to attribute pathLength on the given <path> element.
 
 
Returns a stand-alone, parentless SVGPathSegArcAbs object.

Parameters:
  • float x
    The absolute X coordinate for the end point of this path segment.
  • float y
    The absolute Y coordinate for the end point of this path segment.
  • float r1
    The x-axis radius for the ellipse.
  • float r2
    The y-axis radius for the ellipse.
  • float angle
    The rotation angle in degrees for the ellipse's x-axis relative to the x-axis of the user coordinate system.
  • boolean largeArcFlag
    The value of the large-arc-flag parameter.
  • boolean sweepFlag
    The value of the large-arc-flag parameter.
 
   SVGPathSegArcAbs createSVGPathSegArcAbs(float xfloat yfloat r1float r2float angleboolean largeArcFlagboolean sweepFlag);


  
Returns a stand-alone, parentless SVGPathSegArcRel object.

Parameters:
  • float x
    The relative X coordinate for the end point of this path segment.
  • float y
    The relative Y coordinate for the end point of this path segment.
  • float r1
    The x-axis radius for the ellipse.
  • float r2
    The y-axis radius for the ellipse.
  • float angle
    The rotation angle in degrees for the ellipse's x-axis relative to the x-axis of the user coordinate system.
  • boolean largeArcFlag
    The value of the large-arc-flag parameter.
  • boolean sweepFlag
    The value of the large-arc-flag parameter.
 
   SVGPathSegArcRel createSVGPathSegArcRel(float xfloat yfloat r1float r2float angleboolean largeArcFlagboolean sweepFlag);


  
Returns a stand-alone, parentless SVGPathSegClosePath object.
 
Returns a stand-alone, parentless SVGPathSegCurvetoCubicAbs object.

Parameters:
  • float x
    The absolute X coordinate for the end point of this path segment.
  • float y
    The absolute Y coordinate for the end point of this path segment.
  • float x1
    The absolute X coordinate for the first control point.
  • float y1
    The absolute Y coordinate for the first control point.
  • float x2
    The absolute X coordinate for the second control point.
  • float y2
    The absolute Y coordinate for the second control point.
 
   SVGPathSegCurvetoCubicAbs createSVGPathSegCurvetoCubicAbs(float xfloat yfloat x1float y1float x2float y2);


  
Returns a stand-alone, parentless SVGPathSegCurvetoCubicRel object.

Parameters:
  • float x
    The relative X coordinate for the end point of this path segment.
  • float y
    The relative Y coordinate for the end point of this path segment.
  • float x1
    The relative X coordinate for the first control point.
  • float y1
    The relative Y coordinate for the first control point.
  • float x2
    The relative X coordinate for the second control point.
  • float y2
    The relative Y coordinate for the second control point.
 
   SVGPathSegCurvetoCubicRel createSVGPathSegCurvetoCubicRel(float xfloat yfloat x1float y1float x2float y2);


  
Returns a stand-alone, parentless SVGPathSegCurvetoCubicSmoothAbs object.

Parameters
  • float x
    The absolute X coordinate for the end point of this path segment.
  • float y
    The absolute Y coordinate for the end point of this path segment.
  • float x2
    The absolute X coordinate for the second control point.
  • float y2
    The absolute Y coordinate for the second control point.
 
   SVGPathSegCurvetoCubicSmoothAbs createSVGPathSegCurvetoCubicSmoothAbs(float xfloat yfloat x2float y2);


  
Returns a stand-alone, parentless SVGPathSegCurvetoCubicSmoothRel object.

Parameters
  • float x
    The absolute X coordinate for the end point of this path segment.
  • float y
    The absolute Y coordinate for the end point of this path segment.
  • float x2
    The absolute X coordinate for the second control point.
  • float y2
    The absolute Y coordinate for the second control point.
 
   SVGPathSegCurvetoCubicSmoothRel createSVGPathSegCurvetoCubicSmoothRel(float xfloat yfloat x2float y2);


  
Returns a stand-alone, parentless SVGPathSegCurvetoQuadraticAbs object.

Parameters:
  • float x
    The absolute X coordinate for the end point of this path segment.
  • float y
    The absolute Y coordinate for the end point of this path segment.
  • float x1
    The absolute X coordinate for the first control point.
  • float y1
    The absolute Y coordinate for the first control point.
  SVGPathSegCurvetoQuadraticAbs createSVGPathSegCurvetoQuadraticAbs(float xfloat yfloat x1float y1);


  
Returns a stand-alone, parentless SVGPathSegCurvetoQuadraticRel object.

Parameters:
  • float x
    The relative X coordinate for the end point of this path segment.
  • float y
    The relative Y coordinate for the end point of this path segment.
  • float x1
    The relative X coordinate for the first control point.
  • float y1
    The relative Y coordinate for the first control point.
  SVGPathSegCurvetoQuadraticRel createSVGPathSegCurvetoQuadraticRel(float xfloat yfloat x1float y1);


  
Returns a stand-alone, parentless SVGPathSegCurvetoQuadraticSmoothAbs object.

Parameters:
  • float x
    The absolute X coordinate for the end point of this path segment.
  • float y
    The absolute Y coordinate for the end point of this path segment.
Returns a stand-alone, parentless SVGPathSegCurvetoQuadraticSmoothRel object.

Parameters:
  • float x
    The absolute X coordinate for the end point of this path segment.
  • float y
    The absolute Y coordinate for the end point of this path segment.
Returns a stand-alone, parentless SVGPathSegLinetoAbs object.

Parameters:
  • float x
    The absolute X coordinate for the end point of this path segment.
  • float y
    The absolute Y coordinate for the end point of this path segment.
  SVGPathSegLinetoAbs createSVGPathSegLinetoAbs(float xfloat y);


  
Returns a stand-alone, parentless SVGPathSegLinetoHorizontalAbs object.

Parameters:
  • float x
    The absolute X coordinate for the end point of this path segment.
Returns a stand-alone, parentless SVGPathSegLinetoHorizontalRel object.

Parameters:
  • float x
    The relative X coordinate for the end point of this path segment.
Returns a stand-alone, parentless SVGPathSegLinetoRel object.

Parameters:
  • float x
    The relative X coordinate for the end point of this path segment.
  • float y
    The relative Y coordinate for the end point of this path segment.
  SVGPathSegLinetoRel createSVGPathSegLinetoRel(float xfloat y);


  
Returns a stand-alone, parentless SVGPathSegLinetoVerticalAbs object.

Parameters:
  • float y
    The absolute Y coordinate for the end point of this path segment.
Returns a stand-alone, parentless SVGPathSegLinetoVerticalRel object.

Parameters:
  • float y
    The relative Y coordinate for the end point of this path segment.
Returns a stand-alone, parentless SVGPathSegMovetoAbs object.

Parameters:
  • float x
    The absolute X coordinate for the end point of this path segment.
  • float y
    The absolute Y coordinate for the end point of this path segment.
  SVGPathSegMovetoAbs createSVGPathSegMovetoAbs(float xfloat y);


  
Returns a stand-alone, parentless SVGPathSegMovetoRel object.

Parameters:
  • float x
    The relative X coordinate for the end point of this path segment.
  • float y
    The relative Y coordinate for the end point of this path segment.
  SVGPathSegMovetoRel createSVGPathSegMovetoRel(float xfloat y);


  
Returns the index into pathSegList which is distance units along the path, utilizing the user agent's distance-along-a-path algorithm.
  int getPathSegAtLength(float distance);


  
Returns the (x,y) coordinate in user space which is distance units along the path, utilizing the browser's distance-along-a-path algorithm.
  SVGPoint getPointAtLength(float distance);


  
Returns the computed value for the total length of the path using the browser's distance-along-a-path algorithm, as a distance in the current user coordinate system.
  float getTotalLength();
New to GrepCode? Check out our FAQ X