Package java.awt

Examples of java.awt.Graphics2D.drawRenderedImage()


                try {
                    AffineTransform at = new AffineTransform();
                    double sx = effDim.getWidth() / orgDim.getWidth();
                    double sy = effDim.getHeight() / orgDim.getHeight();
                    at.scale(sx, sy);
                    g2d.drawRenderedImage(img, at);
                } finally {
                    g2d.dispose();
                }
            }
            MonochromeBitmapConverter converter = createMonochromeBitmapConverter();
View Full Code Here


                try {
                    AffineTransform at = new AffineTransform();
                    double sx = effDim.getWidth() / orgDim.getWidth();
                    double sy = effDim.getHeight() / orgDim.getHeight();
                    at.scale(sx, sy);
                    g2d.drawRenderedImage(img, at);
                } finally {
                    g2d.dispose();
                }
                effImg = buf;
            }
View Full Code Here

        } else {
            decodedImage = new BufferedImage(decodedRenderedImage.getWidth(),
                                             decodedRenderedImage.getHeight(),
                                             BufferedImage.TYPE_INT_ARGB);
            ig = decodedImage.createGraphics();
            ig.drawRenderedImage(decodedRenderedImage,
                                 new AffineTransform());
            ig.dispose();
        }

        // Compare images
View Full Code Here

            int radius2 = radius/2;
            int topShadow = Math.max( 0, radius-yOffset );
            int leftShadow = Math.max( 0, radius-xOffset );
            g.translate( topShadow, leftShadow );
        }
        g.drawRenderedImage( shadow, AffineTransform.getTranslateInstance( xOffset, yOffset ) );
        if ( !shadowOnly ) {
            g.setComposite( AlphaComposite.SrcOver );
            g.drawRenderedImage( src, null );
        }
        g.dispose();
View Full Code Here

            g.translate( topShadow, leftShadow );
        }
        g.drawRenderedImage( shadow, AffineTransform.getTranslateInstance( xOffset, yOffset ) );
        if ( !shadowOnly ) {
            g.setComposite( AlphaComposite.SrcOver );
            g.drawRenderedImage( src, null );
        }
        g.dispose();

        return dst;
    }
View Full Code Here

        if ( dst == null )
            dst = createCompatibleDestImage( src, null );

        Graphics2D g = dst.createGraphics();
        g.setComposite( AlphaComposite.getInstance( AlphaComposite.SRC_OVER, opacity ) );
        g.drawRenderedImage( shadow, null );
        if ( !shadowOnly ) {
            g.setComposite( AlphaComposite.SrcOver );
            g.drawRenderedImage( src, null );
        }
        g.dispose();
View Full Code Here

        Graphics2D g = dst.createGraphics();
        g.setComposite( AlphaComposite.getInstance( AlphaComposite.SRC_OVER, opacity ) );
        g.drawRenderedImage( shadow, null );
        if ( !shadowOnly ) {
            g.setComposite( AlphaComposite.SrcOver );
            g.drawRenderedImage( src, null );
        }
        g.dispose();

        return dst;
    }
View Full Code Here

        scale /= maxDistance;
        rotate /= maxDistance;
       
        if ( steps == 0 ) {
            Graphics2D g = dst.createGraphics();
            g.drawRenderedImage( src, null );
            g.dispose();
            return dst;
        }
       
        BufferedImage tmp = createCompatibleDestImage( src, null );
View Full Code Here

    BufferedImage scaled = new BufferedImage(destWidth, destHeight,
        BufferedImage.TYPE_INT_RGB);
    Graphics2D g = scaled.createGraphics();
    AffineTransform at = AffineTransform.getScaleInstance(factor, factor);
    g.drawRenderedImage(source, at);
    return scaled;
  }

  public static void addToViewPanel(JComponent component) {
    EIMSAppFrame.getInstance().addView(component);
View Full Code Here

                        //Mask out all pixels that match the transparent color
                        alphaRaster.setPixel(x, y, transparent);
                    }
                }
            }
            g2d.drawRenderedImage(bufImage, at);
        } else {
            g2d.drawRenderedImage(rend, at);
        }
    }
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.