net.sf.latexdraw.parsers.svg.path
Class SVGPathSegArc

java.lang.Object
  extended by net.sf.latexdraw.parsers.svg.path.SVGPathSeg
      extended by net.sf.latexdraw.parsers.svg.path.SVGPathSegArc

public class SVGPathSegArc
extends SVGPathSeg

Defines the SVGPath arc segment.

This file is part of LaTeXDraw.
Copyright (c) 2005-2012 Arnaud BLOUIN

LaTeXDraw is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

LaTeXDraw is distributed without any warranty; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

10/20/07

Version:
3.0
Author:
Arnaud BLOUIN

Nested Class Summary
 
Nested classes/interfaces inherited from class net.sf.latexdraw.parsers.svg.path.SVGPathSeg
SVGPathSeg.PathSeg
 
Field Summary
protected  double angle
          The x-axis rotation angle.
protected  boolean largeArcFlag
          The value of the large-arc-flag parameter.
protected  double rx
          The x radius of the arc.
protected  double ry
          The y radius of the arc.
protected  boolean sweepFlag
          The value of the sweep-flag parameter.
protected  double x
          The X-coordinate of the second point of the arc.
protected  double y
          The Y-coordinate of the second point of the arc.
 
Fields inherited from class net.sf.latexdraw.parsers.svg.path.SVGPathSeg
isRelative, type
 
Constructor Summary
SVGPathSegArc(double x, double y, double rx, double ry, double angle, boolean largeArcFlag, boolean sweepFlag, boolean isRelative)
          The main constructor.
 
Method Summary
 double getAngle()
           
 java.awt.geom.Arc2D getArc2D(double x0, double y0)
          Creates a Java Arc2D corresponding to the position and the angles of the arc segment (computations based on the SVG specification instructions concerning the build of an arc, p. 643-649).
 double getRX()
           
 double getRY()
           
 SVGPathSeg.PathSeg getType()
           
 double getX()
           
 double getY()
           
 boolean isLargeArcFlag()
           
 boolean isSweepFlag()
           
 java.lang.String toString()
           
 
Methods inherited from class net.sf.latexdraw.parsers.svg.path.SVGPathSeg
isRelative, setRelative
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

x

protected double x
The X-coordinate of the second point of the arc. @since 2.0


y

protected double y
The Y-coordinate of the second point of the arc. @since 2.0


rx

protected double rx
The x radius of the arc. @since 2.0


ry

protected double ry
The y radius of the arc. @since 2.0


angle

protected double angle
The x-axis rotation angle. @since 2.0


largeArcFlag

protected boolean largeArcFlag
The value of the large-arc-flag parameter.


sweepFlag

protected boolean sweepFlag
The value of the sweep-flag parameter.

Constructor Detail

SVGPathSegArc

public SVGPathSegArc(double x,
                     double y,
                     double rx,
                     double ry,
                     double angle,
                     boolean largeArcFlag,
                     boolean sweepFlag,
                     boolean isRelative)
The main constructor.

Parameters:
x - The X-coordinate of the second point of the arc.
y - The Y-coordinate of the second point of the arc.
rx - The x radius of the arc.
ry - The y radius of the arc.
angle - The x-axis rotation angle.
isRelative - True: the path segment is relative, false it is absolute.
largeArcFlag - The value of the large-arc-flag parameter.
sweepFlag - The value of the sweep-flag parameter.
Method Detail

getArc2D

public java.awt.geom.Arc2D getArc2D(double x0,
                                    double y0)
Creates a Java Arc2D corresponding to the position and the angles of the arc segment (computations based on the SVG specification instructions concerning the build of an arc, p. 643-649).

Parameters:
x0 - The X-coordinate of the initial position.
y0 - The Y-coordinate of the initial position.
Returns:
An Java Arc2D with double values.
Since:
2.0

getX

public double getX()
Returns:
the x.
Since:
2.0

getY

public double getY()
Returns:
the y.
Since:
2.0

getRX

public double getRX()
Returns:
the rx.
Since:
2.0

getRY

public double getRY()
Returns:
the ry.
Since:
2.0

getAngle

public double getAngle()
Returns:
the angle.
Since:
2.0

isLargeArcFlag

public boolean isLargeArcFlag()
Returns:
the largeArcFlag.
Since:
2.0

isSweepFlag

public boolean isSweepFlag()
Returns:
the sweepFlag.
Since:
2.0

getType

public SVGPathSeg.PathSeg getType()
Specified by:
getType in class SVGPathSeg
Returns:
The type of the segment path.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object