Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.Path.addRectangle()


    Path path8 = new Path(device);
    path8.addRectangle(175, (height - 40) / 2, (width - 200) / 2 - 177, 40);

    // right rectangle
    Path path9 = new Path(device);
    path9.addRectangle((width - 200) / 2 + 202, (height - 40) / 2, width - 175 - ((width - 200) / 2 + 202), 40);

    path.addPath(path2);
    path.addPath(path3);
    path.addPath(path4);
    path.addPath(path5);
View Full Code Here


    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);
    gc.setBackgroundPattern(pattern);
    gc.fillPath(path);
    gc.drawPath(path);
View Full Code Here

    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
        .getSystemColor(SWT.COLOR_WHITE), 0x7f);
    gc.setBackgroundPattern(pattern);
    gc.fillPath(path);
View Full Code Here

    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
        .getSystemColor(SWT.COLOR_DARK_GREEN), 0x7f, device.getSystemColor(SWT.COLOR_DARK_MAGENTA), 0x7f);
    gc.setBackgroundPattern(pattern);
    gc.fillPath(path);
View Full Code Here

    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
        .getSystemColor(SWT.COLOR_DARK_RED), 0x7f, device.getSystemColor(SWT.COLOR_YELLOW), 0x7f);
    gc.setBackgroundPattern(pattern);
    gc.fillPath(path);
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.