Re: [JAVA2D] Windows XP SP2 dualview Rendering on one monitor only.

2008-08-01 Thread java2d
Hi Dimitri, Thanks a lot for your reply, greatly appreciated. it turn out it was in a deadlock I was accessing the graphicsConfiguration from different threads which is protected by a lock. [Message sent by forum member 'magpie' (magpie)]

Re: [JAVA2D] VolatileImage.validate() does not (always) work

2008-08-01 Thread java2d
Okay, so here is my code. Nothing special, I guess . . . . // Render Frame to volatile image. do { // Check if the viBackbuffer is still valid. graphicsConfiguration = this.getGraphicsConfiguration(); valCode = viBackbuffer.validate(graphicsConfiguration);

Re: [JAVA2D] VolatileImage.validate() does not (always) work

2008-08-01 Thread java2d
Hi Dmitri, I have to apologize to the vaildate() method because it is the this.getGraphicsConfiguration that does not always realize that the image is located on a different screen. Now, I make a printout of the device ID each time I call this.getGraphicsConfiguration and although the dialoge

Re: [JAVA2D] VolatileImage.validate() does not (always) work

2008-08-01 Thread Dmitri Trembovetski
I don't see much wrong with the code. See comments below. [EMAIL PROTECTED] wrote: Okay, so here is my code. Nothing special, I guess . . . . // Render Frame to volatile image. do { // Check if the viBackbuffer is still valid. graphicsConfiguration =

Re: [JAVA2D] VolatileImage.validate() does not (always) work

2008-08-01 Thread Dmitri Trembovetski
Could you please try this test on that system and see if the device in the title changes when you move the frame back and forth. [code] import java.awt.Frame; import java.awt.GraphicsDevice; import java.awt.event.ComponentAdapter; import java.awt.event.ComponentEvent; import

Re: [JAVA2D] VolatileImage.validate() does not (always) work

2008-08-01 Thread java2d
Hi Dmitri, thanks for your effort! I will try your code on monday, when I am back at work. Anyway, to answer the questions from your first answer today: Firstly, yes, I am sure that no other thread updates my graphicConfiguration field. The other answer is that meanwhile I do print out the

[JAVA2D] drawimage on a bilevel image does not work

2008-08-01 Thread java2d
I am using drawimage method to add a BufferedImage to another BufferedImage. The base image is a bilevel (white and black) and the added image is bilevel too. But in result, the added image just became a black frame in base image. Anyone has an idea? [Message sent by forum member 'jiezhang'

Re: [JAVA2D] drawimage exception

2008-08-01 Thread java2d
This problem is solved by constructing BufferedImage correctly. But still not sure why it is such exception thrown out. Can't find underline source code. [Message sent by forum member 'jiezhang' (jiezhang)] http://forums.java.net/jive/thread.jspa?messageID=291048

Re: [JAVA2D] Universal image reading

2008-08-01 Thread Jim Graham
Hi Adam, I haven't read through everything you've written here, but it sounds like you've already learned about the major players here - there are access methods at a number of levels - BufferedImage, Raster, DataBuffer, and some helper methods on SampleModel and ColorModel as well. The

Re: [JAVA2D] Any way to make ANTIALIAS only use one color

2008-08-01 Thread Jim Graham
You shouldn't be using Antialiased rendering on an Indexed image. Antialiasing requires the ability to choose a color that is N% of the way from the foreground to the background and store that color, but that color may not be in the colormap of an Indexed image. One could argue that we should

Re: [JAVA2D] drawimage on a bilevel image does not work

2008-08-01 Thread Dmitri Trembovetski
[EMAIL PROTECTED] wrote: I am using drawimage method to add a BufferedImage to another BufferedImage. The base image is a bilevel (white and black) and the added image is bilevel too. But in result, the added image just became a black frame in base image. Anyone has an idea? Please post a

Re: [JAVA2D] drawimage on a bilevel image does not work

2008-08-01 Thread java2d
This is source code. How do I give images. import java.awt.image.BufferedImage; import java.awt.Graphics2D; import java.awt.AlphaComposite; import java.awt.Color; import java.awt.Font; import java.awt.RenderingHints; import java.awt.FontMetrics; import java.awt.geom.Rectangle2D; import

[JAVA2D] Should drawGlyphVector() honour rendering hints?

2008-08-01 Thread java2d
Should the drawGlyphVector() method in Graphics2D honour any current rendering hints such as RenderingHints.KEY_TEXT_ANTIALIASING? It appears not to be doing this. -- And loving it, -Qu0ll (Rare, not extinct) _ [EMAIL PROTECTED] [Replace the

Re: [JAVA2D] Should drawGlyphVector() honour rendering hints?

2008-08-01 Thread Phil Race
[EMAIL PROTECTED] wrote: Should the drawGlyphVector() method in Graphics2D honour any current rendering hints such as RenderingHints.KEY_TEXT_ANTIALIASING? It appears not to be doing this. It gets that particular hint from the FontRenderContext that is used to create/layout the