Codota Logo
BezierPath.<init>
Code IndexAdd Codota 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)

  • Common ways to obtain BezierPath
private void myMethod () {
BezierPath b =
  • Codota Iconnew BezierPath()
  • Smart code suggestions by Codota
}
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

  • Parsing JSON documents to java classes using gson
  • getExternalFilesDir (Context)
  • startActivity (Activity)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • TimerTask (java.util)
    A task that can be scheduled for one-time or repeated execution by a Timer.
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now