Examples of ImageLayout


Examples of javax.media.jai.ImageLayout

            }
          }
        }

        if (images.size() > 0) {
          ImageLayout imageLayout = new ImageLayout(0, 0, (int) pixelBounds.getWidth(),
              (int) pixelBounds.getHeight());
          imageLayout.setTileWidth(tileWidth);
          imageLayout.setTileHeight(tileHeight);

          // create the mosaic image
          ParameterBlock pbMosaic = new ParameterBlock();
          pbMosaic.add(MosaicDescriptor.MOSAIC_TYPE_OVERLAY);
          for (RenderedImage renderedImage : images) {
View Full Code Here

Examples of org.apache.fop.layoutmgr.inline.ImageLayout

                    return percentManager.getBaseLength(lengthBase, fobj);
                }
            }

        };
        ImageLayout layout = new ImageLayout(abstractGraphic, pContext,
                image.getInfo().getSize().getDimensionMpt());

        final IRtfTextrunContainer c
            = (IRtfTextrunContainer)builderContext.getContainer(
                IRtfTextrunContainer.class, true, this);

        final RtfExternalGraphic rtfGraphic = c.getTextrun().newImage();

        //set URL
        if (info.getOriginalURI() != null) {
            rtfGraphic.setURL(info.getOriginalURI());
        }
        rtfGraphic.setImageData(rawData);

        FoUnitsConverter converter = FoUnitsConverter.getInstance();
        Dimension viewport = layout.getViewportSize();
        Rectangle placement = layout.getPlacement();
        int cropLeft = Math.round(converter.convertMptToTwips(-placement.x));
        int cropTop = Math.round(converter.convertMptToTwips(-placement.y));
        int cropRight = Math.round(converter.convertMptToTwips(
                -1 * (viewport.width - placement.x - placement.width)));
        int cropBottom = Math.round(converter.convertMptToTwips(
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.