Package org.eclipse.swt.graphics

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


    float[] point = new float[2];
    text = GraphicsExample.getResourceString("None"); //$NON-NLS-1$
    size = gc.stringExtent(text);
    point[0] = (scaleX * bounds.width + 5 - size.x) / (2 * scaleX);
    point[1] = bounds.height;
    transform.transform(point);
    gc.drawString(text, (int) point[0], (int) point[1], true);

    text = GraphicsExample.getResourceString("Low"); //$NON-NLS-1$
    size = gc.stringExtent(text);
    point[0] = (scaleX * bounds.width + 5 - size.x) / (2 * scaleX) + bounds.width;
View Full Code Here


    text = GraphicsExample.getResourceString("Low"); //$NON-NLS-1$
    size = gc.stringExtent(text);
    point[0] = (scaleX * bounds.width + 5 - size.x) / (2 * scaleX) + bounds.width;
    point[1] = bounds.height;
    transform.transform(point);
    gc.drawString(text, (int) point[0], (int) point[1], true);

    text = GraphicsExample.getResourceString("Default"); //$NON-NLS-1$
    size = gc.stringExtent(text);
    point[0] = (scaleX * bounds.width + 5 - size.x) / (2 * scaleX) + 2 * bounds.width;
 
View Full Code Here

    text = GraphicsExample.getResourceString("Default"); //$NON-NLS-1$
    size = gc.stringExtent(text);
    point[0] = (scaleX * bounds.width + 5 - size.x) / (2 * scaleX) + 2 * bounds.width;
    point[1] = bounds.height;
    transform.transform(point);
    gc.drawString(text, (int) point[0], (int) point[1], true);

    text = GraphicsExample.getResourceString("High"); //$NON-NLS-1$
    size = gc.stringExtent(text);
    point[0] = (scaleX * bounds.width + 5 - size.x) / (2 * scaleX) + 3 * bounds.width;
 
View Full Code Here

    text = GraphicsExample.getResourceString("High"); //$NON-NLS-1$
    size = gc.stringExtent(text);
    point[0] = (scaleX * bounds.width + 5 - size.x) / (2 * scaleX) + 3 * bounds.width;
    point[1] = bounds.height;
    transform.transform(point);
    gc.drawString(text, (int) point[0], (int) point[1], true);

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

View Full Code Here

                                int top = styledText.getLineIndex(0);
                                int bottom = styledText.getLineIndex(clientArea.height) + 1;

                                float rect[] = new float[] { 0, top * spacing, imageWidth,
                                        (bottom * spacing) - (top * spacing) };
                                transform.transform(rect);

                                gc2.setLineWidth(3);
                                gc2.setAlpha(150);
                                gc2.fillRectangle(Math.round(rect[0]), Math.round(rect[1]), Math.round(rect[2]),
                                        Math.round(rect[3]));
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.