|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IPoint
Defines an interface that classes defining a point 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
Method Summary | |
---|---|
IPoint |
centralSymmetry(IPoint pt)
Gets a point by central symmetry. |
double |
computeAngle(IPoint pt)
Computes the angle of the given point where the calling point is used as the gravity centre. |
double |
computeRotationAngle(IPoint pt1,
IPoint pt2)
Computes the angle of rotation between two points where the calling point is used as the gravity centre. |
double |
distance(double x,
double y)
|
double |
distance(IPoint pt)
|
boolean |
equals(IPoint p,
double gap)
Allows to know if the point p is equal to the current point considering a gap. |
IPoint |
getMiddlePoint(IPoint p)
|
double |
getX()
|
double |
getY()
|
IPoint |
horizontalSymmetry(IPoint origin)
Returns horizontally the point. |
IPoint |
rotatePoint(IPoint gravityC,
double theta)
Rotates a point with as reference another point. |
void |
setPoint(double newX,
double newY)
Sets the coordinates of the point. |
void |
setPoint(IPoint pt)
Changes the coordinates of the point. |
void |
setPoint2D(java.awt.geom.Point2D pt)
Defines the current point using the given point. |
void |
setX(double newX)
Sets the X coordinate of the point. |
void |
setY(double newY)
Sets the Y coordinate of the point. |
java.awt.geom.Point2D.Double |
toPoint2D()
|
void |
translate(double tx,
double ty)
Translates the point. |
IPoint |
verticalSymmetry(IPoint origin)
Returns vertically the point. |
IPoint |
zoom(double zoomLevel)
Creates a new point zoomed using the calling points. |
Method Detail |
---|
double getY()
double getX()
void setPoint(IPoint pt)
pt
- The new position.void setX(double newX)
newX
- The new X coordinate. Must be valid (not equal too NaN,...).void setY(double newY)
newY
- The new Y coordinate. Must be valid (not equal too NaN,...).void setPoint(double newX, double newY)
newX
- The new X coordinate. Must be valid (not equal too NaN,...).newY
- The new Y coordinate. Must be valid (not equal too NaN,...).IPoint centralSymmetry(IPoint pt)
pt
- The centre of the symmetry.
IPoint horizontalSymmetry(IPoint origin)
origin
- The location of the horizontal axe.
IPoint verticalSymmetry(IPoint origin)
origin
- The location of the vertical axe.
double computeAngle(IPoint pt)
pt
- The point used to compute the angle.
double computeRotationAngle(IPoint pt1, IPoint pt2)
pt1
- The first point.pt2
- The second point.
boolean equals(IPoint p, double gap)
p
- The point to compare.gap
- The approximation gap.
java.lang.IllegalArgumentException
- When gap<0
IPoint getMiddlePoint(IPoint p)
p
- The second point.
IPoint rotatePoint(IPoint gravityC, double theta)
gravityC
- The point of reference.theta
- The angle of rotation in radian.
IPoint zoom(double zoomLevel)
zoomLevel
- The zoom level.
void translate(double tx, double ty)
tx
- The X translation.ty
- The Y translation.double distance(IPoint pt)
pt
- The second point.
double distance(double x, double y)
x
- The x coordinate of the second point.y
- The y coordinate of the second point.
java.awt.geom.Point2D.Double toPoint2D()
void setPoint2D(java.awt.geom.Point2D pt)
pt
- The point 2D to copy.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |