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

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

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

origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
public void transform(AffineTransform tx) {
  path.transform(tx);
  invalidate();
}
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

/**
 * Transforms all coords of the figure by the current TRANSFORM attribute
 * and then sets the TRANSFORM attribute to null.
 */
public void flattenTransform() {
  if (get(TRANSFORM) != null) {
    path.transform(get(TRANSFORM));
    set(TRANSFORM, null);
  }
  invalidate();
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

/**
 * Transforms all coords of the figure by the current TRANSFORM attribute
 * and then sets the TRANSFORM attribute to null.
 */
public void flattenTransform() {
  if (get(TRANSFORM) != null) {
    path.transform(get(TRANSFORM));
    set(TRANSFORM, null);
  }
  invalidate();
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

private ODGFigure readPathElement(IXMLElement elem)
    throws IOException {
  AffineTransform viewBoxTransform = readViewBoxTransform(elem);
  BezierPath[] paths = toPath(elem.getAttribute("d", SVG_NAMESPACE, null));
  for (BezierPath p : paths) {
    p.transform(viewBoxTransform);
  }
  String styleName = elem.getAttribute("style-name", DRAWING_NAMESPACE, null);
  HashMap<AttributeKey, Object> a = new HashMap<AttributeKey, Object>();
  a.putAll(styles.getAttributes(styleName, "graphic"));
  readCommonDrawingShapeAttributes(elem, a);
  ODGFigure f = createPathFigure(paths, a);
  return f;
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
public Rectangle2D.Double getDrawingArea() {
  if (cachedDrawingArea == null) {
    if (get(TRANSFORM) == null) {
      cachedDrawingArea = path.getBounds2D();
    } else {
      BezierPath p2 = (BezierPath) path.clone();
      p2.transform(get(TRANSFORM));
      cachedDrawingArea = p2.getBounds2D();
    }
  }
  return (Rectangle2D.Double) cachedDrawingArea.clone();
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
public Rectangle2D.Double getDrawingArea() {
  if (cachedDrawingArea == null) {
    if (get(TRANSFORM) == null) {
      cachedDrawingArea = path.getBounds2D();
    } else {
      BezierPath p2 = (BezierPath) path.clone();
      p2.transform(get(TRANSFORM));
      cachedDrawingArea = p2.getBounds2D();
    }
    double strokeTotalWidth = AttributeKeys.getStrokeTotalWidth(this);
    double width = strokeTotalWidth / 2d;
    if (get(STROKE_JOIN) == BasicStroke.JOIN_MITER) {
      width *= get(STROKE_MITER_LIMIT);
    } else if (get(STROKE_CAP) != BasicStroke.CAP_BUTT) {
      width += strokeTotalWidth * 2;
    }
    Geom.grow(cachedDrawingArea, width, width);
  }
  return (Rectangle2D.Double) cachedDrawingArea.clone();
}
org.jhotdraw.geomBezierPathtransform

Javadoc

Transforms the BezierPath.

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

  • Reading from database using SQL prepared statement
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • notifyDataSetChanged (ArrayAdapter)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Socket (java.net)
    Provides a client-side TCP socket.
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Collectors (java.util.stream)
  • Top PhpStorm plugins
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