Package org.eclipse.swt.graphics

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


      gc.drawPath(path);
    path.dispose();

    // shape on left
    Transform transform = new Transform(device);
    transform.translate((width - 250) / 4, height / 2 - 150);
    gc.setTransform(transform);
    transform.dispose();
    path = new Path(device);
    path.cubicTo(-150, 100, 150, 200, 0, 300);
    if (closeButton.getSelection())
View Full Code Here


      return;
    Device device = gc.getDevice();

    // horizontal rectangle
    Transform transform = new Transform(device);
    transform.translate(0, translateY);
    gc.setTransform(transform);
    transform.dispose();

    Path path = new Path(device);
    path.addRectangle(0, 0, width, 50);
View Full Code Here

    gc.drawPath(path);
    path.dispose();

    // vertical rectangle
    transform = new Transform(device);
    transform.translate(translateX, 0);
    gc.setTransform(transform);
    transform.dispose();

    path = new Path(device);
    path.addRectangle(0, 0, 50, height);
View Full Code Here

    path.dispose();

    // diagonal rectangle from bottom right corner
    Rectangle rect = new Rectangle(0, 0, 50, height);
    transform = new Transform(device);
    transform.translate(width - diagTranslateX1, height / 2 - diagTranslateY1);

    // rotate on center of rectangle
    transform.translate(rect.width / 2, rect.height / 2);
    transform.rotate(45);
    transform.translate(-rect.width / 2, -rect.height / 2);
View Full Code Here

    Rectangle rect = new Rectangle(0, 0, 50, height);
    transform = new Transform(device);
    transform.translate(width - diagTranslateX1, height / 2 - diagTranslateY1);

    // rotate on center of rectangle
    transform.translate(rect.width / 2, rect.height / 2);
    transform.rotate(45);
    transform.translate(-rect.width / 2, -rect.height / 2);
    gc.setTransform(transform);
    transform.dispose();
View Full Code Here

    transform.translate(width - diagTranslateX1, height / 2 - diagTranslateY1);

    // rotate on center of rectangle
    transform.translate(rect.width / 2, rect.height / 2);
    transform.rotate(45);
    transform.translate(-rect.width / 2, -rect.height / 2);
    gc.setTransform(transform);
    transform.dispose();

    path = new Path(device);
    path.addRectangle(rect.x, rect.y, rect.width, rect.height);
View Full Code Here

    gc.drawPath(path);
    path.dispose();

    // diagonal rectangle from top right corner
    transform = new Transform(device);
    transform.translate(width - diagTranslateX2, height / 2 - diagTranslateY2);

    // rotate on center of rectangle
    transform.translate(rect.width / 2, rect.height / 2);
    transform.rotate(-45);
    transform.translate(-rect.width / 2, -rect.height / 2);
View Full Code Here

    // diagonal rectangle from top right corner
    transform = new Transform(device);
    transform.translate(width - diagTranslateX2, height / 2 - diagTranslateY2);

    // rotate on center of rectangle
    transform.translate(rect.width / 2, rect.height / 2);
    transform.rotate(-45);
    transform.translate(-rect.width / 2, -rect.height / 2);
    gc.setTransform(transform);
    transform.dispose();
View Full Code Here

    transform.translate(width - diagTranslateX2, height / 2 - diagTranslateY2);

    // rotate on center of rectangle
    transform.translate(rect.width / 2, rect.height / 2);
    transform.rotate(-45);
    transform.translate(-rect.width / 2, -rect.height / 2);
    gc.setTransform(transform);
    transform.dispose();

    path = new Path(device);
    path.addRectangle(rect.x, rect.y, rect.width, rect.height);
View Full Code Here

                if (tile != null) {
                    if (layer instanceof SelectionLayer) {
                      if (shouldPaintBrushTile())
                        RenderingUtil.drawTile(gc, tile, gx, gy, zoom);
                        Transform transform = new Transform(getDisplay());
                        transform.translate(gx,gy);
                    gc.setTransform(transform);
                    gc.setAlpha(SEL_HOVER_ALPHA);
                        gc.fillPolygon(Converter.getPolygonArray(gridPoly));
                        gc.setAlpha(OPAQUE);
                        gc.setTransform(null);
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.