|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ILine
Defines an interface that classes defining a line 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[] |
findPoints(double x,
double y,
double distance)
Gets the points which are on the line and at the distance "distance" of the point "p" of the line. |
IPoint[] |
findPoints(IPoint p,
double distance)
Gets the points which are on the line and at the distance "distance" of the point "p" of the line. |
IPoint[] |
findPoints(java.awt.geom.Point2D p,
double distance)
Gets the points which are on the line and at the distance "distance" of the point "p" of the line. |
double |
getA()
|
double |
getB()
|
IPoint |
getBottomRightPoint()
|
IPoint |
getIntersection(ILine l)
|
IPoint |
getIntersectionSegment(ILine l)
|
double |
getLineAngle()
Computes the angle of the line. |
IPoint |
getMiddlePt()
|
ILine |
getPerpendicularLine(IPoint pt)
Creates the line which is perpendicular to the current line at the point pt. |
IPoint |
getPoint1()
|
IPoint |
getPoint2()
|
IPoint |
getTopLeftPoint()
|
double |
getX1()
|
double |
getX2()
|
double |
getXWithEquation(double y)
Gets the X-coordinate thanks to the equation of the line and the Y-coordinate of the point. |
double |
getY1()
|
double |
getY2()
|
double |
getYWithEquation(double x)
Gets the Y-coordinate thanks to the equation of the line and the X-coordinate of the point. |
boolean |
isDot()
|
boolean |
isHorizontalLine()
|
boolean |
isVerticalLine()
|
void |
setLine(double x1,
double y1,
double x2,
double y2)
Sets the position of the line. |
void |
setP1(double x,
double y)
Sets the coordinates of the first point. |
void |
setP1(IPoint pt)
Sets the first point. |
void |
setP2(double x,
double y)
Sets the coordinates of the second point. |
void |
setP2(IPoint pt)
Sets the second point. |
void |
setX1(double x1)
Sets the x coordinate of the first point. |
void |
setX2(double x2)
Sets the x coordinate of the second point. |
void |
setY1(double y1)
Sets the y coordinate of the first point. |
void |
setY2(double y2)
Sets the y coordinate of the second point. |
void |
updateAandB()
Update the y-intercept b and slope a . |
Method Detail |
---|
double getLineAngle()
double getX1()
double getX2()
double getY1()
double getY2()
IPoint getPoint1()
IPoint getPoint2()
boolean isVerticalLine()
boolean isHorizontalLine()
boolean isDot()
void setLine(double x1, double y1, double x2, double y2)
x1
- The x coordinate of the first point.y1
- The y coordinate of the first point.x2
- The x coordinate of the second point.y2
- The y coordinate of the second point.void setX1(double x1)
x1
- The new x coordinate of the first point.void setX2(double x2)
x2
- The new x coordinate of the second point.void setY1(double y1)
y1
- The new y coordinate of the first point.void setY2(double y2)
y2
- The new y coordinate of the second point.void setP1(IPoint pt)
pt
- The new first point.void setP2(IPoint pt)
pt
- The new second point.void setP1(double x, double y)
x
- The new x coordinate of the first point.y
- The new y coordinate of the first point.void setP2(double x, double y)
x
- The new x coordinate of the second point.y
- The new y coordinate of the second point.double getA()
double getB()
IPoint getTopLeftPoint()
IPoint getBottomRightPoint()
ILine getPerpendicularLine(IPoint pt)
pt
- The point of crossing between the two lines.
IPoint getIntersection(ILine l)
l
- The second lines
IPoint getMiddlePt()
IPoint getIntersectionSegment(ILine l)
l
- The second line.
IPoint[] findPoints(double x, double y, double distance)
x
- The x-coordinate of the point of reference.y
- The y-coordinate of the point of reference.distance
- The distance between p and the points we must find.
IPoint[] findPoints(IPoint p, double distance)
p
- The point of reference.distance
- The distance between p and the points we must find.
IPoint[] findPoints(java.awt.geom.Point2D p, double distance)
p
- The point of reference.distance
- The distance between p and the points we must find.
double getYWithEquation(double x)
x
- The X-coordinate of the point.
double getXWithEquation(double y)
y
- The Y-coordinate of the point.
void updateAandB()
b
and slope a
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |