Package org.eclipse.swt.graphics

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


    quadYPos = 2 * height / 3;

    transform = new Transform(device);
    transform.translate(quadXPos, quadYPos);
    gc.setTransform(transform);
    transform.dispose();

    gc.setForeground(device.getSystemColor(SWT.COLOR_GREEN));
    gc.drawString(GraphicsExample.getResourceString("Quadratic"), 0, -50, true);

    path = new Path(device);
View Full Code Here


    point[1] = bounds.height;
    transform.transform(point);
    gc.drawString(text, (int) point[0], (int) point[1], true);

    gc.setTransform(transform);
    transform.dispose();

    // --- draw images ---

    // no interpolation
    gc.setInterpolation(SWT.NONE);
View Full Code Here

        path.addString("SWT", 0, 0, font);
        gc.setBackground(display.getSystemColor(SWT.COLOR_GREEN));
        gc.setForeground(display.getSystemColor(SWT.COLOR_BLUE));
        gc.fillPath(path);
        gc.drawPath(path);
        tr.dispose();
        path.dispose();
      }
    });
    shell.setSize(shell.computeSize(rect.width, rect.height));
    shell.open();
View Full Code Here

      for (int i = 0; i < bc[j].prevx.size(); i++) {
        Transform transform = new Transform(device);
        transform.translate(((Float) bc[j].prevx.get(bc[j].prevx.size() - (i + 1))).floatValue(),
            ((Float) bc[j].prevy.get(bc[j].prevy.size() - (i + 1))).floatValue());
        gc.setTransform(transform);
        transform.dispose();

        Path path = new Path(device);
        path.addArc(0, 0, bc[j].ball_size, bc[j].ball_size, 0, 360);
        gc.setAlpha(255 - i * 255 / bc[j].capacity);
        gc.setBackground(bc[j].colors[0]);
View Full Code Here

    // 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())
      path.close();
    if (fillButton.getSelection())
View Full Code Here

    // 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);
    Pattern pattern = new Pattern(device, 0, 0, width, 50, device.getSystemColor(SWT.COLOR_BLUE), 0x7f, device
        .getSystemColor(SWT.COLOR_RED), 0x7f);
View Full Code Here

    // 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);
    pattern.dispose();
    pattern = new Pattern(device, 0, 0, 50, height, device.getSystemColor(SWT.COLOR_DARK_CYAN), 0x7f, device
View Full Code Here

    // 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);
    pattern.dispose();
    pattern = new Pattern(device, rect.x, rect.y, rect.width, rect.height, device
View Full Code Here

    // 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);
    pattern.dispose();
    pattern = new Pattern(device, rect.x, rect.y, rect.width, rect.height, device
View Full Code Here

                    gc.setTransform(transform);
                    gc.setAlpha(SEL_HOVER_ALPHA);
                        gc.fillPolygon(Converter.getPolygonArray(gridPoly));
                        gc.setAlpha(OPAQUE);
                        gc.setTransform(null);
                        transform.dispose();
                        //paintEdge(g, layer, gx, gy);
                    }
                    else {
                      RenderingUtil.drawTile(gc, tile, gx, gy, zoom);
                    }
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.