Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.Transform.scale()


  public void scale(double scaleX, double scaleY) {
    Transform transform = new Transform(gc.getDevice());
    Transform transform2 = new Transform(gc.getDevice());
    gc.getTransform(transform);
    transform2.scale((float) scaleX, (float) scaleY);
    transform.multiply(transform2);
    gc.setTransform(transform);
  }

  public void bezierVertex(double cx1, double cy1, double cx2, double cy2,
View Full Code Here


     * @param scaleY  the scale factor along the y-axis.
     */
    public void scale(double scaleX, double scaleY) {
        Transform swtTransform = new Transform(this.gc.getDevice());
        this.gc.getTransform(swtTransform);
        swtTransform.scale((float) scaleX, (float) scaleY);
        this.gc.setTransform(swtTransform);
        swtTransform.dispose();
    }

    /**
 
View Full Code Here

     * @param scaleY  the scale factor along the y-axis.
     */
    public void scale(double scaleX, double scaleY) {
        Transform swtTransform = new Transform(this.gc.getDevice());
        this.gc.getTransform(swtTransform);
        swtTransform.scale((float) scaleX, (float) scaleY);
        this.gc.setTransform(swtTransform);
        swtTransform.dispose();
    }

    /**
 
View Full Code Here

      printerTransform = new Transform(printer);

      printerGC.getTransform(printerTransform);
      printerTransform.translate(paperDisplayBounds.x - dirtyPaperBounds.x,
                  paperDisplayBounds.y - dirtyPaperBounds.y);
      printerTransform.scale((float) paperDisplayBounds.width
          / (float) paperSize.x, (float) paperDisplayBounds.height
          / (float) paperSize.y);
      printerGC.setTransform(printerTransform);
     
      PrintContext context = new PrintContext( printerGC, getDisplay().getDPI() );
View Full Code Here

     * @param scaleY  the scale factor along the y-axis.
     */
    public void scale(double scaleX, double scaleY) {
        Transform swtTransform = new Transform(this.gc.getDevice());
        this.gc.getTransform(swtTransform);
        swtTransform.scale((float) scaleX, (float) scaleY);
        this.gc.setTransform(swtTransform);
        swtTransform.dispose();
    }

    /**
 
View Full Code Here

                            Transform printerTransform = new Transform(printer);

                            // Adjust for DPI difference between display and
                            // printer
                            printerTransform
                                    .scale(scaleFactor.x, scaleFactor.y);

                            // Adjust for margins
                            printerTransform.translate(printerClientArea.x
                                    / scaleFactor.x, printerClientArea.y
View Full Code Here

    Rectangle bounds = image.getBounds();

    // top
    Transform transform = new Transform(device);
    transform.translate((width - bounds.width) / 2, (height - bounds.height) / 2);
    transform.scale(1, -1);
    gc.setTransform(transform);

    // draw the original image
    gc.drawImage(image, 0, 0);
View Full Code Here

    transform.dispose();

    // bottom
    transform = new Transform(device);
    transform.translate((width - bounds.width) / 2, 2 * bounds.height + (height - bounds.height) / 2);
    transform.scale(1, -1);
    gc.setTransform(transform);

    // draw the original image
    gc.drawImage(image, 0, 0);

View Full Code Here

    transform.dispose();

    // left
    transform = new Transform(device);
    transform.translate((width - bounds.width) / 2, (height - bounds.height) / 2);
    transform.scale(-1, 1);
    gc.setTransform(transform);

    // draw the original image
    gc.drawImage(image, 0, 0);
View Full Code Here

    transform.dispose();

    // right
    transform = new Transform(device);
    transform.translate(2 * bounds.width + (width - bounds.width) / 2, (height - bounds.height) / 2);
    transform.scale(-1, 1);
    gc.setTransform(transform);

    // draw the original image
    gc.drawImage(image, 0, 0);

View Full Code Here

TOP
Copyright © 2018 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.