Tabnine Logo
BezierPath.moveTo
Code IndexAdd Tabnine to your IDE (free)

How to use
moveTo
method
in
org.jhotdraw.geom.BezierPath

Best Java code snippets using org.jhotdraw.geom.BezierPath.moveTo (Showing top 10 results out of 315)

origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
public void mousePressed(MouseEvent e) {
  example = new Example();
  examples.add(example);
  example.error = getError();
  double zoomFactor = getZoomFactor();
  example.digitized.moveTo(e.getX() / zoomFactor, e.getY() / zoomFactor);
  canvas.repaint();
}
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: org.opentcs.thirdparty.jhotdraw/jhotdraw

case NORTH :
default :
  triangle.moveTo((float) (r.x + r.width / 2), (float) r.y);
  triangle.lineTo((float) (r.x + r.width), (float) (r.y + r.height));
  triangle.lineTo((float) r.x, (float) (r.y + r.height));
  break;
case NORTH_EAST :
  triangle.moveTo((float) (r.x), (float) r.y);
  triangle.lineTo((float) (r.x + r.width), (float) (r.y));
  triangle.lineTo((float) (r.x + r.width), (float) (r.y + r.height));
  break;
case EAST :
  triangle.moveTo((float) (r.x), (float) (r.y));
  triangle.lineTo((float) (r.x  + r.width), (float) (r.y + r.height / 2d));
  triangle.lineTo((float) r.x, (float) (r.y + r.height));
  break;
case SOUTH_EAST :
  triangle.moveTo((float) (r.x + r.width), (float) (r.y));
  triangle.lineTo((float) (r.x + r.width), (float) (r.y + r.height));
  triangle.lineTo((float) (r.x), (float) (r.y + r.height));
  break;
case SOUTH :
  triangle.moveTo((float) (r.x + r.width / 2), (float) (r.y + r.height));
  triangle.lineTo((float) r.x, (float) r.y);
  triangle.lineTo((float) (r.x + r.width), (float) r.y);
  break;
case SOUTH_WEST :
  triangle.moveTo((float) (r.x + r.width), (float) (r.y + r.height));
  triangle.lineTo((float) (r.x), (float) (r.y + r.height));
origin: net.imagej/imagej-ui-swing

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

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

  bp.moveTo(coords[0], coords[1]);
  break;
case PathIterator.SEG_LINETO:
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

path.moveTo(p.x, p.y);
nextCommand = 'L';
break;
path.moveTo(p.x, p.y);
nextCommand = 'l';
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

path.moveTo(p.x, p.y);
nextCommand = 'L';
break;
path.moveTo(p.x, p.y);
nextCommand = 'l';
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

  bp.moveTo(coords[0], coords[1]);
  break;
case PathIterator.SEG_LINETO:
org.jhotdraw.geomBezierPathmoveTo

Javadoc

Adds the first node to the bezier path.

This is a convenience method for adding the first node with a single control point C0 to the bezier path.

Popular methods of BezierPath

  • <init>
    Creates a new instance.
  • 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
  • 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

  • Finding current android device location
  • getExternalFilesDir (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setScale (BigDecimal)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • 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