java.lang.Object
org.openscience.cdk.renderer.elements.path.PathElement
org.openscience.cdk.renderer.elements.path.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
    final double[]
    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.
  • Method Summary

    Modifier and Type
    Method
    Description
    float[]
    Get the points in the path.
    void
    points(double[] coords)
    Load the provided array with the specified coordinates of this path element.

    Methods inherited from class org.openscience.cdk.renderer.elements.path.PathElement

    type

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • coords

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

    • 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 Details

    • 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)