TypeLibF Xojo Plugin

LineF Class (console safe)

This class defines a Line structure that uses floating point precision.

Object
   LineF

class LineF

Constructors

LineFThe default constructor for the LineF class.
LineFA constructor which takes x1, y1, x2 and y2 coordinates as a parameters.
LineFA constructor which takes two PointF points as parameters to define the line.

Properties

CloneReturns a clone of the LineF.
x1Sets or gets the x1 coordinate of the line.
x2Sets or gets the x2 coordinate of the line.
y1Sets or gets the y1 coordinate of the line.
y2Sets or gets the y2 coordinate of the line.

Methods

ContainsReturns true if the given point is within the line.
ContainsReturns true if the given coordinates is within the line.
DrawDraws the line into a Graphics context with the current color of the Graphics context.
Draw (web only) Draws the line into a WebGraphics context with the current color of the WebGraphics context.
ExtendLineReturns a copy of the line which has been extended or shrunk in both directions by given amount.
ExtendLineByRatioReturns a copy of the line which has been extended or shrunk in both directions by given percentage.
GetCenterReturns center of the line as a Point.
IntersectsReturns true if the line intersects with the other given line.
IntersectsReturns true if the line intersects with the other given line and also gives information on where the two lines crossed.
LengthReturns the length of the line.
MakeParallelCreates a new line that is parallel to the current line, offset at straight angle relative to the current line by a given distance.
PointDistanceFromInfiniteLineCalculates distance of a point from a line that is infinite long.
PointDistanceFromLineCalculates distance of a point from a fixed length line.
RotateRotates the line in a coordinate system around a defined center point.

Supported Platforms:

  • macOS Intel 64 bit
  • macOS Apple Silicon
  • Windows 32 bit
  • Windows 64 bit
  • Windows ARM 64 bit
  • Linux 32 bit
  • Linux 64 bit
  • Linux ARM 32 bit
  • Linux ARM 64 bit
  • iOS