net.sf.latexdraw.glib.models.interfaces
Interface IEllipse

All Superinterfaces:
IArrowable, IPositionShape, IRectangularShape, IShape, Modifiable
All Known Subinterfaces:
IArc, ICircle, ICircleArc
All Known Implementing Classes:
LArc, LCircle, LCircleArc, LEllipse

public interface IEllipse
extends IRectangularShape

Defines an interface that classes defining an ellipse should implement.

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.

07/02/2009

Since:
3.0
Version:
3.0
Author:
Arnaud BLOUIN

Nested Class Summary
 
Nested classes/interfaces inherited from interface net.sf.latexdraw.glib.models.interfaces.IShape
IShape.BorderPos, IShape.FillingStyle, IShape.LineStyle, IShape.Position
 
Field Summary
 
Fields inherited from interface net.sf.latexdraw.glib.models.interfaces.IShape
GOLDEN_ANGLE, PPC
 
Method Summary
 IEllipse duplicate()
          Creates a duplicate of the shape (however id are not the same).
 double getA()
           
 double getB()
           
 IPoint[] getIntersection(ILine line)
          Computes the intersection points between the ellipse and the given line.
 double getRx()
           
 double getRy()
           
 void setCentre(IPoint centre)
          Translates the shape to its new centre.
 void setRx(double rx)
          Sets the x radius of the ellipse.
 void setRy(double ry)
          Sets the y radius of the ellipse.
 
Methods inherited from interface net.sf.latexdraw.glib.models.interfaces.IRectangularShape
getHeight, getWidth, setHeight, setWidth
 
Methods inherited from interface net.sf.latexdraw.glib.models.interfaces.IPositionShape
getPosition, getX, getY, setPosition, setPosition, setX, setY
 
Methods inherited from interface net.sf.latexdraw.glib.models.interfaces.IShape
addToRotationAngle, copy, getArrowAt, getArrowLine, getArrows, getArrowStyle, getBorderGap, getBordersPosition, getBottomLeftPoint, getBottomRightPoint, getDashSepBlack, getDashSepWhite, getDbleBordCol, getDbleBordSep, getDotSep, getFillingCol, getFillingStyle, getFullBottomRightPoint, getFullTopLeftPoint, getGradAngle, getGradColEnd, getGradColStart, getGradMidPt, getGravityCentre, getHatchingsAngle, getHatchingsCol, getHatchingsSep, getHatchingsWidth, getId, getLineColour, getLineStyle, getNbPoints, getOpacity, getPoints, getPtAt, getRotationAngle, getShadowAngle, getShadowCol, getShadowGap, getShadowSize, getThickness, getTopLeftPoint, getTopRightPoint, hasDbleBord, hasGradient, hasHatchings, hasShadow, isArrowable, isBordersMovable, isColourable, isDbleBorderable, isFillable, isFilled, isInteriorStylable, isLineStylable, isParametersEquals, isShadowable, isShowPts, isShowPtsable, isThicknessable, mirrorHorizontal, mirrorVertical, rotate, scale, setArrowStyle, setBordersPosition, setDashSepBlack, setDashSepWhite, setDbleBordCol, setDbleBordSep, setDotSep, setFilled, setFillingCol, setFillingStyle, setGradAngle, setGradColEnd, setGradColStart, setGradMidPt, setHasDbleBord, setHasShadow, setHatchingsAngle, setHatchingsCol, setHatchingsSep, setHatchingsWidth, setId, setLineColour, setLineStyle, setNewId, setOpacity, setRotationAngle, setShadowAngle, setShadowCol, setShadowSize, setShowPts, setThickness, shadowFillsShape, translate
 
Methods inherited from interface org.malai.properties.Modifiable
isModified, setModified
 
Methods inherited from interface net.sf.latexdraw.glib.models.interfaces.IArrowable
getArrowInset, getArrowLength, getArrowSizeDim, getArrowSizeNum, getBracketNum, getDotSizeDim, getDotSizeNum, getRBracketNum, getTBarSizeDim, getTBarSizeNum, setArrowInset, setArrowLength, setArrowSizeDim, setArrowSizeNum, setBracketNum, setDotSizeDim, setDotSizeNum, setRBracketNum, setTBarSizeDim, setTBarSizeNum
 

Method Detail

duplicate

IEllipse duplicate()
Description copied from interface: IShape
Creates a duplicate of the shape (however id are not the same).

Specified by:
duplicate in interface IShape
Returns:
The duplicata.

getA

double getA()
Returns:
The half of the biggest axe.
Since:
3.0

getB

double getB()
Returns:
The half of the smallest axe.
Since:
3.0

getRx

double getRx()
Returns:
The x radius of the ellipse.
Since:
3.0

getRy

double getRy()
Returns:
The y radius of the ellipse.
Since:
3.0

setRx

void setRx(double rx)
Sets the x radius of the ellipse.

Parameters:
rx - The new x radius.
Since:
3.0

setRy

void setRy(double ry)
Sets the y radius of the ellipse.

Parameters:
ry - The new y radius.
Since:
3.0

setCentre

void setCentre(IPoint centre)
Translates the shape to its new centre.

Parameters:
centre - The new centre.
Since:
3.0

getIntersection

IPoint[] getIntersection(ILine line)
Computes the intersection points between the ellipse and the given line.

Parameters:
line - The line to test.
Returns:
1 or 2 points or null.
Since:
3.0