Hi and thanks, sounded almost too good to be true! 

Alas, I can't get this to work and the javadocs aren't exactly very verbose, 
either.

I wrapped my viewer (a JPanel) in that AffinePanel and added a slider to my 
control panel (which is NOT part of the above viewer), so that I can control 
the zoom factor. In the slider's event listener I modify the zoom factor and 
then call the AffinePanel's scale(...)-method to change the zoom factor.

But strange enough, whenever I move the slider (i.e. whenever I call the 
scale-method), I get the following exception and my app hangs:

Exception in thread "AWT-EventQueue-1" java.lang.InternalError: Win32OSSD_Lock 
cannot nest locks
        at sun.java2d.loops.ScaledBlit.Scale(Native Method)
        at sun.java2d.pipe.DrawImage.scaleSurfaceData(DrawImage.java:970)
        at sun.java2d.pipe.DrawImage.renderImageScale(DrawImage.java:625)
        at sun.java2d.pipe.DrawImage.tryCopyOrScale(DrawImage.java:304)
        at sun.java2d.pipe.DrawImage.transformImage(DrawImage.java:257)
        at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:77)
        at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:996)
        at sun.java2d.pipe.ValidatePipe.copyImage(ValidatePipe.java:182)
        at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3002)
        at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2987)
        at 
javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1397)
        at 
javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1326)
        at 
javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:314)
        at javax.swing.RepaintManager.paint(RepaintManager.java:1141)
        at javax.swing.JComponent.paint(JComponent.java:1026)
        at test.Test$6.paint(BusinessServiceViewer.java:386)
        at 
com.imagero.swing.renderer.AffinePanel.paintComponent(AffinePanel.java:247)
        at javax.swing.JComponent.paint(JComponent.java:1040)
        at javax.swing.JComponent.paintToOffscreen(JComponent.java:5135)
        at 
javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1395)
        at 
javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1326)
        at 
javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:314)
        at javax.swing.RepaintManager.paint(RepaintManager.java:1141)
        at javax.swing.JComponent._paintImmediately(JComponent.java:5083)
        at javax.swing.JComponent.paintImmediately(JComponent.java:4893)
        at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:736)
        at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:692)
        at 
javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:672)
        at 
javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:141)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:222)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:610)
        at 
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:286)
        at 
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:196)
        at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:186)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:181)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:173)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:134)

Any idea, what I might be missing to get this going?

Cheers,
Michael
[Message sent by forum member 'mmo18' (mmo18)]

http://forums.java.net/jive/thread.jspa?messageID=292595

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to