#1 Fix for printing quality

closed
nobody
None
5
2005-02-15
2004-12-08
Trejkaz
No

This patch provides a fix for a problem with the
quality of image produced when printing the graph
component to a printer or an SVG.

The problem is a result of the manual double buffering
performed by the Display component.

The fix is to break the drawing code into a
paintGraph(Graphics2D) method, and the offscreen buffer
code stays in paintComponent(Graphics). The new
printComponent(Graphics) method paints the graph at
high quality, without buffering.

The patch also includes a minor fix to the
prepareGraphics(Graphics2D) method so that it calls
Graphics2D.transform(AffineTransform) instead of
Graphics2D.setTransform(AffineTransform), since
setTransform obliterates the scaling which is required
to scale the graph to fit the printing area.

Discussion

  • Trejkaz

    Trejkaz - 2004-12-08

    Logged In: YES
    user_id=639492

    Whoops. Didn't check the box. Attaching patch now.

     
  • Trejkaz

    Trejkaz - 2004-12-08

    Patch for Display.java, apply with -p0 from the root 'prefuse' directory.

     
  • Jeffrey Heer

    Jeffrey Heer - 2005-02-15
    • status: open --> closed
     

Log in to post a comment.