Package org.eclipse.swt.graphics

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


    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 (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 {
     
    }
   
    gc.setTransform(transform);
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

      } else if (placement.isRight()) {
        transform.rotate(90);
        transform.translate(0, -textBounds.width);
      }
     
      transform.translate(-textBounds.x, -textBounds.y);
    }
   
    gc.setTransform(transform);
   
    gc.drawText(text, textBounds.x, textBounds.y, true);
View Full Code Here

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

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

                - ((double) bounds.width / 2));
            int y = (int) Math.round(robot.getSimPos()
                .getDoubleY()
                - ((double) bounds.height / 2));

            tr.translate((int) ((double) bounds.width / 2 + x),
                (int) ((double) bounds.height / 2 + y));
            tr.rotate(heading);
            tr.translate((int) (-((double) bounds.width / 2 + x)),
                (int) (-((double) bounds.height / 2 + y)));
            gc.setTransform(tr);
View Full Code Here

                - ((double) bounds.height / 2));

            tr.translate((int) ((double) bounds.width / 2 + x),
                (int) ((double) bounds.height / 2 + y));
            tr.rotate(heading);
            tr.translate((int) (-((double) bounds.width / 2 + x)),
                (int) (-((double) bounds.height / 2 + y)));
            gc.setTransform(tr);
            gc.drawImage(robot.getImage(), x, y);

            tr.dispose();
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.