Package org.eclipse.swt.graphics

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


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


    Rectangle textBounds = computeTextBounds(item, boundsNow);
   
    Transform transform = new Transform(display);
   
    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()) {
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

   
    Transform transform = new Transform(getDisplay());
   
    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);
    }
   
View Full Code Here

    Transform transform = new Transform(getDisplay());
   
    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() && !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);
   
    gc.drawImage(item.getImage(), imageBounds.x, imageBounds.y);
View Full Code Here

   
    Transform transform = new Transform(getDisplay());
   
    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);
    }
View Full Code Here

    Transform transform = new Transform(getDisplay());
   
    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);
    }
   
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

    Display display = getDisplay();
   
    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

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.