Tabnine Logo
BezierPath.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.jhotdraw.geom.BezierPath
constructor

Best Java code snippets using org.jhotdraw.geom.BezierPath.<init> (Showing top 15 results out of 315)

origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

/**
 * Creates an empty BezierFigure, for example without any
 * <code>BezierPath.Node</code>s.
 * The BezierFigure will not draw anything, unless at least two nodes
 * are added to it.
 *
 * @param isClosed Specifies whether the <code>BezierPath</code> shall
 * be closed.
 */
public BezierFigure(boolean isClosed) {
  path = new BezierPath();
  set(PATH_CLOSED, isClosed);
  //path.setClosed(isClosed);
}
origin: net.imagej/imagej-ui-swing

public static BezierPath toBezierPath(final PathIterator iterator) {
  final BezierPath path = new BezierPath();
  final double[] segment = new double[6];
  for (; !iterator.isDone(); iterator.next()) {
    final int type = iterator.currentSegment(segment);
    switch (type) {
      case PathIterator.SEG_MOVETO:
        path.moveTo(segment[0], segment[1]);
        break;
      case PathIterator.SEG_LINETO:
        path.lineTo(segment[0], segment[1]);
        break;
      case PathIterator.SEG_QUADTO:
        path.quadTo(segment[0], segment[1], segment[2], segment[3]);
        break;
      case PathIterator.SEG_CUBICTO:
        path.curveTo(segment[0], segment[1], segment[2], segment[3],
          segment[4], segment[5]);
        break;
      case PathIterator.SEG_CLOSE:
        path.setClosed(true);
        break;
    }
  }
  return path;
}
origin: net.imagej/imagej-ui-swing

public static void main(final String[] args) {
  BezierPath path1 = new BezierPath();
  path1.moveTo(0, 0);
  path1.lineTo(100, 0);
  path1.lineTo(100, 100);
  path1.lineTo(0, 0);
  final GeneralPath path2 = new GeneralPath();
  path2.moveTo(0, 0);
  path2.lineTo(100, 0);
  path2.lineTo(100, 100);
  path2.closePath();
  // path1 = toBezierPath(path2.getPathIterator(new AffineTransform()));
  final BezierPath path3 = new BezierPath();
  path3.moveTo(0, 100);
  path3.lineTo(100, 0);
  path3.lineTo(100, 100);
  path3.lineTo(0, 100);
  path1 = subtract(path1, path3);
  show(path1.toGeneralPath());
}
origin: net.imagej/imagej-ui-swing

case PathIterator.SEG_MOVETO:
  if (bezierPath != null) add(bezierPath, false);
  bezierPath = new BezierPath();
  bezierPath.moveTo(segment[0], segment[1]);
  break;
origin: net.imagej/ij-ui-swing

case PathIterator.SEG_MOVETO:
  if (bezierPath != null) add(bezierPath, false);
  bezierPath = new BezierPath();
  bezierPath.moveTo(segment[0], segment[1]);
  break;
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

BezierPath fittedPath = new BezierPath();
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

/** Creates new form BezierDemo */
public BezierDemo() {
  initComponents();
  canvas = new Canvas();
  canvas.setOpaque(true);
  canvas.setBackground(Color.WHITE);
  canvas.addMouseListener(handler);
  canvas.addMouseMotionListener(handler);
  add(canvas, BorderLayout.CENTER);
  Point2D.Double[] d = { //  Digitized points 
  };
  BezierPath digi = new BezierPath();
  digi.addPolyline(Arrays.asList(d));
  Example ex = new Example();
  examples.add(ex);
  ex.digitized = digi;
  ex.error = 2d;
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

createdFigure.willChange();
BezierPath figurePath = createdFigure.getBezierPath();
BezierPath digitizedPath = new BezierPath();
for (int i = nodeCountBeforeDrag - 1, n = figurePath.size(); i < n; i++) {
  digitizedPath.add(figurePath.get(nodeCountBeforeDrag - 1));
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
public Shape createStrokedShape(Shape s) {
  BezierPath bp = new BezierPath();
  Path2D.Double left = new Path2D.Double();
  Path2D.Double right = new Path2D.Double();
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

  paths.add(path);
path = new BezierPath();
  paths.add(path);
path = new BezierPath();
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

  paths.add(path);
path = new BezierPath();
  paths.add(path);
path = new BezierPath();
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
public Shape createStrokedShape(Shape s) {
  BezierPath bp = new BezierPath();
  Path2D.Double left = new Path2D.Double();
  Path2D.Double right = new Path2D.Double();
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

BezierPath tempPath = new BezierPath();
Node t1, t2;
tempPath.add(t1 = new Node());
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

public BezierPath getBezierPath() {
  Rectangle2D.Double r = (Rectangle2D.Double) rectangle.clone();
  BezierPath triangle = new BezierPath();
  switch (get(ORIENTATION)) {
    case NORTH :
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

double relativeLen = 0d;
Node v1, v2;
BezierPath tempPath = new BezierPath();
Node t1, t2;
tempPath.add(t1 = new Node());
org.jhotdraw.geomBezierPath<init>

Javadoc

Creates a new instance.

Popular methods of BezierPath

  • curveTo
    Adds a cubic curve to the bezier path. This is a convenience method for adding a node with control p
  • lineTo
    Adds a (at least) linear 'curve' to the bezier path. If the previous node has no C2 control point th
  • moveTo
    Adds the first node to the bezier path. This is a convenience method for adding the first node with
  • quadTo
    Adds a (at least) quadratic curve to the bezier path. If the previous node has no C2 control point t
  • setClosed
  • size
  • transform
    Transforms the BezierPath.
  • toGeneralPath
    Converts the BezierPath into a Path2D.Double.
  • add
  • addAll
  • addPolyline
    Adds a set of nodes to the path. Convenience method for adding multiple nodes with a single control
  • arcTo
    Adds an elliptical arc, defined by two radii, an angle from the x-axis, a flag to choose the large a
  • addPolyline,
  • arcTo,
  • chop,
  • clear,
  • clone,
  • contains,
  • findSegment,
  • get,
  • getBounds2D

Popular in Java

  • Updating database using SQL prepared statement
  • onCreateOptionsMenu (Activity)
  • setContentView (Activity)
  • setRequestProperty (URLConnection)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Runner (org.openjdk.jmh.runner)
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now