# Uses of Class
org.eclipse.gef.geometry.planar.Line

Packages that use Line
Package
Description
org.eclipse.gef.geometry.convert.swt
This package provides support for converting geometric objects to SWT and for conversion between SWT and AWT.
org.eclipse.gef.geometry.euclidean
This package provides core abstractions to support calculations within 2-dimensional Euclidean space.
org.eclipse.gef.geometry.internal.utils
This package provides utility classes being used internally for geometric calculations.
org.eclipse.gef.geometry.planar
This package provides support for geometric calculations based on shapes.

## Uses of Line in org.eclipse.gef.geometry.convert.swt

Methods in org.eclipse.gef.geometry.convert.swt with parameters of type Line
Modifier and Type
Method
Description
`static final int[]`
Geometry2SWT.`toSWTPointArray(Line l)`
Returns an integer array of dimension 4, whose values represent the integer-based coordinates of this `Line`'s start and end point.

## Uses of Line in org.eclipse.gef.geometry.euclidean

Constructors in org.eclipse.gef.geometry.euclidean with parameters of type Line
Modifier
Constructor
Description
``
`Straight(Line line)`
Constructs a new `Straight` through the start and end `Point` of the given `Line`.

## Uses of Line in org.eclipse.gef.geometry.internal.utils

Methods in org.eclipse.gef.geometry.internal.utils that return Line
Modifier and Type
Method
Description
`static Line[]`
PointListUtils.`toSegmentsArray(Point[] points, boolean close)`
Transforms a sequence of `Point` coordinates into a sequence of `Line` segments, by creating a `Line` segment for each two adjacent points in the array.
Methods in org.eclipse.gef.geometry.internal.utils with parameters of type Line
Modifier and Type
Method
Description
`static Point[]`
PointListUtils.`toPointsArray(Line[] segmentsArray, boolean open)`
Transforms a sequence of `Line`s into a list of `Point`s.

## Uses of Line in org.eclipse.gef.geometry.planar

Methods in org.eclipse.gef.geometry.planar that return Line
Modifier and Type
Method
Description
`protected Line[]`
Region.`getAllEdges()`
Collects all outline segments of the internal `Rectangle`s.
`protected Line[]`
Ring.`getAllEdges()`
`Line`
RoundedRectangle.`getBottom()`
Returns the bottom edge of this `RoundedRectangle`.
`Line`
Line.`getCopy()`
Returns a new `Line`, which has the same start and end point coordinates as this one.
`Line[]`
Polyline.`getCurves()`
Returns a sequence of `Line`s, representing the segments that are obtained by linking each two successive point of this `Polyline` (including the last and the first one).
`Line`
RoundedRectangle.`getLeft()`
Returns the left edge of this `RoundedRectangle`.
`Line[]`
Polygon.`getOutlineSegments()`
Returns a sequence of `Line`s, representing the segments that are obtained by linking each two successive point of this `Polygon` (including the last and the first one).
`Line[]`
Rectangle.`getOutlineSegments()`
Returns an array of `Line`s representing the top, right, bottom, and left borders of this `Rectangle`.
`Line`
RoundedRectangle.`getRight()`
Returns the right edge of this `RoundedRectangle`.
`Line`
RoundedRectangle.`getTop()`
Returns the top edge of this `RoundedRectangle`.
`Line`
Line.`getTransformed(AffineTransform t)`
`Line`
Line.`setLine(double x1, double y1, double x2, double y2)`
Initializes this `Line` with the given start and end point coordinates
`Line`
Line.`setLine(Line l)`
Initializes this `Line` with the start and end point coordinates of the given one.
`Line`
Line.`setLine(Point p1, Point p2)`
Initializes this `Line` with the start and end point coordinates provided by the given points
`Line`
Line.`setX1(double x1)`
Sets the x-coordinate of the start `Point` of this `Line` to the given value.
`Line`
Line.`setX2(double x2)`
Sets the x-coordinate of the end `Point` of this `Line` to the given value.
`Line`
Line.`setY1(double y1)`
Sets the y-coordinate of the start `Point` of this `Line` to the given value.
`Line`
Line.`setY2(double y2)`
Sets the y-coordinate of the end `Point` of this `Line` to the given value.
`Line[]`
Polyline.`toBezier()`
`Line`
BezierCurve.`toLine()`
Returns a hard approximation of this `BezierCurve` as a `Line`.
`Line[]`
BezierCurve.`toLineStrip(double lineSimilarity)`
Computes an approximation of this `BezierCurve` by a strip of `Line`s.
`Line[]`
BezierCurve.`toLineStrip(double lineSimilarity, org.eclipse.gef.geometry.planar.BezierCurve.Interval startInterval)`
Computes an approximation of this `BezierCurve` by a strip of `Line`s.
Methods in org.eclipse.gef.geometry.planar with parameters of type Line
Modifier and Type
Method
Description
`boolean`
Ellipse.`contains(Line l)`
Tests whether the given `Line` is fully contained within this `Ellipse`.
`boolean`
Polygon.`contains(Line line)`
Checks whether the given `Line` is fully contained within this `Polygon`.
`Point`
Line.`getIntersection(Line l)`
Returns the single intersection point between this `Line` and the given one, in case it exists.
`Point[]`
Ellipse.`getIntersections(Line line)`
Returns the intersection points of this `Ellipse`'s outline with the given `Line`.
`boolean`
Line.`intersects(Line l)`
Provides an optimized version of the `BezierCurve.intersects(ICurve)` method.
`boolean`
Line.`overlaps(Line l)`
Tests whether this `Line` and the given other `Line` overlap, i.e. they share an infinite number of `Point`s.
`Line`
Line.`setLine(Line l)`
Initializes this `Line` with the start and end point coordinates of the given one.
`boolean`
Line.`touches(Line l)`
Tests whether this `Line` and the given one share at least one common point.
`boolean`
Rectangle.`touches(Line l)`
Tests whether this `Rectangle` and the given `Line` touch, i.e. whether they have at least one point in common.
Constructors in org.eclipse.gef.geometry.planar with parameters of type Line
Modifier
Constructor
Description
``
`Polyline(Line[] segmentsArray)`
Constructs a new `Polyline` from the given array of `Line` segments.