Examples of RenderingHints


Examples of java.awt.RenderingHints

          ParameterBlock pbMosaic = new ParameterBlock();
          pbMosaic.add(MosaicDescriptor.MOSAIC_TYPE_OVERLAY);
          for (RenderedImage renderedImage : images) {
            pbMosaic.addSource(renderedImage);
          }
          RenderedOp mosaic = JAI.create("mosaic", pbMosaic, new RenderingHints(JAI.KEY_IMAGE_LAYOUT,
              imageLayout));
          try {
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            log.debug("rendering to buffer...");
            ImageIO.write(mosaic, "png", baos);
View Full Code Here

Examples of java.awt.RenderingHints

    DefaultMapContext mapContext = new DefaultMapContext();
    mapContext.setCoordinateReferenceSystem(geoService.getCrs2(clientMapInfo.getCrs()));
    MapRasterizingInfo mapInfo = (MapRasterizingInfo) clientMapInfo.getWidgetInfo(MapRasterizingInfo.WIDGET_KEY);
    mapContext.setAreaOfInterest(new ReferencedEnvelope(dtoConverterService.toInternal(mapInfo.getBounds()),
        mapContext.getCoordinateReferenceSystem()));
    RenderingHints renderingHints = new Hints();
    renderingHints.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
    RasterizingContainer response = new RasterizingContainer();
    context.put(RasterizingPipelineCode.CLIENT_MAP_INFO_KEY, clientMapInfo);
    context.put(RasterizingPipelineCode.RENDERING_HINTS, renderingHints);
    context.put(RasterizingPipelineCode.MAP_CONTEXT_KEY, mapContext);
    pipelineService.execute(RasterizingPipelineCode.PIPELINE_RASTERIZING_GET_MAP_IMAGE, null, context, response);
View Full Code Here

Examples of java.awt.RenderingHints

    DefaultMapContext mapContext = new DefaultMapContext();
    mapContext.setCoordinateReferenceSystem(geoService.getCrs2(clientMapInfo.getCrs()));
    MapRasterizingInfo mapInfo = (MapRasterizingInfo) clientMapInfo.getWidgetInfo(MapRasterizingInfo.WIDGET_KEY);
    mapContext.setAreaOfInterest(new ReferencedEnvelope(dtoConverterService.toInternal(mapInfo.getBounds()),
        mapContext.getCoordinateReferenceSystem()));
    RenderingHints renderingHints = new Hints();
    renderingHints.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
    RasterizingContainer response = new RasterizingContainer();
    context.put(RasterizingPipelineCode.CLIENT_MAP_INFO_KEY, clientMapInfo);
    context.put(RasterizingPipelineCode.RENDERING_HINTS, renderingHints);
    context.put(RasterizingPipelineCode.MAP_CONTEXT_KEY, mapContext);
    pipelineService.execute(RasterizingPipelineCode.PIPELINE_RASTERIZING_GET_LEGEND_IMAGE, null, context, response);
View Full Code Here

Examples of java.awt.RenderingHints

      }
    }
    JComponent c = builder.buildComponent();
    BufferedImage image = new BufferedImage(c.getWidth(), c.getHeight(), BufferedImage.TYPE_4BYTE_ABGR);
    Graphics2D graphics = image.createGraphics();
    RenderingHints renderingHints = new Hints();
    renderingHints.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
    graphics.setRenderingHints(renderingHints);
    c.print(graphics);
    return image;
  }
View Full Code Here

Examples of java.awt.RenderingHints

  @Autowired
  private RenderingService renderingService;

  public void execute(PipelineContext context, RasterizingContainer response) throws GeomajasException {
    MapContext mapContext = context.get(RasterizingPipelineCode.MAP_CONTEXT_KEY, MapContext.class);
    RenderingHints renderingHints = context.get(RasterizingPipelineCode.RENDERING_HINTS, RenderingHints.class);
    Rectangle paintArea = mapContext.getViewport().getScreenArea();
    MapRasterizingInfo mapRasterizingInfo = (MapRasterizingInfo) mapContext.getUserData().get(
        LayerFactory.USERDATA_RASTERIZING_INFO);
    BufferedImage image = createImage(paintArea.width, paintArea.height, mapRasterizingInfo.isTransparent());
    Graphics2D graphics = getGraphics(image, mapRasterizingInfo.isTransparent(), renderingHints);
View Full Code Here

Examples of java.awt.RenderingHints

            ParameterBlock pbMosaic = new ParameterBlock();
            pbMosaic.add(MosaicDescriptor.MOSAIC_TYPE_OVERLAY);
            for (RenderedImage renderedImage : images) {
              pbMosaic.addSource(renderedImage);
            }
            RenderedOp mosaic = JAI.create("mosaic", pbMosaic, new RenderingHints(JAI.KEY_IMAGE_LAYOUT,
                imageLayout));
            try {
              ByteArrayOutputStream baos = new ByteArrayOutputStream();
              log.debug("rendering to buffer...");
              ImageIO.write(mosaic, "png", baos);
View Full Code Here

Examples of java.awt.RenderingHints

    }

    public BufferedImage convertToColorSpace(BufferedImage bi, ColorSpace to) {
        ColorSpace from = bi.getColorModel().getColorSpace();

        RenderingHints hints = new RenderingHints(RenderingHints.KEY_RENDERING,
                RenderingHints.VALUE_RENDER_QUALITY);
        hints.put(RenderingHints.KEY_COLOR_RENDERING,
                RenderingHints.VALUE_COLOR_RENDER_QUALITY);
        hints.put(RenderingHints.KEY_DITHERING,
                RenderingHints.VALUE_DITHER_ENABLE);

        ColorConvertOp op = new ColorConvertOp(from, to, hints);

        BufferedImage result = op.filter(bi, null);
View Full Code Here

Examples of java.awt.RenderingHints

        return convertToColorSpace(bi, cs_to);
    }

    public BufferedImage convertBetweenColorSpacesX2(BufferedImage bi,
            ColorSpace from, ColorSpace to) {
        RenderingHints hints = new RenderingHints(RenderingHints.KEY_RENDERING,
                RenderingHints.VALUE_RENDER_QUALITY);
        hints.put(RenderingHints.KEY_COLOR_RENDERING,
                RenderingHints.VALUE_COLOR_RENDER_QUALITY);
        hints.put(RenderingHints.KEY_DITHERING,
                RenderingHints.VALUE_DITHER_ENABLE);

        // bi = relabelColorSpace(bi, cs);
        // dumpColorSpace("\tcs_sRGB", cs_sRGB);
        // dumpColorSpace("\tColorModel.getRGBdefaultc",
View Full Code Here

Examples of java.awt.RenderingHints

    }

    public BufferedImage convertBetweenColorSpaces(BufferedImage bi,
            ColorSpace from, ColorSpace to) {
        RenderingHints hints = new RenderingHints(RenderingHints.KEY_RENDERING,
                RenderingHints.VALUE_RENDER_QUALITY);
        hints.put(RenderingHints.KEY_COLOR_RENDERING,
                RenderingHints.VALUE_COLOR_RENDER_QUALITY);
        hints.put(RenderingHints.KEY_DITHERING,
                RenderingHints.VALUE_DITHER_ENABLE);

        ColorConvertOp op = new ColorConvertOp(from, to, hints);

        bi = relabelColorSpace(bi, from);
View Full Code Here

Examples of java.awt.RenderingHints

        map.put(RenderingHints.KEY_ANTIALIASING,
                RenderingHints.VALUE_ANTIALIAS_ON);
        map.put(RenderingHints.KEY_TEXT_ANTIALIASING,
                RenderingHints.VALUE_TEXT_ANTIALIAS_ON);

        renderingHints = new RenderingHints(map);

        float ninth = 1.0f / 9.0f;
        float[] blurKernel = {ninth, ninth, ninth, ninth, ninth, ninth, ninth,
            ninth, ninth};
        convolutionKernel = new Kernel(3, 3, blurKernel);
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.