com.supermap.data
类 GeoArc

java.lang.Object
  继承者 com.supermap.data.Geometry
      继承者 com.supermap.data.GeoArc

public class GeoArc
extends Geometry

圆弧几何对象类。

该类主要用于 CAD 图层,是 Geometry 对象的子对象。


构造方法摘要
GeoArc()
          构造一个新的 GeoArc 对象。
GeoArc(GeoArc geoArc)
          根据给定的 GeoArc 对象构造一个与其完全相同的新对象。
GeoArc(Point2D center, double radius, double startAngle, double sweepAngle)
          根据指定的参数来构造一个 GeoArc 的新对象。
GeoArc(Point2D startPoint, Point2D middlePoint, Point2D endPoint)
          根据指定的参数来构造一个 GeoArc 的新对象。
 
方法摘要
 GeoArc clone()
          返回当前 GeoArc 对象的一个拷贝。
 GeoLine convertToLine(int segmentCount)
          将弧段转换为线对象。
 void dispose()
          释放该对象所占用的资源。
 Point2D findPointOnArc(double sweepAngle)
          根据扫过的角度值返回圆弧上的某一点。
 Point2D getCenter()
          返回圆弧的圆心。
 double getLength()
          返回圆弧的弧长。
 double getRadius()
          返回圆弧的半径。
 double getStartAngle()
          返回圆弧的起始角度,单位为度。
 double getSweepAngle()
          返回圆弧所扫过的角度,单位为度。
 void setCenter(Point2D point2D)
          设置圆弧的圆心。
 void setEmpty()
          此类不支持该接口。
 void setRadius(double value)
          设置圆弧的半径。
 void setStartAngle(double value)
          设置圆弧的起始角度,单位为度。
 void setSweepAngle(double value)
          设置圆弧所扫过的角度,单位为度。
 
从类 com.supermap.data.Geometry 继承的方法
addCustomGeometryCreatedListener, fromXML, getBounds, getID, getInnerPoint, getStyle, getType, getVariantID, hitTest, isEmpty, mirror, offset, removeCustomGeometryCreatedListener, resize, rotate, setID, setStyle, toXML
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

GeoArc

public GeoArc()
构造一个新的 GeoArc 对象。


GeoArc

public GeoArc(GeoArc geoArc)
根据给定的 GeoArc 对象构造一个与其完全相同的新对象。

参数:
geoArc - 给定的 GeoArc 对象。

GeoArc

public GeoArc(Point2D center,
              double radius,
              double startAngle,
              double sweepAngle)
根据指定的参数来构造一个 GeoArc 的新对象。

参数:
center - 圆弧的圆心。
radius - 圆弧半径。
startAngle - 圆弧的起始角度。
sweepAngle - 圆弧所扫过的角度。

GeoArc

public GeoArc(Point2D startPoint,
              Point2D middlePoint,
              Point2D endPoint)
根据指定的参数来构造一个 GeoArc 的新对象。

参数:
startPoint - 圆弧的起始点。
middlePoint - 圆弧的中间点。
endPoint - 圆弧的终止点。
方法详细信息

getCenter

public Point2D getCenter()
返回圆弧的圆心。

返回:
圆弧的圆心。
默认值:
默认值为 {X = 0,Y = 0}。

setCenter

public void setCenter(Point2D point2D)
设置圆弧的圆心。

参数:
point2D - 圆弧的圆心。

getRadius

public double getRadius()
返回圆弧的半径。

返回:
圆弧的半径。
默认值:
默认值为 1。

setRadius

public void setRadius(double value)
设置圆弧的半径。

参数:
value - 圆弧的半径。

getStartAngle

public double getStartAngle()
返回圆弧的起始角度,单位为度。

返回:
圆弧的起始角度。
默认值:
默认值为 0。

setStartAngle

public void setStartAngle(double value)
设置圆弧的起始角度,单位为度。

参数:
value - 圆弧的起始角度。

getSweepAngle

public double getSweepAngle()
返回圆弧所扫过的角度,单位为度。角度范围为-360度到360度,逆时针扫过为正,顺时针扫过为负。

返回:
圆弧所扫过的角度。
默认值:
默认值为 180。

setSweepAngle

public void setSweepAngle(double value)
设置圆弧所扫过的角度,单位为度。角度范围为-360度到360度,逆时针扫过为正,顺时针扫过为负。

参数:
value - 圆弧所扫过的角度。

getLength

public double getLength()
返回圆弧的弧长。

返回:
圆弧的弧长。
默认值:
默认值为 3.14159265358979。

convertToLine

public GeoLine convertToLine(int segmentCount)
将弧段转换为线对象。

参数:
segmentCount - 等分弧段的段数。
返回:
线对象。

findPointOnArc

public Point2D findPointOnArc(double sweepAngle)
根据扫过的角度值返回圆弧上的某一点。

参数:
sweepAngle - 扫过的角度值,角度值在0度到 getSweepAngle() 方法的返回值之间。
返回:
Point2D 类型的对象。

dispose

public void dispose()
释放该对象所占用的资源。当调用该方法之后,此对象不再可用。

覆盖:
Geometry 中的 dispose

clone

public GeoArc clone()
返回当前 GeoArc 对象的一个拷贝。

覆盖:
java.lang.Object 中的 clone
返回:
通过克隆操作得到的 GeoArc 对象。

setEmpty

public void setEmpty()
此类不支持该接口。

覆盖:
Geometry 中的 setEmpty