congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
BezierPath.toGeneralPath
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

/**
 * Recomputes the BezierPath, if it is invalid.
 */
public void validatePath() {
  if (generalPath == null) {
    generalPath = toGeneralPath();
  }
}
origin: net.imagej/imagej-ui-swing

@Override
public Shape toShape(final BezierFigure figure) {
  return figure.getBezierPath().toGeneralPath();
}
origin: net.imagej/imagej-ui-swing

@Override
public Shape toShape(final LineFigure figure) {
  return figure.getBezierPath().toGeneralPath();
}
origin: net.imagej/imagej-ui-swing

@Override
public Shape toShape(final BezierFigure figure) {
  return figure.getBezierPath().toGeneralPath();
}
origin: net.imagej/imagej-ui-swing

public static void addToRegionOfInterest(final BezierPath path,
  final GeneralPathRegionOfInterest roi)
{
  addToRegionOfInterest(path.toGeneralPath().getPathIterator(null), roi);
}
origin: net.imagej/imagej-ui-swing

@SuppressWarnings("unused")
private static void show(final PathIterator iterator) {
  show(toBezierPath(iterator).toGeneralPath());
}
origin: net.imagej/imagej-ui-swing

public static BezierPath op(final BezierPath path1, final BezierPath path2,
  final OP op)
{
  final Area area1 = new Area(path1.toGeneralPath());
  final Area area2 = new Area(path2.toGeneralPath());
  switch (op) {
    case ADD:
      area1.add(area2);
      break;
    case XOR:
      area1.exclusiveOr(area2);
      break;
    case INTERSECT:
      area1.intersect(area2);
      break;
    case SUBTRACT:
      area1.subtract(area2);
      break;
  }
  return toBezierPath(area1.getPathIterator(new AffineTransform()));
}
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());
}
org.jhotdraw.geomBezierPathtoGeneralPath

Javadoc

Converts the BezierPath into a Path2D.Double.

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

  • Making http post requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setContentView (Activity)
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Collectors (java.util.stream)
  • JButton (javax.swing)
  • JFileChooser (javax.swing)
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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