Examples of AffineTransform


Examples of java.awt.geom.AffineTransform

     */
    public BasicIconPart(Shape shape, AffineTransform transform, DrawingAttributes da) {
        geometry = shape;

        if (transform == null) {
            transform = new AffineTransform();
        }

        baseTransform = transform;
        setRenderingAttributes(da);
    }
View Full Code Here

Examples of java.awt.geom.AffineTransform

     *        drawing attributes if they want/should. May be null.
     */
    public void render(Graphics g, int width, int height,
                       DrawingAttributes appDA) {

        AffineTransform transform = AffineTransform.getScaleInstance((double) width / 100,
                (double) height / 100);
        transform.concatenate(baseTransform);

        // Handle clip area in Graphics, first
        Shape clip = getClip();
        if (clip != null) {
            g.setClip(new GeneralPath(clip).createTransformedShape(transform));
View Full Code Here

Examples of java.awt.geom.AffineTransform

   * @see Graphics2D#getFontRenderContext()
   */
  public FontRenderContext getFontRenderContext() {
      boolean antialias = RenderingHints.VALUE_TEXT_ANTIALIAS_ON.equals(getRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING));
      boolean fractions = RenderingHints.VALUE_FRACTIONALMETRICS_ON.equals(getRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS));
      return new FontRenderContext(new AffineTransform(), antialias, fractions);
  }
View Full Code Here

Examples of java.awt.geom.AffineTransform

  /**
   * @see Graphics2D#getTransform()
   */
  public AffineTransform getTransform() {
      return new AffineTransform(oTransform);
  }
View Full Code Here

Examples of java.awt.geom.AffineTransform

    paint = Color.black;
    // possible: if parent.color is not black, then force black?
    // must check to see what AWT does?
   
    // Original User Space Transform (identity)
    oTransform = new AffineTransform();
   
    // Transform from Java Space to PDF Space
  pTransform = new AffineTransform();
  pTransform.translate(0, pf.getHeight());
  pTransform.scale(1d, -1d);

  // Combined Transform User->Java->PDF
  transform = new AffineTransform(oTransform);
  transform.concatenate(pTransform);

    // Set the line width
    setStroke(DEF_STROKE);
  }
View Full Code Here

Examples of java.awt.geom.AffineTransform

   */
  public void setTransform(AffineTransform t) {
    // Save copy of original transform.
      oTransform = t;
      // Working copy of transform
      transform = new AffineTransform(t);
      // Concatenate Java Space to PDF Space transform
      transform.concatenate(pTransform);
      this.stroke = transformStroke(originalStroke);
  }
View Full Code Here

Examples of java.awt.geom.AffineTransform

   
    private void rotate(int degrees) {
        img = picture.getImage();
       
        BufferedImage src = Utilities.toBufferedImage(new DcImageIcon(img));
        AffineTransform at = new AffineTransform();
       
        at.rotate(Math.toRadians(degrees), src.getWidth() / 2.0, src.getHeight() / 2.0);
        AffineTransform translationTransform = findTranslation (at, src);
        at.preConcatenate(translationTransform);
        BufferedImage destinationBI = new AffineTransformOp(at, AffineTransformOp.TYPE_BICUBIC).filter(src, null);

        picture = new DcImageIcon(Utilities.getBytes(new DcImageIcon(destinationBI)));
        initialize();
View Full Code Here

Examples of pythagoras.f.AffineTransform

    }

    /** Utility method for capture. */
    protected static AffineTransform toAffine (Transform t) {
        if (t instanceof AffineTransform) return (AffineTransform)t;
        else return new AffineTransform(t.scaleX(), t.scaleY(), t.rotation(), t.tx(), t.ty());
    }
View Full Code Here
TOP
Copyright © 2015 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.