Package java.awt

Examples of java.awt.Graphics2D.dispose()


        int w = pg.getWidth();
        int h = pg.getHeight();
        PdfTemplate tp = cb.createTemplate(w, h);
        Graphics2D g2d = tp.createGraphics(w, h, true, quality);
        g2d.drawImage(awtImage, 0, 0, null);
        g2d.dispose();
        return getInstance(tp);
    }

    // image from indirect reference
   
View Full Code Here


        mTreeImage = new BufferedImage(this.getWidth(), this.getHeight(),
            BufferedImage.TYPE_INT_ARGB_PRE);
        Graphics2D g2t = mTreeImage.createGraphics();
        this.paint(g2t);
        g2t.dispose();

        // Get a graphics context for this image
        Graphics2D g2 = mGhostImage.createGraphics();

        // Ask the cell renderer to paint itself into the BufferedImage
View Full Code Here

        // Paint under the JLabel's text
        g2.fillRect(0, 0, getWidth(), mGhostImage.getHeight());

        // Finished with the graphics context now
        g2.dispose();

        mCurrentPoint = e.getDragOrigin();

        e.startDrag(null, mGhostImage, new Point(15, 5),
            new TransferNode(), this);
View Full Code Here

            }

            g2b.drawImage(mGhostImage, AffineTransform.getTranslateInstance(
                mGhostRect.getX() - target.getX(), mGhostRect.getY()
                    - target.getY()), null);
            g2b.dispose();

            g2.drawImage(bf, AffineTransform.getTranslateInstance(
                target.getX(), target.getY()), null);
          }
          mCurrentPoint = location;
View Full Code Here

    {
      logger.error("Unable to draw barcode element", e);
    }
    finally
    {
      gr2.dispose();
    }

  }

  /**
 
View Full Code Here

    g2.fill(pageArea);

    final Graphics2D g22 = (Graphics2D) g2.create();
    backend.draw(g22, new Rectangle2D.Double
        (0, 0, pageFormat.getWidth(), pageFormat.getHeight()));
    g22.dispose();
   
    final Rectangle2D transPageArea = new Rectangle2D.Float(0, 0, outerW, outerH);
    g2.setPaint(Color.black);
    g2.draw(transPageArea);
View Full Code Here

    {
      this.chartRenderingInfo.clear();
    }
    final Graphics2D g2 = (Graphics2D) graphics2D.create();
    this.chart.draw(g2, bounds, chartRenderingInfo);
    g2.dispose();

    if (chartRenderingInfo == null || debugRendering == false)
    {
      return;
    }
View Full Code Here

    if ((ObjectUtilities.equal(bounds, this.bounds)) == false)
    {
      final BufferedImage image = new BufferedImage(1, 1, BufferedImage.TYPE_4BYTE_ABGR);
      final Graphics2D graphics = image.createGraphics();
      draw(graphics, bounds);
      graphics.dispose();
    }

    final ImageMap map = new ImageMap();
    final EntityCollection entityCollection = chartRenderingInfo.getEntityCollection();
    final int count = entityCollection.getEntityCount();
View Full Code Here

    final Graphics2D graphics = (Graphics2D) this.graphics.create();
    graphics.setColor(decorationSpec.getTextColor());
    graphics.setStroke(new BasicStroke((float) decorationSpec.getLineWidth()));
    graphics.draw(new Line2D.Double(decorationSpec.getStart(), decorationSpec.getVerticalPosition(),
        decorationSpec.getEnd(), decorationSpec.getVerticalPosition()));
    graphics.dispose();
  }

  protected void processParagraphChilds(final ParagraphRenderBox box)
  {
    this.contentAreaX1 = box.getContentAreaX1();
View Full Code Here

        LogicalPageDrawable.logger.warn("Error while loading the image during the rendering.");
        break;
      }
    }

    g2.dispose();
    return true;
  }

  protected boolean drawDrawable(final RenderableReplacedContentBox content, final Graphics2D g2, final DrawableWrapper d)
  {
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.