Examples of fillRectangle()


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

        // draw a gradient behind the text
        final Color oldBackground = gc.getBackground();
        if (gradientColors.length == 1) {
          if (gradientColors[0] != null)
            gc.setBackground(gradientColors[0]);
          gc.fillRectangle(0, 0, rect.width, rect.height);
        } else {
          final Color oldForeground = gc.getForeground();
          Color lastColor = gradientColors[0];
          if (lastColor == null)
            lastColor = oldBackground;
View Full Code Here

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

              pos += gradientWidth;
            }
          }
          if (gradientVertical && pos < rect.height) {
            gc.setBackground(getBackground());
            gc.fillRectangle(0, pos, rect.width, rect.height - pos);
          }
          if (!gradientVertical && pos < rect.width) {
            gc.setBackground(getBackground());
            gc.fillRectangle(pos, 0, rect.width - pos, rect.height);
          }
View Full Code Here

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

            gc.setBackground(getBackground());
            gc.fillRectangle(0, pos, rect.width, rect.height - pos);
          }
          if (!gradientVertical && pos < rect.width) {
            gc.setBackground(getBackground());
            gc.fillRectangle(pos, 0, rect.width - pos, rect.height);
          }
          gc.setForeground(oldForeground);
        }
        gc.setBackground(oldBackground);
      } else {
View Full Code Here

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

        }
        gc.setBackground(oldBackground);
      } else {
        if (background != null || (getStyle() & SWT.DOUBLE_BUFFERED) == 0) {
          gc.setBackground(getBackground());
          gc.fillRectangle(rect);
        }
      }
    } catch (SWTException e) {
      if ((getStyle() & SWT.DOUBLE_BUFFERED) == 0) {
        gc.setBackground(getBackground());
View Full Code Here

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

        }
      }
    } catch (SWTException e) {
      if ((getStyle() & SWT.DOUBLE_BUFFERED) == 0) {
        gc.setBackground(getBackground());
        gc.fillRectangle(rect);
      }
    }

    // draw border
    int style = getStyle();
View Full Code Here

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

      if (backgroundImage != null) {
        // draw a background image behind the text
        Rectangle imageRect = backgroundImage.getBounds();
        // tile image to fill space
        gc.setBackground(getBackground());
        gc.fillRectangle(rect);
        int xPos = 0;
        while (xPos < rect.width) {
          int yPos = 0;
          while (yPos < rect.height) {
            gc.drawImage(backgroundImage, xPos, yPos);
View Full Code Here

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

        // draw a gradient behind the text
        final Color oldBackground = gc.getBackground();
        if (gradientColors.length == 1) {
          if (gradientColors[0] != null)
            gc.setBackground(gradientColors[0]);
          gc.fillRectangle(0, 0, rect.width, rect.height);
        } else {
          final Color oldForeground = gc.getForeground();
          Color lastColor = gradientColors[0];
          if (lastColor == null)
            lastColor = oldBackground;
View Full Code Here

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

              pos += gradientWidth;
            }
          }
          if (gradientVertical && pos < rect.height) {
            gc.setBackground(getBackground());
            gc.fillRectangle(0, pos, rect.width, rect.height - pos);
          }
          if (!gradientVertical && pos < rect.width) {
            gc.setBackground(getBackground());
            gc.fillRectangle(pos, 0, rect.width - pos, rect.height);
          }
View Full Code Here

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

            gc.setBackground(getBackground());
            gc.fillRectangle(0, pos, rect.width, rect.height - pos);
          }
          if (!gradientVertical && pos < rect.width) {
            gc.setBackground(getBackground());
            gc.fillRectangle(pos, 0, rect.width - pos, rect.height);
          }
          gc.setForeground(oldForeground);
        }
        gc.setBackground(oldBackground);
      } else {
View Full Code Here

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

        }
        gc.setBackground(oldBackground);
      } else {
        if (background != null || (getStyle() & SWT.DOUBLE_BUFFERED) == 0) {
          gc.setBackground(getBackground());
          gc.fillRectangle(rect);
        }

        if (roundRectangleBackground != null) {
          Color oldBackground = gc.getBackground();
          gc.setBackground(roundRectangleBackground);
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.