Package com.avaya.clientservices.collaboration.drawing

## Class Segment2D

- java.lang.Object
- - com.avaya.clientservices.collaboration.drawing.Line2D
  - - com.avaya.clientservices.collaboration.drawing.Segment2D

-     public class Segment2D
      extends Line2D

  Represents segment, a part of line that is bounded by two distinct endpoints, and contain every point on the line between its endpoints.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Segment2D​(float x1, float y1, float x2, float y2)` |
    `Segment2D​(android.graphics.PointF a, android.graphics.PointF b)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `double` | `distance​(android.graphics.PointF point)` | Calculates shortest distance from a point to a segment.

    - ### Methods inherited from class com.avaya.clientservices.collaboration.drawing.Line2D

      `getX1, getX2, getY1, getY2, set, set`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Segment2D

          public Segment2D​(android.graphics.PointF a,
                           android.graphics.PointF b)

    - #### Segment2D

          public Segment2D​(float x1,
                           float y1,
                           float x2,
                           float y2)

  - ### Method Detail

    - #### distance

          public double distance​(android.graphics.PointF point)

      Calculates shortest distance from a point to a segment.
      Overrides:
        `distance` in class `Line2D`
      Parameters:
        `point` - point object.
      Returns:
        shortest distance from a point to a segment