Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.GC.drawString()


        gc.fillRectangle(0, 0, getBounds().width, getBounds().height);

        gc.drawString("Click on the screen and the ball and the colored rectangle will move to that point in two seconds.", 5, 5);
        gc.drawString("The ball and the colored rectangle don't use the same interpolator, so they will move at different rates.",
            5, 20);
        gc.drawString("Feel free to change the destination at any time.", 5, 35);

        gc.setBackground(f_ball.getRecColor());
        gc.setForeground(e.widget.getDisplay().getSystemColor(SWT.COLOR_BLACK));
        gc.fillRectangle(f_ball.getRect());
        gc.drawRectangle(f_ball.getRect());
View Full Code Here


            if (x < 0) {
                // this happens when window size is too small
                x = 0;
            }

            gc.drawString(text, x, 0, true);
        } else {

            // create image to draw text
            int textWidth = gc.textExtent(text).x;
            int textHeight = gc.textExtent(text).y;
View Full Code Here

    gc.setBackground(bg);
    gc.setForeground(fg);

    gc.setTextAntialias(SWT.ON);
    gc.drawString(styleString, 2, 0);

    gc.dispose();

    Image oldImage = icons.get(type);
    if (oldImage != null) {
View Full Code Here

    gc.fillRectangle(paletteCanvas.getClientArea());
    if (imageData.palette.isDirect) {
      // For a direct palette, display the masks.
      int y = py + 10;
      int xTab = 50;
      gc.drawString("rMsk", 10, y, true);
      gc.drawString(ImageAnalyzer.toHex4ByteString(imageData.palette.redMask), xTab, y, true);
      gc.drawString("gMsk", 10, y += 12, true);
      gc.drawString(ImageAnalyzer.toHex4ByteString(imageData.palette.greenMask), xTab, y, true);
      gc.drawString("bMsk", 10, y += 12, true);
      gc.drawString(ImageAnalyzer.toHex4ByteString(imageData.palette.blueMask), xTab, y, true);
View Full Code Here

    if (imageData.palette.isDirect) {
      // For a direct palette, display the masks.
      int y = py + 10;
      int xTab = 50;
      gc.drawString("rMsk", 10, y, true);
      gc.drawString(ImageAnalyzer.toHex4ByteString(imageData.palette.redMask), xTab, y, true);
      gc.drawString("gMsk", 10, y += 12, true);
      gc.drawString(ImageAnalyzer.toHex4ByteString(imageData.palette.greenMask), xTab, y, true);
      gc.drawString("bMsk", 10, y += 12, true);
      gc.drawString(ImageAnalyzer.toHex4ByteString(imageData.palette.blueMask), xTab, y, true);
      gc.drawString("rShf", 10, y += 12, true);
View Full Code Here

      // For a direct palette, display the masks.
      int y = py + 10;
      int xTab = 50;
      gc.drawString("rMsk", 10, y, true);
      gc.drawString(ImageAnalyzer.toHex4ByteString(imageData.palette.redMask), xTab, y, true);
      gc.drawString("gMsk", 10, y += 12, true);
      gc.drawString(ImageAnalyzer.toHex4ByteString(imageData.palette.greenMask), xTab, y, true);
      gc.drawString("bMsk", 10, y += 12, true);
      gc.drawString(ImageAnalyzer.toHex4ByteString(imageData.palette.blueMask), xTab, y, true);
      gc.drawString("rShf", 10, y += 12, true);
      gc.drawString(Integer.toString(imageData.palette.redShift), xTab, y, true);
View Full Code Here

      int y = py + 10;
      int xTab = 50;
      gc.drawString("rMsk", 10, y, true);
      gc.drawString(ImageAnalyzer.toHex4ByteString(imageData.palette.redMask), xTab, y, true);
      gc.drawString("gMsk", 10, y += 12, true);
      gc.drawString(ImageAnalyzer.toHex4ByteString(imageData.palette.greenMask), xTab, y, true);
      gc.drawString("bMsk", 10, y += 12, true);
      gc.drawString(ImageAnalyzer.toHex4ByteString(imageData.palette.blueMask), xTab, y, true);
      gc.drawString("rShf", 10, y += 12, true);
      gc.drawString(Integer.toString(imageData.palette.redShift), xTab, y, true);
      gc.drawString("gShf", 10, y += 12, true);
View Full Code Here

      int xTab = 50;
      gc.drawString("rMsk", 10, y, true);
      gc.drawString(ImageAnalyzer.toHex4ByteString(imageData.palette.redMask), xTab, y, true);
      gc.drawString("gMsk", 10, y += 12, true);
      gc.drawString(ImageAnalyzer.toHex4ByteString(imageData.palette.greenMask), xTab, y, true);
      gc.drawString("bMsk", 10, y += 12, true);
      gc.drawString(ImageAnalyzer.toHex4ByteString(imageData.palette.blueMask), xTab, y, true);
      gc.drawString("rShf", 10, y += 12, true);
      gc.drawString(Integer.toString(imageData.palette.redShift), xTab, y, true);
      gc.drawString("gShf", 10, y += 12, true);
      gc.drawString(Integer.toString(imageData.palette.greenShift), xTab, y, true);
View Full Code Here

      gc.drawString("rMsk", 10, y, true);
      gc.drawString(ImageAnalyzer.toHex4ByteString(imageData.palette.redMask), xTab, y, true);
      gc.drawString("gMsk", 10, y += 12, true);
      gc.drawString(ImageAnalyzer.toHex4ByteString(imageData.palette.greenMask), xTab, y, true);
      gc.drawString("bMsk", 10, y += 12, true);
      gc.drawString(ImageAnalyzer.toHex4ByteString(imageData.palette.blueMask), xTab, y, true);
      gc.drawString("rShf", 10, y += 12, true);
      gc.drawString(Integer.toString(imageData.palette.redShift), xTab, y, true);
      gc.drawString("gShf", 10, y += 12, true);
      gc.drawString(Integer.toString(imageData.palette.greenShift), xTab, y, true);
      gc.drawString("bShf", 10, y += 12, true);
View Full Code Here

      gc.drawString(ImageAnalyzer.toHex4ByteString(imageData.palette.redMask), xTab, y, true);
      gc.drawString("gMsk", 10, y += 12, true);
      gc.drawString(ImageAnalyzer.toHex4ByteString(imageData.palette.greenMask), xTab, y, true);
      gc.drawString("bMsk", 10, y += 12, true);
      gc.drawString(ImageAnalyzer.toHex4ByteString(imageData.palette.blueMask), xTab, y, true);
      gc.drawString("rShf", 10, y += 12, true);
      gc.drawString(Integer.toString(imageData.palette.redShift), xTab, y, true);
      gc.drawString("gShf", 10, y += 12, true);
      gc.drawString(Integer.toString(imageData.palette.greenShift), xTab, y, true);
      gc.drawString("bShf", 10, y += 12, true);
      gc.drawString(Integer.toString(imageData.palette.blueShift), xTab, y, true);
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.