Class PicEllipse
- java.lang.Object
-
- jpicedt.graphic.model.AbstractElement
-
- jpicedt.graphic.model.DefaultLeafElement
-
- jpicedt.graphic.model.PicParallelogram
-
- jpicedt.graphic.model.PicEllipse
-
- All Implemented Interfaces:
Element,PicMultiCurveConvertable,PicObjectConstants,ActionFactory,CustomizerFactory
- Direct Known Subclasses:
PicCircleFrom3Points
public class PicEllipse extends PicParallelogram
Ellipse or arc, based on parallelogram
The geometrical model of this ellipse (or its arc counterpart) is based on a parallelogram, yet is equivalent to an ellipse rotated around its center.In the following code documentation, we will be using two coordinate-systems, namely :
- a so-called parallelogram basis, whose vectors are defined by the sides of the parallelogram.
These correspond to fields
l2rVecandb2tVecinherited from superclass. - an ellipse basis (also called canonical basis), whose vectors are defined by the great and small axes of the ellipse respectively.
skewrefers to the parallelogram basis, whereasrotateddenotes angles measured in the ellipse basis. Since ellipse axes are generally not parallel to parallelogram sides, except in the event this parallelogram is a rectangle, both sets of angle DO obviously differ.In the parallelogram basis, arc is modelled by the following parametrized curve :
Center + cos(t)*U+sin(t)*V,
for t ranging fromskewAngleStarttoskewAngleEnd.Rotated angles are computed so that the arc of ellipse is obtained simply by rotating by "rotationAngle" (CCW) the arc of ellipse whose parametrization is Center+greatAxis*cos(t)*I+smallAxis*sin(t)*J where I,J is the ellipse canonical basis, and t varies between "rotatedAngleStart" and "rotatedAngleEnd". Note that this means that when small axis is negative, this parametrization goes CW and not CCW.
[TODO] changes ALL internal angles to radian, and move conversion to setters/getters is user may want to enter degrees. [TODO] add a picture (in GIF or PNG format) to this documentation (as in AbstractCurve) to help end-users understand all these tricky things !
- Since:
- jPicEdt 1.4
- Version:
- $Id: PicEllipse.java,v 1.26.2.1 2007/09/02 11:56:26 reynal Exp $
- Author:
- Vincent Guirardel, Sylvain Reynal.
-
-
Field Summary
Fields Modifier and Type Field Description static intCHORDprefined closure type for arcsprotected intclosureclosure typeprotected doublegreatAxisLengths of the great axis of the ellipse.static intLAST_PTstatic intOPENprefined closure type for arcsstatic intP_ANGLE_ENDpoint marking end-of-arcstatic intP_ANGLE_STARTpoint marking start-of-arcstatic intPIEprefined closure type for arcsprotected doublerotatedAngleEndArc angles in degrees, as measured in the ellipse basis.protected doublerotatedAngleStartArc angles in degrees, as measured in the ellipse basis.protected doublerotationAngleAngle in radians (CCW) between the great axis of the ellipse and the horizontal axis.protected doubleskewAngleEndprotected doubleskewAngleStartArc start- and end- angles in degrees as measured with respect to parallolegram's basis (seetoParalleloBasisCoordinates()for details on how this basis is defined).protected doublesmallAxisLength of the small axis of the ellipse.-
Fields inherited from class jpicedt.graphic.model.PicParallelogram
b2tVec, CENTER_FIXED, DEFAULT, FIRST_PT, l2rVec, P_BL, P_BR, P_CENTER, P_SPEC_BL, P_SPEC_BR, P_SPEC_TR, P_TL, P_TR, SIDE_B, SIDE_L, SIDE_R, SIDE_T, SQUARE
-
Fields inherited from class jpicedt.graphic.model.DefaultLeafElement
nodeConnections, nodeName, pts
-
Fields inherited from class jpicedt.graphic.model.AbstractElement
attributeSet, parent, view
-
Fields inherited from interface jpicedt.graphic.model.PicObjectConstants
ARROW_GLOBAL_SCALE_LENGTH, ARROW_GLOBAL_SCALE_WIDTH, ARROW_INSET_SCALE, ARROW_LENGTH_SCALE, ARROW_WIDTH_LINEWIDTH_SCALE, ARROW_WIDTH_MINIMUM_MM, BRACKET_LENGTH_SCALE, CROSSHATCH, CROSSHATCH_FILLED, DASH_OPAQUE, DASH_TRANSPARENT, DASH1, DASH2, DASH3, DASHED, DIMEN, DOT_SEP, DOT_SEP1, DOT_SEP2, DOT_SEP3, DOTTED, DOUBLE_COLOR, DOUBLE_LINE, DOUBLE_SEP, FILL_COLOR, FILL_STYLE, HATCH_ANGLE, HATCH_COLOR, HATCH_SEP, HATCH_WIDTH, HLINES, HLINES_FILLED, INNER, LEFT_ARROW, LINE_COLOR, LINE_STYLE, LINE_WIDTH, MIDDLE, NONE, OUTER, OVER_STRIKE, OVER_STRIKE_COLOR, OVER_STRIKE_WIDTH, POLYDOTS_ANGLE, POLYDOTS_CIRCLE, POLYDOTS_DISK, POLYDOTS_PENTAGON, POLYDOTS_PENTAGON_FILLED, POLYDOTS_PLUS, POLYDOTS_SCALE_H, POLYDOTS_SCALE_V, POLYDOTS_SIZE_LINEWIDTH_SCALE, POLYDOTS_SIZE_MINIMUM_MM, POLYDOTS_SQUARE, POLYDOTS_SQUARE_FILLED, POLYDOTS_STYLE, POLYDOTS_SUPERIMPOSE, POLYDOTS_TRIANGLE, POLYDOTS_TRIANGLE_FILLED, PS_POINT, PST_CUSTOM, RBRACKET_LENGTH_SCALE, RIGHT_ARROW, SHADOW, SHADOW_ANGLE, SHADOW_COLOR, SHADOW_SIZE, SOLID, TBAR_WIDTH_LINEWIDTH_SCALE, TBAR_WIDTH_MINIMUM_MM, TEXT_BOX_CIRCLE, TEXT_BOX_NO_FRAME, TEXT_BOX_OVAL, TEXT_BOX_RECTANGLE, TEXT_FRAME, TEXT_HALIGN_CENTER, TEXT_HALIGN_LEFT, TEXT_HALIGN_RIGHT, TEXT_HOR_ALIGN, TEXT_ROTATION, TEXT_VALIGN_BASELINE, TEXT_VALIGN_BOTTOM, TEXT_VALIGN_CENTER, TEXT_VALIGN_TOP, TEXT_VERT_ALIGN, VLINES, VLINES_FILLED
-
-
Constructor Summary
Constructors Constructor Description PicEllipse()Create a new PicEllipse, centered at (0,0), with a null radius.PicEllipse(int closure)Create a new PicEllipse, centered at (0,0), with a null radius, the given closure type.PicEllipse(int closure, PicAttributeSet set)Create a new PicEllipse, centered at (0,0), with a null radius, the given closure type, and the given attribute set.PicEllipse(PicAttributeSet set)Create a new PicEllipse, centered at (0,0), with a null radius, and the given attribute set.PicEllipse(PicEllipse ellipse)"cloning" constructor (to be used by clone())PicEllipse(PicPoint p1, PicPoint p2, PicPoint p3, int closure)Create a new PicEllipse object using the 3 given points as 3 consecutive points of the surrounding parallelogram, and a default attribute set.PicEllipse(PicPoint p1, PicPoint p2, PicPoint p3, int closure, PicAttributeSet set)Create a new PicEllipse object using the 3 given points as 3 consecutive points of the surrounding parallelogram, and the given attribute set.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void_updateAxis()Compute the axes of the ellipse (smallAxis, greatAxis), and the rotated angles in terms of the skew angles.java.lang.Objectclone()Overload Object.clone() methodPicMultiCurveconvertToMultiCurve()Return a Bezier curve created from this ellipseAbstractCustomizercreateCustomizer()Returns a customizer (Swing) componentdoublegetAngleEnd()ReturnsskewAngleEnd, ie angle end of the arc in degrees, measured in the frame defined by the parallelogram.doublegetAngleExtent()Returns the extent of the arc in degrees (CCW) as measured in the parallelogram basis.doublegetAngleStart()ReturnsskewAngleStart, ie the starting angle of the arc in degrees, measured in the frame defined by the parallelogram.intgetArcType()Returns the closure type, ie one of CHORD, PIE or OPEN predefined constant fields.java.lang.StringgetArcTypeAsString()Returns the closure type as a String, ie one of "chord", "pie" or "open"doublegetGreatAxisLength()Return the length of the great-axis of this ellipse/arc.intgetLastPointIndex()Return the index of the last point that can be retrieved bygetPoint.java.lang.StringgetName()Return a localised string that represents this object's namePicPointgetPoint(int numPoint, PicPoint src)Return the user-controlled point having the given index.doublegetRotatedAngleEnd()ReturnsrotatedAngleEnd, ie the angle end of the arc in degrees as measured in the frame defined by the axes of the ellipse.doublegetRotatedAngleExtent()Returns the angle extent of the arc in degrees as measured in the frame defined by the axes of the ellipse.doublegetRotatedAngleStart()ReturnrotatedAngleStart, ie the angle start of the arc in degrees (CCW), as measured in the frame defined by the axes of the ellipse.doublegetRotationAngle()Return the rotation angle, ie the angle between the great axis of the ellipse and the horizontal axis.doublegetSmallAxisLength()Return the length of the small-axis of this ellipse/arc.PicPointgetTangentAtAngleEnd(PicVector pt)Utility for computing arrow direction.PicPointgetTangentAtAngleStart(PicVector pt)Utility for computing arrow direction.booleanisArc()Returns true if this PicEllipse is an arc, ie if angle extent does not equl 360booleanisCircle()Deprecated.use isCircular() insteadbooleanisCircular()Returns TRUE if this ellipse is circular, ie if smallAxis==greatAxis.booleanisClosed()Returns whether this arc or ellipse is closed or not.booleanisFlat()Return true if this ellipse is flat.booleanisPlain()Return true if this PicEllipse is a plain ellipse, ie if angle extent equals 360.booleanisRotated()Return true if this PicEllipse has a null rotation angle along the x-axisvoidrotate(PicPoint ptOrg, double angle)Rotate this Element by the given angle along the given pointvoidscale(double ptOrgX, double ptOrgY, double sx, double sy)Scale this object by (sx,sy) using (ptOrgX,ptOrgY) as the origin.voidsetAngleEnd(double angleEnd)Set the angle end, then fire a changed-update.voidsetAngleExtent(double angleExtent)Sets the angle extent, keeping the angle start fixed, then fire a changed update.voidsetAngleStart(double angleStart)Set the angle start, as measured in the parallelogram basis, then fire a changed-update.voidsetArcType(int closure)Sets the closure type to one of CHORD, PIE or OPEN.voidsetPlain()Set angle parameters so that this ellipse is a plain ellipse.voidsetPoint(int numPoint, PicPoint pt, EditPointConstraint constraint)Set the coordinate of the point indexed by "numPoint" to the given value.voidshear(PicPoint ptOrg, double shx, double shy)Shear this Element by the given params wrt to the given originjava.lang.StringtoString()Implementation of the Object.toString() method, used for debugging purposeprotected voidupdateAxis()Compute the axes of the ellipse (smallAxis, greatAxis), and the rotated angles in terms of the skew angles.protected voidupdateRotatedAngles()Updates values of rotatedAngleStart and rotatedAngleEnd.-
Methods inherited from class jpicedt.graphic.model.PicParallelogram
createActions, getBoundingBox, getCenter, getCenterX, getCenterY, getFirstPointIndex, getPointX, getPointY, isRectangle, toParalleloBasisCoordinates, updateParalleloBasis
-
Methods inherited from class jpicedt.graphic.model.DefaultLeafElement
addConnection, fireChangedUpdate, forwardChangedUpdate, getAllowsChildren, getNodeName, getNumberOfSpecificationPoints, getPoint, getSpecificationPoint, getSpecificationPoint, getSpecificationPointX, getSpecificationPointY, isNode, isNodeable, iterator, nodeConnectionOrigin, nodeReferencePoint, nodeReferencePointX, nodeReferencePointY, removeAllConnections, removeConnection, setNodeName, setPoint, setSpecificationPoint, translate
-
Methods inherited from class jpicedt.graphic.model.AbstractElement
anchorPointsIterator, getAttribute, getAttributeSet, getDrawing, getParent, getView, removeView, scale, setAttribute, setAttributeSet, setParent, setViewFromFactory
-
-
-
-
Field Detail
-
P_ANGLE_START
public static final int P_ANGLE_START
point marking start-of-arc- See Also:
- Constant Field Values
-
P_ANGLE_END
public static final int P_ANGLE_END
point marking end-of-arc- See Also:
- Constant Field Values
-
LAST_PT
public static final int LAST_PT
- See Also:
- Constant Field Values
-
CHORD
public static final int CHORD
prefined closure type for arcs- See Also:
- Constant Field Values
-
OPEN
public static final int OPEN
prefined closure type for arcs- See Also:
- Constant Field Values
-
PIE
public static final int PIE
prefined closure type for arcs- See Also:
- Constant Field Values
-
skewAngleStart
protected double skewAngleStart
Arc start- and end- angles in degrees as measured with respect to parallolegram's basis (seetoParalleloBasisCoordinates()for details on how this basis is defined).To wind up shortly, let U and V denote unit-vectors defined by the sides of the parallelogram (these are actually given by "l2rVec" and "b2tVec" protected fields, yet immediately after
computeParalleloBasishas been called), then the starting point of the arc is located at : Center+cos(skewAngleStart)*U+sin(skewAngleStart)*V.This value is closer to the user than rotatedAngleStart. [SR:je ne comprend pas cette phrase !!!]
Moreover, arc is modelled by the following parametrized curve :
Center + cos(t)*U+sin(t)*V,
for t ranging from skewAngleStart to skewAngleEnd.We set skewAngleStart in (-180,180], and skewAngleEnd in (skewAngleStart,skewAngleStart+360]. This means that if one makes a mirror symmetry of the parallelogram and keeps the values of these "skew" angles unchanged, then we get the mirror image of the arc.
We use degrees because user may enter a value. [SR:pending] On peut faire la conversion dans les setters correspondants (setAngleXXX). L'ideal est qd meme d'avoir la meme unite partout (en interne) pour ne pas s'emmeler les pedales.- See Also:
PicParallelogram.l2rVec,PicParallelogram.b2tVec
-
skewAngleEnd
protected double skewAngleEnd
- See Also:
skewAngleStart
-
rotationAngle
protected double rotationAngle
Angle in radians (CCW) between the great axis of the ellipse and the horizontal axis.
-
smallAxis
protected double smallAxis
Length of the small axis of the ellipse. May be negative, as this gives a more coherent behaviour under negative scaling in one direction. The sign is determined by the orientation of the parallelogram.
-
greatAxis
protected double greatAxis
Lengths of the great axis of the ellipse.
-
rotatedAngleStart
protected double rotatedAngleStart
Arc angles in degrees, as measured in the ellipse basis. These are computed from their "skew" counterparts, through a call toupdateRotatedAngles, and are obviously identical with them if surrounding parallelogram is a rectangle.These angles may be used to build an appropriate
Shapefor this Element, by first creating anArc2Dfrom these angles, then rotating this shape byrotationAngle.We restrict values of rotatedAngleStart to (-180,180], and those of rotatedAngleEnd to (rotatedAngleStart,rotatedAngleStart+360].
-
rotatedAngleEnd
protected double rotatedAngleEnd
Arc angles in degrees, as measured in the ellipse basis. These are computed from their "skew" counterparts, through a call toupdateRotatedAngles, and are obviously identical with them if surrounding parallelogram is a rectangle.These angles may be used to build an appropriate
Shapefor this Element, by first creating anArc2Dfrom these angles, then rotating this shape byrotationAngle.We restrict values of rotatedAngleStart to (-180,180], and those of rotatedAngleEnd to (rotatedAngleStart,rotatedAngleStart+360].
-
closure
protected int closure
closure type
-
-
Constructor Detail
-
PicEllipse
public PicEllipse()
Create a new PicEllipse, centered at (0,0), with a null radius. CLOSED is the default closure
-
PicEllipse
public PicEllipse(PicAttributeSet set)
Create a new PicEllipse, centered at (0,0), with a null radius, and the given attribute set.
-
PicEllipse
public PicEllipse(int closure)
Create a new PicEllipse, centered at (0,0), with a null radius, the given closure type.- Parameters:
closure- one of CHORD, PIE or OPEN.
-
PicEllipse
public PicEllipse(int closure, PicAttributeSet set)Create a new PicEllipse, centered at (0,0), with a null radius, the given closure type, and the given attribute set.- Parameters:
closure- one of CHORD, PIE or OPEN.
-
PicEllipse
public PicEllipse(PicPoint p1, PicPoint p2, PicPoint p3, int closure, PicAttributeSet set)
Create a new PicEllipse object using the 3 given points as 3 consecutive points of the surrounding parallelogram, and the given attribute set.- Parameters:
closure- one of CHORD, PIE or OPEN.
-
PicEllipse
public PicEllipse(PicPoint p1, PicPoint p2, PicPoint p3, int closure)
Create a new PicEllipse object using the 3 given points as 3 consecutive points of the surrounding parallelogram, and a default attribute set.- Parameters:
closure- one of CHORD, PIE or OPEN.
-
PicEllipse
public PicEllipse(PicEllipse ellipse)
"cloning" constructor (to be used by clone())- Parameters:
The- PicEllipse object to clone
-
-
Method Detail
-
clone
public java.lang.Object clone()
Overload Object.clone() method- Specified by:
clonein interfaceElement- Overrides:
clonein classPicParallelogram
-
getName
public java.lang.String getName()
Return a localised string that represents this object's name- Specified by:
getNamein interfaceElement- Overrides:
getNamein classPicParallelogram- Returns:
- a localised string that represents this object's name
-
setPoint
public void setPoint(int numPoint, PicPoint pt, EditPointConstraint constraint)Set the coordinate of the point indexed by "numPoint" to the given value. If point controls the parallelogram, calls the paralleogram setPoint method, and updates axis.- Specified by:
setPointin interfaceElement- Overrides:
setPointin classPicParallelogram- Parameters:
numPoint- one of P_TL, P_TR, P_BL, P_BR, SIDE_T, SIDE_B, SIDE_L, SIDE_R or P_CENTER.constraint- either null, DEFAULT, CENTER_FIXED or SQUARE
-
getPoint
public PicPoint getPoint(int numPoint, PicPoint src)
Return the user-controlled point having the given index. The general contract in Element is to return an IMMUTABLE instance of PicPoint, so that the only way to alter the geometry of this element is by calling thesetPointmethod.- Specified by:
getPointin interfaceElement- Overrides:
getPointin classPicParallelogram- Parameters:
numPoint- the point index, should be greater or equal to the value returned bygetFirstPointIndex, and lower or equal togetLastPointIndex.- Returns:
- the point indexed by
numPoint; ifsrcis null, allocates a new PicPoint and return it, otherwise directly modifiessrcand returns it as well for convenience.
-
scale
public void scale(double ptOrgX, double ptOrgY, double sx, double sy)Scale this object by (sx,sy) using (ptOrgX,ptOrgY) as the origin. This implementation simply apply a scaling transform to all specification-points. Note thatsxandsymay be negative. This method eventually fires a changed-update event.- Specified by:
scalein interfaceElement- Overrides:
scalein classDefaultLeafElement
-
rotate
public void rotate(PicPoint ptOrg, double angle)
Rotate this Element by the given angle along the given point- Specified by:
rotatein interfaceElement- Overrides:
rotatein classPicParallelogram- Parameters:
angle- rotation angle in radians
-
shear
public void shear(PicPoint ptOrg, double shx, double shy)
Shear this Element by the given params wrt to the given origin- Specified by:
shearin interfaceElement- Overrides:
shearin classPicParallelogram
-
convertToMultiCurve
public PicMultiCurve convertToMultiCurve()
Return a Bezier curve created from this ellipse- Specified by:
convertToMultiCurvein interfacePicMultiCurveConvertable- Overrides:
convertToMultiCurvein classPicParallelogram- Since:
- jpicedt 1.4
-
getRotationAngle
public double getRotationAngle()
Return the rotation angle, ie the angle between the great axis of the ellipse and the horizontal axis.- Returns:
- the rotation angle in radians (CCW)
- See Also:
rotationAngle
-
getGreatAxisLength
public double getGreatAxisLength()
Return the length of the great-axis of this ellipse/arc.
-
getSmallAxisLength
public double getSmallAxisLength()
Return the length of the small-axis of this ellipse/arc.
-
setAngleStart
public void setAngleStart(double angleStart)
Set the angle start, as measured in the parallelogram basis, then fire a changed-update. Arc always extends CCW from angle-start to angle-end, ie angle-extent is always positive.- Parameters:
The- starting angle of the arc, in degrees, counted COUNTERCLOCKWISE (aka trigonometric), and measured in the parallelogram basis, ieskewAngleStart.
-
getAngleStart
public double getAngleStart()
ReturnsskewAngleStart, ie the starting angle of the arc in degrees, measured in the frame defined by the parallelogram.
-
setAngleEnd
public void setAngleEnd(double angleEnd)
Set the angle end, then fire a changed-update. Arc always extends CCW from angle-start to angle-end, ie angle-extent is always positive.- Parameters:
The- angle end of the arc, in degrees, measured in the frame defined by the parallelogram, ieskewAngleEnd.
-
getAngleEnd
public double getAngleEnd()
ReturnsskewAngleEnd, ie angle end of the arc in degrees, measured in the frame defined by the parallelogram. (value of skewAngleStart)
-
setAngleExtent
public void setAngleExtent(double angleExtent)
Sets the angle extent, keeping the angle start fixed, then fire a changed update. If not positive, 360 is added to it.- Parameters:
Angular- extent of the arc, in degrees, counted COUNTERCLOCKWISE as measured in parallelogram basis.
-
getAngleExtent
public double getAngleExtent()
Returns the extent of the arc in degrees (CCW) as measured in the parallelogram basis. Note that this method returns 360 for a plain ellipse, not 0.- Returns:
- an angle in (0,360]
-
getRotatedAngleStart
public double getRotatedAngleStart()
ReturnrotatedAngleStart, ie the angle start of the arc in degrees (CCW), as measured in the frame defined by the axes of the ellipse.
-
getRotatedAngleEnd
public double getRotatedAngleEnd()
ReturnsrotatedAngleEnd, ie the angle end of the arc in degrees as measured in the frame defined by the axes of the ellipse.
-
getRotatedAngleExtent
public double getRotatedAngleExtent()
Returns the angle extent of the arc in degrees as measured in the frame defined by the axes of the ellipse.
-
getArcType
public int getArcType()
Returns the closure type, ie one of CHORD, PIE or OPEN predefined constant fields.
-
getArcTypeAsString
public java.lang.String getArcTypeAsString()
Returns the closure type as a String, ie one of "chord", "pie" or "open"
-
setArcType
public void setArcType(int closure)
Sets the closure type to one of CHORD, PIE or OPEN.
-
getLastPointIndex
public int getLastPointIndex()
Return the index of the last point that can be retrieved bygetPoint.- Specified by:
getLastPointIndexin interfaceElement- Overrides:
getLastPointIndexin classPicParallelogram
-
isFlat
public boolean isFlat()
Return true if this ellipse is flat.
-
isCircular
public boolean isCircular()
Returns TRUE if this ellipse is circular, ie if smallAxis==greatAxis.- See Also:
getSmallAxisLength()
-
isCircle
public boolean isCircle()
Deprecated.use isCircular() instead
-
isPlain
public boolean isPlain()
Return true if this PicEllipse is a plain ellipse, ie if angle extent equals 360.
-
isArc
public boolean isArc()
Returns true if this PicEllipse is an arc, ie if angle extent does not equl 360
-
isRotated
public boolean isRotated()
Return true if this PicEllipse has a null rotation angle along the x-axis
-
setPlain
public void setPlain()
Set angle parameters so that this ellipse is a plain ellipse.
-
isClosed
public boolean isClosed()
Returns whether this arc or ellipse is closed or not. This depends on the closure type, and this PicEllipse being plain or not.
-
_updateAxis
protected void _updateAxis()
Compute the axes of the ellipse (smallAxis, greatAxis), and the rotated angles in terms of the skew angles.
-
updateAxis
protected void updateAxis()
Compute the axes of the ellipse (smallAxis, greatAxis), and the rotated angles in terms of the skew angles.
-
updateRotatedAngles
protected void updateRotatedAngles()
Updates values of rotatedAngleStart and rotatedAngleEnd. Axes must be updated beforehands for this computation to be valid. if greatAxis==0 (implies smallAxis==0), we keep the old values [case of ellipse reduced to a point]. Flat case is handled by fromSkewToRotated.
-
getTangentAtAngleStart
public PicPoint getTangentAtAngleStart(PicVector pt)
Utility for computing arrow direction.- Parameters:
pt- a preallocated PicPoint that get filled with the result ; a new one is allocated if pt==null- Returns:
- a unit-1 vector tangent to the arc, at phi = start angle, pointing "outwardly"
-
getTangentAtAngleEnd
public PicPoint getTangentAtAngleEnd(PicVector pt)
Utility for computing arrow direction.- Parameters:
pt- a preallocated PicPoint that get filled with the result ; a new one is allocated if pt==null- Returns:
- a unit-1 vector tangent to the arc, at phi = end angle, pointing "outwardly"
-
toString
public java.lang.String toString()
Implementation of the Object.toString() method, used for debugging purpose- Overrides:
toStringin classPicParallelogram- Since:
- PicEdt 1.1.4
-
createCustomizer
public AbstractCustomizer createCustomizer()
Description copied from interface:CustomizerFactoryReturns a customizer (Swing) component- Specified by:
createCustomizerin interfaceCustomizerFactory- Overrides:
createCustomizerin classPicParallelogram- Returns:
- a Customizer for geometry editing
- Since:
- jpicedt 1.3.3
-
-