Package org.eclipse.swt.graphics

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


      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);
    } else {
View Full Code Here


      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);
    } else {
      // For an indexed palette, display the palette colors and indices.
View Full Code Here

      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);
    } else {
      // For an indexed palette, display the palette colors and indices.
      RGB[] rgbs = imageData.palette.getRGBs();
View Full Code Here

      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);
    } else {
      // For an indexed palette, display the palette colors and indices.
      RGB[] rgbs = imageData.palette.getRGBs();
      if (rgbs != null) {
View Full Code Here

      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);
    } else {
      // For an indexed palette, display the palette colors and indices.
      RGB[] rgbs = imageData.palette.getRGBs();
      if (rgbs != null) {
        int xTab1 = 40, xTab2 = 100;
View Full Code Here

      RGB[] rgbs = imageData.palette.getRGBs();
      if (rgbs != null) {
        int xTab1 = 40, xTab2 = 100;
        for (int i = 0; i < rgbs.length; i++) {
          int y = (i + 1) * 10 + py;
          gc.drawString(String.valueOf(i), 10, y, true);
          gc.drawString(ImageAnalyzer.toHexByteString(rgbs[i].red)
              + ImageAnalyzer.toHexByteString(rgbs[i].green)
              + ImageAnalyzer.toHexByteString(rgbs[i].blue), xTab1, y, true);
          Color color = new Color(display, rgbs[i]);
          gc.setBackground(color);
View Full Code Here

      if (rgbs != null) {
        int xTab1 = 40, xTab2 = 100;
        for (int i = 0; i < rgbs.length; i++) {
          int y = (i + 1) * 10 + py;
          gc.drawString(String.valueOf(i), 10, y, true);
          gc.drawString(ImageAnalyzer.toHexByteString(rgbs[i].red)
              + ImageAnalyzer.toHexByteString(rgbs[i].green)
              + ImageAnalyzer.toHexByteString(rgbs[i].blue), xTab1, y, true);
          Color color = new Color(display, rgbs[i]);
          gc.setBackground(color);
          gc.fillRectangle(xTab2, y + 2, 10, 10);
View Full Code Here

        }
        Point size = canvas.getSize();
        gc.drawArc(cx + 1, cy + 1, size.x - 2, size.y - 2, 0, 360);
        gc.drawRectangle(cx + (size.x - 10) / 2, cy + (size.y - 10) / 2, 10, 10);
        Point extent = gc.textExtent(CanvasTab.canvasString);
        gc.drawString(CanvasTab.canvasString, cx + (size.x - extent.x) / 2, cy - extent.y + (size.y - 10) / 2,
            true);
      }
    });
    canvas.addControlListener(new ControlAdapter() {
      public void controlResized(ControlEvent event) {
View Full Code Here

      public void paintControl(PaintEvent event) {
        GC gc = event.gc;
        gc.setForeground(red);
        Rectangle rect = shell.getClientArea();
        gc.drawRectangle(rect.x + 10, rect.y + 10, rect.width - 20, rect.height - 20);
        gc.drawString(HelloWorld5.resHello.getString("Hello_world"), rect.x + 20, rect.y + 20);
      }
    });
    shell.addDisposeListener(new DisposeListener() {
      public void widgetDisposed(DisposeEvent e) {
        red.dispose();
View Full Code Here

        // draw the title
        //g.drawString(fTitle, (bounds.width - titleWidth) / 2, titleHeight, true);

        // draw the max and min values
        g.drawString(smin, PADDING/2+labelWidth-emin.x, bottom-titleHeight, true);
        g.drawString(smax, PADDING/2+labelWidth-emax.x, top, true);

        // draw the vertical and horizontal lines
        g.drawLine(left, top, left, bottom);
        g.drawLine(left, bottom, right, bottom);
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.