Class CubicTo


  • public class CubicTo
    extends PathElement
    A cubic curve in the path.
    Author:
    Arvid
    Source code:
    main
    Belongs to CDK module:
    renderbasic
    • Field Summary

      Fields 
      Modifier and Type Field Description
      double[] coords
      Coordinates of control point 1, control point 2 and end point.
      • Fields inherited from class org.openscience.cdk.renderer.elements.path.PathElement

        type
    • Constructor Summary

      Constructors 
      Constructor Description
      CubicTo​(double[] coords)
      Make a cubic curve path element.
      CubicTo​(double cp1x, double cp1y, double cp2x, double cp2y, double epx, double epy)
      Make a cubic curve path element.
      CubicTo​(javax.vecmath.Point2d cp1, javax.vecmath.Point2d cp2, javax.vecmath.Point2d ep)
      Make a cubic curve path element.
    • Field Detail

      • coords

        public final double[] coords
        Coordinates of control point 1, control point 2 and end point.
    • Constructor Detail

      • CubicTo

        public CubicTo​(javax.vecmath.Point2d cp1,
                       javax.vecmath.Point2d cp2,
                       javax.vecmath.Point2d ep)
        Make a cubic curve path element.
        Parameters:
        cp1 - first control point in the cubic
        cp2 - second control point in the cubic
        ep - end point of the cubic
      • CubicTo

        public CubicTo​(double[] coords)
        Make a cubic curve path element.
        Parameters:
        coords - [0,1] : control point 1, [2,3] : control point 2, [4,5] end point
      • CubicTo

        public CubicTo​(double cp1x,
                       double cp1y,
                       double cp2x,
                       double cp2y,
                       double epx,
                       double epy)
        Make a cubic curve path element.
        Parameters:
        cp1x - first control point in the cubic x coord
        cp1y - first control point in the cubic y coord
        cp2x - second control point in the cubic x coord
        cp2y - second control point in the cubic y coord
        epx - end point of the cubic x coord
        epy - end point of the cubic 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)