Package org.eclipse.swt.graphics

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


     * @param theta  the angle of rotation.
     */
    public void rotate(double theta) {
        Transform swtTransform = new Transform(this.gc.getDevice());
        this.gc.getTransform(swtTransform);
        swtTransform.rotate((float) (theta * 180 / Math.PI));
        this.gc.setTransform(swtTransform);
        swtTransform.dispose();
    }

    /**
 
View Full Code Here


    if (placement.isRotateAll()) {
      transform.translate(imageBounds.x, imageBounds.y);
     
      if (placement == Placement.LEFT_ROTATE_ALL) {
        transform.translate(0, imageBounds.height);
        transform.rotate(-90);
      } else if (placement == Placement.RIGHT_ROTATE_ALL) {
        transform.rotate(90);
        transform.translate(0, -imageBounds.width);
      }
     
View Full Code Here

     
      if (placement == Placement.LEFT_ROTATE_ALL) {
        transform.translate(0, imageBounds.height);
        transform.rotate(-90);
      } else if (placement == Placement.RIGHT_ROTATE_ALL) {
        transform.rotate(90);
        transform.translate(0, -imageBounds.width);
      }
     
      transform.translate(-imageBounds.x, -imageBounds.y);
    }
View Full Code Here

   
    if (isVertical() && !isImageRotationPreservedInVerticalMode()) {
      boolean vertLeft = getPosition() == SWT.LEFT;
      transform.translate(vertLeft ? 0 : imageBounds.width, vertLeft ? imageBounds.height : 0);
      transform.translate(imageBounds.x, imageBounds.y);
      transform.rotate(vertLeft ? -90 : 90);
      transform.translate(-imageBounds.x, -imageBounds.y);
    }
   
    gc.setTransform(transform);
   
View Full Code Here

   
    if (isVertical()) {
      boolean vertLeft = getPosition() == SWT.LEFT;
      transform.translate(vertLeft ? 0 : textBounds.width, vertLeft ? textBounds.height : 0);
      transform.translate(textBounds.x, textBounds.y);
      transform.rotate(vertLeft ? -90 : 90);
      transform.translate(-textBounds.x, -textBounds.y);
      gc.setTransform(transform);
    }
   
    gc.setTransform(transform);
View Full Code Here

   
    Transform transform = new Transform(display);
   
    if (renderType == renderType.VERTICAL_ALL) {
      transform.translate(imageBounds.x, imageBounds.y);
      transform.rotate(-90);
      transform.translate(-imageBounds.x, -imageBounds.y);
      transform.translate(-imageBounds.height, 0);
    } else {
     
    }
View Full Code Here

    if (placement != Placement.TOP) {
      transform.translate(textBounds.x, textBounds.y);
     
      if (placement.isLeft()) {
        transform.translate(0, textBounds.height);
        transform.rotate(-90);
      } else if (placement.isRight()) {
        transform.rotate(90);
        transform.translate(0, -textBounds.width);
      }
     
View Full Code Here

     
      if (placement.isLeft()) {
        transform.translate(0, textBounds.height);
        transform.rotate(-90);
      } else if (placement.isRight()) {
        transform.rotate(90);
        transform.translate(0, -textBounds.width);
      }
     
      transform.translate(-textBounds.x, -textBounds.y);
    }
View Full Code Here

    if (placement.isRotateAll()) {
      transform.translate(closeButtonBounds.x, closeButtonBounds.y);
     
      if (placement == Placement.LEFT_ROTATE_ALL) {
        transform.translate(0, closeButtonBounds.height);
        transform.rotate(-90);
      } else if (placement == Placement.RIGHT_ROTATE_ALL) {
        transform.rotate(90);
        transform.translate(0, -closeButtonBounds.width);
      }
     
View Full Code Here

     
      if (placement == Placement.LEFT_ROTATE_ALL) {
        transform.translate(0, closeButtonBounds.height);
        transform.rotate(-90);
      } else if (placement == Placement.RIGHT_ROTATE_ALL) {
        transform.rotate(90);
        transform.translate(0, -closeButtonBounds.width);
      }
     
      transform.translate(-closeButtonBounds.x, -closeButtonBounds.y);
    }
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.