/** * Returns a Filter that represents an raster image (JPG or PNG). * * @param ctx the bridge context * @param primitiveRegion the primitive region * @param purl the url of the image */ protected static Filter createRasterFeImage(BridgeContext ctx, Rectangle2D primitiveRegion, ParsedURL purl) { // Need to fit the raster image to the filter region so that // we have the same behavior as raster images in the <image> element. Filter filter = ImageTagRegistry.getRegistry().readURL(purl); Rectangle2D bounds = filter.getBounds2D(); AffineTransform scale = new AffineTransform(); scale.translate(primitiveRegion.getX(), primitiveRegion.getY()); scale.scale(primitiveRegion.getWidth()/(bounds.getWidth()-1), primitiveRegion.getHeight()/(bounds.getHeight()-1)); scale.translate(-bounds.getX(), -bounds.getY()); return new AffineRable8Bit(filter, scale); } }
/** * Returns a Filter that represents an raster image (JPG or PNG). * * @param ctx the bridge context * @param primitiveRegion the primitive region * @param purl the url of the image */ protected static Filter createRasterFeImage(BridgeContext ctx, Rectangle2D primitiveRegion, ParsedURL purl) { // Need to fit the raster image to the filter region so that // we have the same behavior as raster images in the <image> element. Filter filter = ImageTagRegistry.getRegistry().readURL(purl); Rectangle2D bounds = filter.getBounds2D(); AffineTransform scale = new AffineTransform(); scale.translate(primitiveRegion.getX(), primitiveRegion.getY()); scale.scale(primitiveRegion.getWidth()/(bounds.getWidth()-1), primitiveRegion.getHeight()/(bounds.getHeight()-1)); scale.translate(-bounds.getX(), -bounds.getY()); return new AffineRable8Bit(filter, scale); } }
/** * Returns a Filter that represents an raster image (JPG or PNG). * * @param ctx the bridge context * @param primitiveRegion the primitive region * @param purl the url of the image */ protected static Filter createRasterFeImage(BridgeContext ctx, Rectangle2D primitiveRegion, ParsedURL purl) { // Need to fit the raster image to the filter region so that // we have the same behavior as raster images in the <image> element. Filter filter = ImageTagRegistry.getRegistry().readURL(purl); Rectangle2D bounds = filter.getBounds2D(); AffineTransform scale = new AffineTransform(); scale.translate(primitiveRegion.getX(), primitiveRegion.getY()); scale.scale(primitiveRegion.getWidth()/(bounds.getWidth()-1), primitiveRegion.getHeight()/(bounds.getHeight()-1)); scale.translate(-bounds.getX(), -bounds.getY()); return new AffineRable8Bit(filter, scale); } }
return new AffineRable8Bit(filter, at);
return new AffineRable8Bit(filter, at);
return new AffineRable8Bit(filter, at);
at = SVGUtilities.toObjectBBox(at, filteredNode); filter = new AffineRable8Bit(filter, at);
at = SVGUtilities.toObjectBBox(at, filteredNode); filter = new AffineRable8Bit(filter, at);
at = SVGUtilities.toObjectBBox(at, filteredNode); filter = new AffineRable8Bit(filter, at);
try { at = at.createInverse(); ret = new AffineRable8Bit(ret, at); } catch (NoninvertibleTransformException nte) { ret = null;
try { at = at.createInverse(); ret = new AffineRable8Bit(ret, at); } catch (NoninvertibleTransformException nte) { ret = null;
try { at = at.createInverse(); ret = new AffineRable8Bit(ret, at); } catch (NoninvertibleTransformException nte) { ret = null;
(rootElement, cursorSize.width, cursorSize.height, ctx); Filter filter = node.getGraphicsNodeRable(true); f = new AffineRable8Bit(filter, at); } catch (BridgeException ex) { throw ex; cursorSize.height); f = new AffineRable8Bit(filter, at); } else {
(rootElement, cursorSize.width, cursorSize.height, ctx); Filter filter = node.getGraphicsNodeRable(true); f = new AffineRable8Bit(filter, at); } catch (BridgeException ex) { throw ex; cursorSize.height); f = new AffineRable8Bit(filter, at); } else {
(rootElement, cursorSize.width, cursorSize.height, ctx); Filter filter = node.getGraphicsNodeRable(true); f = new AffineRable8Bit(filter, at); } catch (BridgeException ex) { throw ex; cursorSize.height); f = new AffineRable8Bit(filter, at); } else {
Filter filter = new AffineRable8Bit(pad, at); filter = new PadRable8Bit(filter, primitiveRegion, PadMode.ZERO_PAD);
Filter filter = new AffineRable8Bit(pad, at); filter = new PadRable8Bit(filter, primitiveRegion, PadMode.ZERO_PAD);
Filter filter = new AffineRable8Bit(pad, at); filter = new PadRable8Bit(filter, primitiveRegion, PadMode.ZERO_PAD);