Examples of clipRect()


Examples of java.awt.Graphics.clipRect()

                        int y = bounds.y;
                        if (clipBounds != null) {
                            bounds = bounds.intersection(clipBounds);
                        }
                        bounds.translate(-x, -y);
                        gComp.clipRect(bounds.x, bounds.y, bounds.width, bounds.height);
                        if (!gComp.getClipBounds().isEmpty()) {
                            comp.paint(gComp);
                        }
                        gComp.dispose();
                    }
View Full Code Here

Examples of java.awt.Graphics.clipRect()

                    repaintRect.width, repaintRect.height, visibleRect);
            if (repaintRect.isEmpty()) {
                g.dispose();
                return;
            }
            g.clipRect(rect.x, rect.y, rect.width, rect.height);
        }
        if (RepaintManager.currentManager(this).isDoubleBufferingEnabled()
                && effectiveRoot instanceof JComponent
                && isDoubleBufferingEnabled(effectiveRoot)) {
            ((JComponent) effectiveRoot).paintDoubleBuffered(g);
View Full Code Here

Examples of java.awt.Graphics.clipRect()

     */
    public void drawImage(Graphics g, Image img, int imgx, int imgy,
        int x, int y, int w, int h) {
  Graphics ng = g.create();
  try {
      ng.clipRect(x, y, w, h);
      ng.drawImage(img, imgx, imgy, this);
  } finally {
      ng.dispose();
  }
    }
View Full Code Here

Examples of java.awt.Graphics2D.clipRect()

            if (scale != 1) {
                graphics.scale(scale, scale);
            }

            graphics.translate(x, y);
            graphics.clipRect(0, 0, getWidth(), getHeight());
        }

        return graphics;
    }
View Full Code Here

Examples of java.awt.Graphics2D.clipRect()

              imageableHeight, paper.getImageableHeight());
          break;
      }
      pageFormat.setPaper(paper);
      if (clipBounds == null) {
        g2D.clipRect((int)pageFormat.getImageableX(), (int)pageFormat.getImageableY(),
            (int)pageFormat.getImageableWidth(), (int)pageFormat.getImageableHeight());
      } else
        g2D.clipRect(clipBounds.x, (int)pageFormat.getImageableY(),
            clipBounds.width, (int)pageFormat.getImageableHeight());
      }
View Full Code Here

Examples of java.awt.Graphics2D.clipRect()

      pageFormat.setPaper(paper);
      if (clipBounds == null) {
        g2D.clipRect((int)pageFormat.getImageableX(), (int)pageFormat.getImageableY(),
            (int)pageFormat.getImageableWidth(), (int)pageFormat.getImageableHeight());
      } else
        g2D.clipRect(clipBounds.x, (int)pageFormat.getImageableY(),
            clipBounds.width, (int)pageFormat.getImageableHeight());
      }
    }
   
    if (page == 0) {
View Full Code Here

Examples of java.awt.Graphics2D.clipRect()

    if (this.backgroundPainted) {
      paintBackground(g2D, backgroundColor);
    }
    Insets insets = getInsets();
    // Clip component to avoid drawing in empty borders
    g2D.clipRect(insets.left, insets.top,
        getWidth() - insets.left - insets.right,
        getHeight() - insets.top - insets.bottom);
    // Change component coordinates system to plan system
    Rectangle2D planBounds = getPlanBounds();   
    float paintScale = getScale();
View Full Code Here

Examples of java.awt.Graphics2D.clipRect()

    protected void paintComponent(Graphics g) {
      Graphics2D g2D = (Graphics2D)g.create();
      paintBackground(g2D);
      Insets insets = getInsets();
      // Clip component to avoid drawing in empty borders
      g2D.clipRect(insets.left, insets.top,
          getWidth() - insets.left - insets.right,
          getHeight() - insets.top - insets.bottom);
      // Change component coordinates system to plan system
      Rectangle2D planBounds = getPlanBounds();   
      float paintScale = getScale();
View Full Code Here

Examples of java.awt.Graphics2D.clipRect()

    final ImageIcon leftBorder = CanvasImageLoader.getInstance().getLeftShadowImage();
    g2.drawImage(leftBorder.getImage(), padding-8, 0, leftBorder.getIconWidth(), getHeight(), null);

    g2.translate(padding, 0);
    final int effectiveWidth = Math.max(0, getWidth() - padding);
    g2.clipRect(0, 0, effectiveWidth + 1, getHeight());

    double start = 0;
    double end = 0;
    if (pageDefinition != null)
    {
View Full Code Here

Examples of java.awt.Graphics2D.clipRect()

  }

  protected void paintComponent(final Graphics g)
  {
    final Graphics2D g2 = (Graphics2D) g.create();
    g2.clipRect(0, 0, getWidth(), getHeight());
    g2.setColor(getBackground());
    g2.fillRect(0, 0, getWidth(), getHeight());

    if (elementStyleSheet == null)
    {
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.