https://issues.apache.org/bugzilla/show_bug.cgi?id=47311





--- Comment #16 from Vincent Hennebert <[email protected]>  2009-07-16 
04:21:28 PST ---
There seems to be another problem: in the Swing preview the zoom no longer
works. I fixed that by multiplying the scales by scaleFactor instead of
overwriting that latter:
    if (scales != null) {
        scaleX *= scales.getX();
        scaleY *= scales.getY();
    }
but then scrolling bars appear the same way as if fox:scale had not been
specified. When resizing the window they appear whereas there is obviously
still room for the whole document to fit in.

I have doubts about that scale extension, I must say. It seems very ad-hoc to
me. Can't that be left to some post-processing mechanism? For PDF output this
usually is a job that is handled by the printer. For PNG output I'm sure that
there are plenty of programs that can do that very well (actually I had a
better quality result when re-scaling the PNG output with an external program
than by using the new extension —might be a problem with the Java2D renderer
though).

Also, is there a use case for a non-proportional scale (x scale != y scale)?
Not that having different x and y factors makes the whole thing a lot more
complicated, but...

Thanks,
Vincent

(In reply to comment #13)
> (In reply to comment #8)
> > Created an attachment (id=23941)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23941) [details] 
[details]
> > updated patch in an attempt to address fop-dev suggestions
> 
> Thanks for the updated patch. I tried to run the AWT renderer and it appears 
> to
> have been broken by the changes. The main window is opened but no document is
> displayed, and I get the following exception:
> Exception in thread "AWT-EventQueue-0" java.awt.image.RasterFormatException: 
> (x
> + width) is outside raster
>     at
> sun.awt.image.IntegerInterleavedRaster.createWritableChild(IntegerInterleavedRaster.java:450)
>     at java.awt.image.BufferedImage.getSubimage(BufferedImage.java:1156)
>     at
> org.apache.fop.render.java2d.Java2DRenderer.getPageImage(Java2DRenderer.java:379)
>     at
> org.apache.fop.render.java2d.Java2DRenderer.getPageImage(Java2DRenderer.java:425)
>     at
> org.apache.fop.render.awt.viewer.ImageProxyPanel.paintComponent(ImageProxyPanel.java:124)
>     at javax.swing.JComponent.paint(JComponent.java:1027)
>     at javax.swing.JComponent.paintChildren(JComponent.java:864)
>     at javax.swing.JComponent.paint(JComponent.java:1036)
>     at javax.swing.JComponent.paintToOffscreen(JComponent.java:5122)
>     at
> javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:277)
>     at javax.swing.RepaintManager.paint(RepaintManager.java:1217)
>     at javax.swing.JComponent._paintImmediately(JComponent.java:5070)
>     at javax.swing.JComponent.paintImmediately(JComponent.java:4880)
>     at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:803)
>     at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:714)
>     at 
> javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:694)
>     at
> javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
>     at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
>     at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
>     at
> java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
>     at
> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
>     at
> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
>     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
>     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
>     at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
> 
> I'll investigate (but: do you really need this feature also for the AWT
> renderer? ;-) )
> 
> Thanks,
> Vincent

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to