Java Code Examples for java.awt.image.renderable.RenderableImage

The following examples show how to use java.awt.image.renderable.RenderableImage. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
Source Project: pumpernickel   Source File: Operation.java    License: MIT License 6 votes vote down vote up
private void writeMap(FilteredObjectOutputStream fout,
		Map<String, Object> map) throws IOException {
	fout.writeInt(map.size());

	// our #equals() method relies on the exact order of map entries
	// being constant between two Operations, so let's sort the keys:
	SortedSet<String> sortedKeys = new TreeSet<>();
	sortedKeys.addAll(map.keySet());

	for (String key : sortedKeys) {
		fout.writeObject(key);
		Object v = map.get(key);
		if (v instanceof RenderableImage) {
			v = ((RenderableImage) v).createDefaultRendering();
		}
		fout.writeObject(v);
	}
}
 
Example 2
Source Project: openstock   Source File: FXGraphics2D.java    License: GNU General Public License v3.0 5 votes vote down vote up
/**
 * Draws the renderable image.
 * 
 * @param img  the renderable image.
 * @param xform  the transform.
 */
@Override
public void drawRenderableImage(RenderableImage img, 
        AffineTransform xform) {
    RenderedImage ri = img.createDefaultRendering();
    drawRenderedImage(ri, xform);
}
 
Example 3
Source Project: dragonwell8_jdk   Source File: PeekGraphics.java    License: GNU General Public License v2.0 5 votes vote down vote up
public void drawRenderableImage(RenderableImage img,
                                AffineTransform xform) {

    if (img == null) {
        return;
    }

    mPrintMetrics.drawImage(this, img);
    mDrawingArea.addInfinite();
}
 
Example 4
Source Project: TencentKona-8   Source File: PeekGraphics.java    License: GNU General Public License v2.0 5 votes vote down vote up
public void drawRenderableImage(RenderableImage img,
                                AffineTransform xform) {

    if (img == null) {
        return;
    }

    mPrintMetrics.drawImage(this, img);
    mDrawingArea.addInfinite();
}
 
Example 5
Source Project: jdk8u60   Source File: PeekGraphics.java    License: GNU General Public License v2.0 5 votes vote down vote up
public void drawRenderableImage(RenderableImage img,
                                AffineTransform xform) {

    if (img == null) {
        return;
    }

    mPrintMetrics.drawImage(this, img);
    mDrawingArea.addInfinite();
}
 
Example 6
Source Project: openjdk-jdk8u   Source File: PeekGraphics.java    License: GNU General Public License v2.0 5 votes vote down vote up
public void drawRenderableImage(RenderableImage img,
                                AffineTransform xform) {

    if (img == null) {
        return;
    }

    mPrintMetrics.drawImage(this, img);
    mDrawingArea.addInfinite();
}
 
Example 7
Source Project: lams   Source File: DummyGraphics2d.java    License: GNU General Public License v2.0 5 votes vote down vote up
public void drawRenderableImage(RenderableImage img, AffineTransform xform) {
    String l =
        "drawRenderableImage(RenderableImage, AfflineTransform):" +
        "\n  img = " + img +
        "\n  xform = " + xform;
    log.println( l );
    g2D.drawRenderableImage( img, xform );
}
 
Example 8
public void drawRenderableImage(RenderableImage img,
                                AffineTransform xform) {

    if (img == null) {
        return;
    }

    mPrintMetrics.drawImage(this, img);
    mDrawingArea.addInfinite();
}
 
Example 9
Source Project: Bytecoder   Source File: PeekGraphics.java    License: Apache License 2.0 5 votes vote down vote up
public void drawRenderableImage(RenderableImage img,
                                AffineTransform xform) {

    if (img == null) {
        return;
    }

    mPrintMetrics.drawImage(this, img);
    mDrawingArea.addInfinite();
}
 
Example 10
Source Project: openjdk-jdk9   Source File: PeekGraphics.java    License: GNU General Public License v2.0 5 votes vote down vote up
public void drawRenderableImage(RenderableImage img,
                                AffineTransform xform) {

    if (img == null) {
        return;
    }

    mPrintMetrics.drawImage(this, img);
    mDrawingArea.addInfinite();
}
 
Example 11
Source Project: ccu-historian   Source File: FXGraphics2D.java    License: GNU General Public License v3.0 5 votes vote down vote up
/**
 * Draws the renderable image.
 * 
 * @param img  the renderable image.
 * @param xform  the transform.
 */
@Override
public void drawRenderableImage(RenderableImage img, 
        AffineTransform xform) {
    RenderedImage ri = img.createDefaultRendering();
    drawRenderedImage(ri, xform);
}
 
Example 12
Source Project: jfreesvg   Source File: SVGGraphics2D.java    License: GNU General Public License v3.0 5 votes vote down vote up
/**
 * Draws the renderable image.
 * 
 * @param img  the renderable image.
 * @param xform  the transform.
 */
@Override
public void drawRenderableImage(RenderableImage img, 
        AffineTransform xform) {
    RenderedImage ri = img.createDefaultRendering();
    drawRenderedImage(ri, xform);
}
 
Example 13
@Override
public void drawRenderableImage(RenderableImage img, AffineTransform xform) {
    Rectangle2D bounds = new Rectangle2D.Float(img.getMinX(), img.getMinY(),
            img.getWidth(), img.getHeight());

    Rectangle2D trBounds = xform.createTransformedShape(bounds).getBounds2D();

    doDraw(OpType.DRAW_RENDERABLE_IMAGE, trBounds, img, xform);
}
 
Example 14
Source Project: pumpernickel   Source File: RenderableImageOperation.java    License: MIT License 5 votes vote down vote up
/**
 * Return the image to draw.
 */
public RenderableImage getImage() {
	Object img = coreProperties.get(PROPERTY_IMAGE);
	if (img instanceof RenderedImage) {
		// this may have been deserialized as a RenderedImage, see
		// how the Operation class serializes maps for details
		RenderedImage r = (RenderedImage) img;
		img = new BasicRenderableImage(r);
		coreProperties.put(PROPERTY_IMAGE, img);
	}
	return (RenderableImage) img;
}
 
Example 15
Source Project: SIMVA-SoS   Source File: FXGraphics2D.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Draws the renderable image.
 * 
 * @param img  the renderable image.
 * @param xform  the transform.
 */
@Override
public void drawRenderableImage(RenderableImage img, 
        AffineTransform xform) {
    RenderedImage ri = img.createDefaultRendering();
    drawRenderedImage(ri, xform);
}
 
Example 16
Source Project: jdk8u-jdk   Source File: PeekGraphics.java    License: GNU General Public License v2.0 5 votes vote down vote up
public void drawRenderableImage(RenderableImage img,
                                AffineTransform xform) {

    if (img == null) {
        return;
    }

    mPrintMetrics.drawImage(this, img);
    mDrawingArea.addInfinite();
}
 
Example 17
Source Project: darklaf   Source File: Graphics2DDelegate.java    License: MIT License 4 votes vote down vote up
@Override
public void drawRenderableImage(final RenderableImage img, final AffineTransform xform) {
    g.drawRenderableImage(img, xform);
}
 
Example 18
Source Project: FlatLaf   Source File: Graphics2DProxy.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void drawRenderableImage( RenderableImage img, AffineTransform xform ) {
	delegate.drawRenderableImage( img, xform );
}
 
Example 19
Source Project: ghidra   Source File: DockingMenuItemUI.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void drawRenderableImage(RenderableImage img, AffineTransform xform) {
	if (doImage) {
		g.drawRenderableImage(img, xform);
	}
}
 
Example 20
Source Project: ghidra   Source File: Graphics2DWrapper.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void drawRenderableImage(RenderableImage img, AffineTransform xform) {
	delegate.drawRenderableImage(img, xform);
}
 
Example 21
Source Project: ghidra   Source File: HexOrDecimalInputTest.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void drawRenderableImage(RenderableImage img, AffineTransform xform) {
	throw new UnsupportedOperationException();
}
 
Example 22
Source Project: ghidra   Source File: TextLayoutGraphics.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void drawRenderableImage(RenderableImage img, AffineTransform xform) {
	// stub	
}
 
Example 23
Source Project: geowave   Source File: FitToIndexGridCoverage.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public RenderableImage getRenderableImage(final int xAxis, final int yAxis)
    throws UnsupportedOperationException, IndexOutOfBoundsException {
  return gridCoverage.getRenderableImage(xAxis, yAxis);
}
 
Example 24
Source Project: consulo   Source File: HiDPIScaledGraphics.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void drawRenderableImage(RenderableImage img, AffineTransform xform) {
  myPeer.drawRenderableImage(img, xform);
}
 
Example 25
@Override
public void drawRenderableImage(RenderableImage img, AffineTransform xform) {
  myPeer.drawRenderableImage(img, xform);
}
 
Example 26
@Override
public void drawRenderableImage(RenderableImage img, AffineTransform xform) {
}
 
Example 27
@Override
public void drawRenderableImage(RenderableImage img, AffineTransform xform) {
    throw new UnsupportedOperationException("This operation is not supported");
}
 
Example 28
Source Project: netbeans   Source File: TextGraphics2D.java    License: Apache License 2.0 4 votes vote down vote up
public void drawRenderableImage(RenderableImage renderableImage,
        AffineTransform affineTransform) {
}
 
Example 29
Source Project: lams   Source File: EscherGraphics2d.java    License: GNU General Public License v2.0 4 votes vote down vote up
public void drawRenderableImage(RenderableImage renderableimage, AffineTransform affinetransform)
{
    drawRenderedImage(renderableimage.createDefaultRendering(), affinetransform);
}
 
Example 30
Source Project: birt   Source File: SVGGraphics2D.java    License: Eclipse Public License 1.0 4 votes vote down vote up
public void drawRenderableImage( RenderableImage arg0, AffineTransform arg1 )
{
	logger.log( new Exception( Messages.getString( "SVGGraphics2D.drawRenderableImage.RenderableImage" ) ) ); //$NON-NLS-1$

}