Re: lost of resolution when printing

Hi Vladimir,

I would use DisplayImpl.getImage() to get a BufferedImage.
But in case the resoultion will be determined by the size
of the JPanel for the DisplayImpl. For Java2D, you can
create an offscreen DisplayImplJ2D with a large image size.
For Java3D, we have to wait for ofscreen rendering in
version 1.2.1 (we cannot use version 1.2 because it throws
ArrayBoundsExceptions which crash VisAD applications).

Cheers,
Bill
----------------------------------------------------------
Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738
http://www.ssec.wisc.edu/~billh/vis.html


On Mon, 22 Jan 2001, Vladimir Altuna wrote:

> Hello,
> 
> I have some difficults with the printing.
> 
> I'd want to choose the size that the graphic
> will have in the sheet of paper :
> 
> this is my method print, specified by interface Printable:
> 
>     public int print(Graphics g, PageFormat pf, index in) throws...{
> 
>         AffineTansform af=new AffineTransform.....
>         Graphics2D g2D=(Graphics2D)g;
> 
>         g2D.transform(af);
>         panel.paint(g2D); //where panel is
> DisplayImplJ2D.getComponent();
>     }
> 
> the AffineTransform makes the graphic "fill" the sheet of paper.
> But when the JFrame containing the graphic is smaller than the
> dimensions of the paper, there is a lost of resolution. When the JFrame
> is quite small, I let you imagine the shape of my printing...
> 
> can somebody help me?
> PS: and for DisplayImplJ3D?
> cheers, Vladimir
> 
> --
> ===============================================================================
>                    Vladimir ALTUNA - Ste SEGIME
> 
> RENAULT - Service 18741       tel : (33) 1 30 03 28 00
> TCR AST 0 50                  fax : (33) 1 34 95 36 30
> 1 Avenue du Golf
> 78288 Guyancourt
> France
> ===============================================================================
> 
> 
> 
> 


  • 2001 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: