Tabnine Logo
BezierFigure.getBezierPath
Code IndexAdd Tabnine to your IDE (free)

How to use
getBezierPath
method
in
org.jhotdraw.draw.BezierFigure

Best Java code snippets using org.jhotdraw.draw.BezierFigure.getBezierPath (Showing top 14 results out of 315)

origin: net.imagej/imagej-ui-swing

@Override
protected void drawStroke(Graphics2D g) {
  for (final BezierFigure figure : figures) {
    g.draw(figure.getBezierPath());
  }
}
origin: net.imagej/ij-ui-swing

@Override
protected void drawStroke(Graphics2D g) {
  for (final BezierFigure figure : figures) {
    g.draw(figure.getBezierPath());
  }
}
origin: net.imagej/imagej-ui-swing

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

public synchronized GeneralPath getGeneralPath() {
  if (path == null) {
    path = new GeneralPath(Path2D.WIND_EVEN_ODD);
    for (final BezierFigure figure : figures) {
      path.append(figure.getBezierPath(), false);
    }
  }
  return path;
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

/**
 * Gets the segment of the polyline that is hit by
 * the given Point2D.Double.
 * 
 * @param find a Point on the bezier path
 * @param tolerance a tolerance, tolerance should take into account
 * the line width, plus 2 divided by the zoom factor. 
 * @return the index of the segment or -1 if no segment was hit.
 */
public int findSegment(Point2D.Double find, double tolerance) {
  return getBezierPath().findSegment(find, tolerance);
}
origin: net.imagej/imagej-ui-swing

public synchronized GeneralPath getGeneralPath() {
  if (path == null) {
    path = new GeneralPath(Path2D.WIND_EVEN_ODD);
    for (final BezierFigure figure : figures) {
      path.append(figure.getBezierPath(), false);
    }
  }
  return path;
}
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 void transform(AffineTransform tx) {
  for (final BezierFigure figure : figures) {
    figure.getBezierPath().transform(tx);
  }
  invalidate();
}
origin: net.imagej/ij-ui-swing

@Override
public void transform(AffineTransform tx) {
  for (final BezierFigure figure : figures) {
    figure.getBezierPath().transform(tx);
  }
  invalidate();
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

protected void writePolygonElement(IXMLElement parent, SVGPathFigure f) throws IOException {
  LinkedList<Point2D.Double> points = new LinkedList<Point2D.Double>();
  for (int i = 0, n = f.getChildCount(); i < n; i++) {
    BezierPath bezier = ((BezierFigure) f.getChild(i)).getBezierPath();
    for (BezierPath.Node node : bezier) {
      points.add(new Point2D.Double(node.x[0], node.y[0]));
    }
  }
  parent.addChild(createPolygon(
      document,
      points.toArray(new Point2D.Double[points.size()]),
      f.getAttributes()));
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

protected void writePolylineElement(IXMLElement parent, SVGPathFigure f) throws IOException {
  LinkedList<Point2D.Double> points = new LinkedList<Point2D.Double>();
  for (int i = 0, n = f.getChildCount(); i < n; i++) {
    BezierPath bezier = ((BezierFigure) f.getChild(i)).getBezierPath();
    for (BezierPath.Node node : bezier) {
      points.add(new Point2D.Double(node.x[0], node.y[0]));
    }
  }
  parent.addChild(createPolyline(
      document,
      points.toArray(new Point2D.Double[points.size()]),
      f.getAttributes()));
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

protected void writePathElement(IXMLElement parent, SVGPathFigure f) throws IOException {
  BezierPath[] beziers = new BezierPath[f.getChildCount()];
  for (int i = 0; i < beziers.length; i++) {
    beziers[i] = ((BezierFigure) f.getChild(i)).getBezierPath();
  }
  parent.addChild(createPath(
      document,
      beziers,
      f.getAttributes()));
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

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

@Override
public void draw(Graphics2D g) {
  BezierFigure owner = getOwner();
  Shape bounds = owner.getBezierPath();
  if (owner.get(TRANSFORM) != null) {
    bounds = owner.get(TRANSFORM).createTransformedShape(bounds);
org.jhotdraw.drawBezierFiguregetBezierPath

Javadoc

Returns a clone of the bezier path of this figure.

Popular methods of BezierFigure

  • <init>
    Creates an empty BezierFigure, for example without anyBezierPath.Nodes. The BezierFigure will not dr
  • clone
  • set
  • setBezierPath
  • addFigureListener
  • addNode
    Adds a control point.
  • createHandles
  • getBounds
  • getNode
    Gets a control point.
  • getNodeCount
    Gets the node count.
  • removeNode
    Removes the Node at the specified index.
  • restoreAttributesTo
  • removeNode,
  • restoreAttributesTo,
  • setAttributeEnabled,
  • setAttributes,
  • changed,
  • chop,
  • drawCaps,
  • findSegment,
  • fireUndoableEditHappened

Popular in Java

  • Creating JSON documents from java classes using gson
  • setContentView (Activity)
  • getSystemService (Context)
  • getSupportFragmentManager (FragmentActivity)
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • BoxLayout (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top plugins for WebStorm
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