Class LineTo


  • public class LineTo
    extends PathElement
    A line element in the path.
    Author:
    Arvid
    Source code:
    main
    Belongs to CDK module:
    renderbasic
    • Field Summary

      Fields 
      Modifier and Type Field Description
      double[] coords
      The point to make a line to.
      • Fields inherited from class org.openscience.cdk.renderer.elements.path.PathElement

        type
    • Constructor Summary

      Constructors 
      Constructor Description
      LineTo​(double[] coords)
      Make a line path element.
      LineTo​(double x, double y)
      Make a line path element.
      LineTo​(javax.vecmath.Point2d point)
      Make a line to this point.
    • Field Detail

      • coords

        public final double[] coords
        The point to make a line to.
    • Constructor Detail

      • LineTo

        public LineTo​(javax.vecmath.Point2d point)
        Make a line to this point.
        Parameters:
        point - the endpoint of the line
      • LineTo

        public LineTo​(double[] coords)
        Make a line path element.
        Parameters:
        coords - the x,y coordinates in index 0,1
      • LineTo

        public LineTo​(double x,
                      double y)
        Make a line path element.
        Parameters:
        x - x coord
        y - y coord
    • Method Detail

      • points

        public float[] points()
        Get the points in the path.
        Specified by:
        points in class PathElement
        Returns:
        a list of points
      • points

        public void points​(double[] coords)
        Load the provided array with the specified coordinates of this path element.
        Specified by:
        points in class PathElement
        Parameters:
        coords - coordinates (length = 6)