Re: [JAVA2D] drawing to buffered image

2000-08-14 Thread Dmitri Trembovetski
Hi David, You can get pixel by pixel access using SampleModel's methods setPixel/setSample which allow to set a pixel at certain location. Use getSampleModel() method of BufferedImage to obtain a sample model. Another way is to use WritableRaster's methods

Re: [JAVA2D] BufferedImage Internals Puzzler

2000-08-17 Thread Dmitri Trembovetski
Hello, Ted, I would have expected that at least one of the following that I have overriden would get called: getDataElement getDataElements getSample getSamples getPixel getPixels taking into consideration the operation you're performing (drawImage) these methods are not

Re: [JAVA2D] BufferedImage Internals Puzzler

2000-08-17 Thread Dmitri Trembovetski
On Thu, Aug 17, 2000 at 11:57:0p -0400, Thomas E Deweese wrote: "TH" == Ted Hill [EMAIL PROTECTED] writes: TH I have tried your 'simplest' case, i.e. [14][x][x] TH where I want to display slice number 14. My code snippet is TH below. What happens is that no matter what

Re: [JAVA2D] class.class.getResource()

2000-08-25 Thread Dmitri Trembovetski
Hello Mona. On Thu, Aug 24, 2000 at 05:19:0p -0700, Mona Wong wrote: Hi: I'm trying to understand some of the examples I found and am having problem at the line: URL url = class.class.getResource ( name ); This is equivalent to Class t = Class.forName("class");

Re: [JAVA2D] How to make Java 2D applet run over internet?

2000-08-30 Thread Dmitri Trembovetski
On Wed, Aug 30, 2000 at 04:10:0p -0400, Jinan Li wrote: Hello, How to make applet with graphics 2D or 3D run in most of browsers over internet without to force visitors to install Plug-in? Make browsers developers to support Java 2 in their products.. Thank you, Dmitri

Re: [JAVA2D] Displaying BufferedImages to the Screen

2000-09-09 Thread Dmitri Trembovetski
Hello Sean, On Sat, Sep 09, 2000 at 05:57:0p +0930, Sean wrote: Hello, I have an application which manipulates bufferedimages. Once i have drawn to the off-screen buffer, how do i then display the buffer to the screen (in an application) ? You would need to get a Graphics object

Re: [JAVA2D] Problem displaying image-Correction

2000-09-13 Thread Dmitri Trembovetski
Hi Pavan, what probably happens is that you're trying to display an image which is not fully loaded at that time. Try to modify your code to use MediaTracker class. Here is an example: import java.awt.*; import java.awt.image.*; public class Test extends Frame { Image image;

Re: [JAVA2D] X server dependency and consequences of using a remote X server

2001-01-31 Thread Dmitri Trembovetski
Hello Joseph, On Wed, Jan 31, 2001 at 08:44:0p -0800, Joseph A. Latone wrote: I asked this in JAI, in the course of use JAI1.1beta, and was redirected here: Since access to an X server is required for JAI, then if I'm using JAI but not rendering images to the display, can I simply

Re: [JAVA2D] JDK 1.4 - Full-screen support.

2001-05-24 Thread Dmitri Trembovetski
Hi Onimusha, Thanks for the comments. On Thu, May 24, 2001 at 11:59:0p -0400, Onimusha wrote: I know full-screen support is more of an AWT topic, but it is related to Java2D (graphics). Well, from the log you've attached it seems that it crashes in 2D code.. Crashes on my

Re: [JAVA2D] Scaling Images - Linux without XServer

2001-07-17 Thread Dmitri Trembovetski
Hi Sven, On Tue, Jul 17, 2001 at 11:55:0p +0200, Sven Haiges wrote: Hi there, we need to scale down some images on a simple Linux Server. Everything worked fine on Win, but our Linux Server does not run the XServer which is maybe the problem because it does all the GUI things.

Re: [JAVA2D] Images from Clipboard???

2001-10-02 Thread Dmitri Trembovetski
Hi Terry, here is a response from one of guys from Drag'N Drop team: // DnD responds: In the java program I am developing, I can copy an image created by this program into the clipboard and paste it into another image also created by this program. However, if I open

Re: [JAVA2D] Multi-Screen Environment

2001-11-02 Thread Dmitri Trembovetski
Hi Merkel, It's hard to tell what's wrong from your description. Could you send me your test, I'll take a look. In theory, there should be no difference in animating components on multiple screens. What jdk are you using? Thank you, Dmitri On Fri, Nov 02, 2001 at 10:51:0p

Re: [JAVA2D] sun.java2d.ddscale

2001-11-12 Thread Dmitri Trembovetski
Hi all, On Sat, Nov 10, 2001 at 09:46:0p -0800, Chet Haase wrote: TnT2 should handle hardware scaling fine, so there must be something else going on here. Perhaps there is a problem scaling 1-bit transparent images... this is most likely because of the bug 4513144: ScaledBlit loops

Re: [JAVA2D] Dithering to black-and-white (monochrome) image

2001-12-05 Thread Dmitri Trembovetski
Hi Samo, On Thu, Nov 29, 2001 at 11:03:0p +0100, Samo Pitamic wrote: Hi all! I have the following problem: I have a Buffered image, then I want to transcode it into as small as possible format for wireless transfer. The most suitable format is PNG and since the wireless devices

Re: [JAVA2D] Bug progress

2002-01-28 Thread Dmitri Trembovetski
Hi Damon, On Sat, Jan 26, 2002 at 04:18:0p +1300, Damon Maria wrote: JDK 1.4 release candidate is out but a bug still remains that I would really really like to see fixed (bug id 4513144). What platform are you interested in?

Re: [JAVA2D] Dialog.hide()

2002-01-28 Thread Dmitri Trembovetski
Hi Mona, I guess you're getting the warning because Dialog.hide() overrides* Component.hide(), which is deprecated. Thank you, Dmitri * Actually, it overrides Window.hide(), which overrides Component.hide(). On Mon, Jan 28, 2002 at 03:38:0p -0800, Mona Wong wrote: Hi:

Re: [JAVA2D] PSPrinterJob print dialog fix

2002-02-20 Thread Dmitri Trembovetski
On Wed, Feb 20, 2002 at 01:54:0p -0700, Ramani Pichumani wrote: When printing Java2D windows under UNIX using JDK 1.3.x, it's well known that the print dialog box is not very useable. However, by making several of the private variables in the PSPrinterJob class public, it's possible to

Re: [JAVA2D] Render awt components to offscreen image

2002-03-18 Thread Dmitri Trembovetski
Hello Paco, you can render the contents of a component into an image by doing something like this: Component comp; comp = ... // create your component, set it's size, etc BufferedImage bi = new BufferedImage(comp.getWidth(), comp.getHeight(),

Re: [JAVA2D] Grayscale

2002-04-05 Thread Dmitri Trembovetski
Hi Nuno, you can do this, for example, this way: BufferedImage bi = ..; // your image BufferedImage grayBi = new BufferedImage(bi.getWidth(), getHeight(), BufferedImage.TYPE_BYTE_GRAY); Graphics g = grayBi.getGraphics(); g.drawImage(bi, 0,

Re: [JAVA2D] Using Java2D in an application displayed on a remote X server

2002-10-10 Thread Dmitri Trembovetski
Hello Rob, On Thu, Oct 10, 2002 at 04:54:0p -0500, Rob Ratcliff wrote: We're a bit in a quandary. We are writing a JDK 1.4 Java applet that utilizes some Java2D capability. This applet will execute on a Solaris 8 box and displayed on a HPUX 10.2 box. (This is the way the Navy needs to

Re: [JAVA2D] Using Java2D in an application displayed on a remote X server

2002-10-10 Thread Dmitri Trembovetski
Rob, On Thu, Oct 10, 2002 at 06:35:0p -0500, Rob Ratcliff wrote: Does this mean that it still runs slow when displaying remotely to a HP X server, or that you see some rendering artifacts? The performance is slow on the HPUX X server when using any Java2D capability. It also

Re: [JAVA2D] Using Java2D in an application displayed on a remote X server

2002-10-10 Thread Dmitri Trembovetski
Also, please try 1.4.1, as there were some improvements in local X rendering code which works with shared memory. This might help the local case on Solaris machine. Dmitri On Thu, Oct 10, 2002 at 04:56:0p -0700, Dmitri Trembovetski wrote: Rob, On Thu, Oct 10, 2002 at 06:35:0p

Re: [JAVA2D] Elastic band

2002-10-23 Thread Dmitri Trembovetski
Hi Gary, one of the demos shipped with Java SDK does just that, check out java sdk dir/demo/applets/DrawTest Thank you, Dmitri On Wed, Oct 23, 2002 at 09:16:0p +0100, Gary Roussak wrote: Can anyone point me at any examples that tell me how to program the stretching of a

Re: [JAVA2D] Using Java2D in an application displayed on a remote X server

2002-10-11 Thread Dmitri Trembovetski
Rob, On Fri, Oct 11, 2002 at 04:37:0p -0500, Rob Ratcliff wrote: This could be due to the 10 Mb network card you have on this machine. See more on this below I performed an experiment today where we throttled down the network connection to my 1.8 GHz PC to 10 Mbs. When I

Re: [JAVA2D] multi-monitor problems

2002-11-07 Thread Dmitri Trembovetski
Hi Sarah, first of all, which jdk version are you using (please provide the output of java -version)? On Thu, Nov 07, 2002 at 04:36:0p -0700, Sarah Kreidler wrote: Hi all, I am currently working on a medical imaging application with the following hardware setup: Sun Blade 2000

Re: [JAVA2D] Forte, Sun ONE Studio 4 BUG?

2003-02-10 Thread Dmitri Trembovetski
Hello, it looks like you run into this bug: 4789067: Debugging test JUnit classes locks up IDE The fix is likely to go into 1.4.1_02 (supposed to be released in late Feb) or 1.4.1_03 (and definitely in 1.4.2). One possible 'workaround' is to use the latest NetBeans instead of

Re: [JAVA2D] Conversion from RGB (24 bit) to Index (8 bit) color image

2003-04-01 Thread Dmitri Trembovetski
Hi Kjell, no need to use ImageOps, just create a 8-bit image and copy your 24-bit image using drawImage. It should look something like this: BufferedImage image8b = new BufferedImage(image24b.getWidth(), image24b.getHeight(),

Re: [JAVA2D] Problem with Affine transform

2003-06-24 Thread Dmitri Trembovetski
It'd also help if you specify the jdk version you're using, and the platform you're running it on. Thank you, Dmitri On Tue, Jun 24, 2003 at 05:28:58PM -0700, Chris Campbell wrote: Hi Carlos, I'm not entirely sure what you mean when you say the pixels are messed up, but it

Re: [JAVA2D] thread and arrays

2003-07-06 Thread Dmitri Trembovetski
Hi Auguste, the answer to both questions is yes, but you'll have to be really careful and do your own synchronization to make sure your data is correct, otherwise you'll run into a lot of multithreading problems, which won't be easy to reproduce and debug. Thank you, Dmitri On

Re: [JAVA2D] Images, swing components and positioning

2003-07-11 Thread Dmitri Trembovetski
, Dmitri Sorry to have disturbed u with so much, but I am really a desperate and would really appreciate ur help. Thank u sincerely Edward Dmitri Trembovetski [EMAIL PROTECTED] wrote:Hi Edward, You can just draw your image in paintComponent, install a mouse listener for your

Re: [JAVA2D] Current Active Window Screen size

2003-10-16 Thread Dmitri Trembovetski
the list of the windows, and then, probably, look at their titles, and then figure out the size of the appropriate window. Dmitri Thanks, Kumar. Dmitri Trembovetski [EMAIL PROTECTED] wrote: Hi Kumar, I don't believe there's a way to find out the coordinatest of orbitrary

Re: [JAVA2D] Poor repaint performance scaling TYPE_BYTE_BINARY BufferedImage

2003-10-16 Thread Dmitri Trembovetski
Hi Danny, it looks like we're missing an optimized software loop for scaling binary images. We had to pick the loops we want to have optimized, and I guess this one hasn't been chosen. My suggestion is to pre-scale your image once (per scale change), and then show the cached scaled

Re: [JAVA2D] Best Practices

2003-10-17 Thread Dmitri Trembovetski
On Fri, Oct 17, 2003 at 07:31:45AM -0700, Chet Haase wrote: Michael, The easiest way to get double-buffering in your app is to use Swing. If you subclass JComponent and override the paint(Graphics) method, then the Graphics object which is passed in during a normal paint operation is

Re: [JAVA2D] Graphics2D.drawImage(Image, AffineTransform, ImageObserver) memory issues

2003-11-18 Thread Dmitri Trembovetski
Hi Eli, On Tue, Nov 18, 2003 at 04:07:24PM -0800, eli curtz wrote: I'm working on a suite of simulation software which does a lot of drawing between BufferedImages and I have run into a memory issue with Graphics2D.drawImage(Image, AffineTransform, ImageObserver), where AffineTransform

Re: [JAVA2D] repainting JPanel

2004-02-06 Thread Dmitri Trembovetski
Hi Walter, On Fri, Feb 06, 2004 at 12:42:15PM -0600, Walter H Shirey wrote: I'm having problems trying to figure out how to redraw a JPanel with custom graphics after a JDialog, displayed on top of the JPanel, has been disposed of. Also having the same problem when the window has lost

Re: [JAVA2D] repainting JPanel

2004-02-09 Thread Dmitri Trembovetski
On Mon, Feb 09, 2004 at 01:31:40AM -0700, Andrei Kouznetsov wrote: no need to call drawingPanel.getGraphics() in drawMap() because you have alredy Graphics from paintComponent. drawingPanel = new JPanel(){ public void paintComponent(Graphics g){

Re: [JAVA2D] System-call

2004-05-10 Thread Dmitri Trembovetski
Hi Sven, Question: Is there any comparable way to invoke calls to the operating system in Java? Yes, there is. Take a look at java.lang.Runtime.exec() methods. Thank you, Dmitri On Mon, May 10, 2004 at 04:46:30PM +0200, Sven Mielordt wrote: Dear fellows, sorry for a

Re: [JAVA2D] distribute a game

2004-04-26 Thread Dmitri Trembovetski
Hello, take a look at Java Web Start technology, it's exactly what you're looking for: http://java.sun.com/products/javawebstart/index.jsp Here's a link to a recent (rather involved) article on this subject:

Re: [JAVA2D] transparent windows yet?

2004-05-31 Thread Dmitri Trembovetski
Hello Rob, unfortunately, this is not possible with current jdks (1.4.2 and 1.5). Thank you, Dmitri On Fri, May 28, 2004 at 11:27:16PM -0700, Rob Ross wrote: I'm in the middle of a project where being able to make a window's background translucent/semi-transparent would be a

Re: [JAVA2D] Problems with BufferedImage.createGraphics

2004-06-21 Thread Dmitri Trembovetski
Hi Sven, do you see these problems when the application is run standalone (outside of JBuilder)? It looks like JBuilder does some mangling of the bootclasspath when it starts the app from IDE. Thank you, Dmitri On Mon, Jun 21, 2004 at 03:59:35PM +0200, Sven Mielordt wrote:

Re: [JAVA2D] FW: [JAVA2D] disappearing borders

2004-06-23 Thread Dmitri Trembovetski
Hi David, It's hard to tell what could be wrong from your description. Do you have a standalone test case which reproduces the problem? What platform you're running on? Have you tried your app with 1.5.0 beta2? Thank you, Dmitri On Wed, Jun 23, 2004 at 04:20:52PM +0200,

Re: [JAVA2D] memory limit problems with Java and System.gc()

2004-07-21 Thread Dmitri Trembovetski
On Tue, Jul 20, 2004 at 04:48:40PM +0200, Sven Mielordt wrote: Dear David, thank you for the advice concerning memory mapped files. Though this are interesting topics, the ideas do not solve my problem. The memory leaks occur due to extensive formation of strings, arrays of strings and

Re: [JAVA2D] memory limit problems with Java and System.gc()

2004-07-21 Thread Dmitri Trembovetski
On Wed, Jul 21, 2004 at 05:10:25AM -0700, Dmitri Trembovetski wrote: On Tue, Jul 20, 2004 at 04:48:40PM +0200, Sven Mielordt wrote: Dear David, thank you for the advice concerning memory mapped files. Though this are interesting topics, the ideas do not solve my problem

Re: [JAVA2D] InvalidPipeException while attempting server-side AW T

2004-08-10 Thread Dmitri Trembovetski
On Tue, Jul 20, 2004 at 01:38:33PM +0200, JP Lee wrote: Thanks, I originally did NOT have the -pixdepths 4 arg, and received the same sun.java2d.InvalidPipeException: Unsupported bit depth: 4 error, so I tried the pixdepths setting, which did not help. I have tried 4 8 as well, but

Re: [JAVA2D] How to create Image on headless machine?

2004-08-11 Thread Dmitri Trembovetski
Hello Rob, I'm assuming you're already running with headless toolkit (because you're getting the HeadlessException). You can use java.awt.image.BufferedImage class to create images in headless environment, and javax.imageio package to read/write images. Thank you, Dmitri On

Re: [JAVA2D] Transparent internal frames

2004-08-13 Thread Dmitri Trembovetski
Hello, could it be that some of your transparent components don't set 'opaque' property to false and not filling the whole area they're responsible for? This may cause the artifacts you're seeing. Check out these articles, the may have some relevant info:

Re: [JAVA2D] Transparent internal frames

2004-08-14 Thread Dmitri Trembovetski
- From: Dmitri Trembovetski [EMAIL PROTECTED] To: Clifford Lyon [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, August 13, 2004 9:58 AM Subject: Re: [JAVA2D] Transparent internal frames Hello, could it be that some of your transparent components don't set 'opaque

Re: [JAVA2D] Transparent internal frames

2004-08-23 Thread Dmitri Trembovetski
. But I'd be interested in hearing about how to do a transparent JInternalFrame - and more, about doing a JInternalFrame with an alpha 1 (255) for the background color. Thanks. From: Dmitri Trembovetski [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, August 14, 2004 6:52 PM

Re: [JAVA2D] Connecting two semi-transparent shapes by a line

2004-09-06 Thread Dmitri Trembovetski
On Mon, Sep 06, 2004 at 01:10:02PM -0400, Gregory Pierce wrote: Note: What is attached below is a copy from the Apple java-dev mailing list to provide additional insight into the problem: I have started looking at solving this problem 3 ways: 1) Cheat and get a point on the bounding

Re: [JAVA2D] ClassCastException

2004-10-11 Thread Dmitri Trembovetski
Hi David, It'd be useful if you supply the code which throws the exception, and the stack trace from the exception. Thank you, Dmitri On Mon, Oct 11, 2004 at 12:44:04PM +0200, Braun-Friedman, David wrote: Could someone possibly tell me why or how I might be getting a

Re: [JAVA2D] Crosshair cursor with jvm 1.4.2

2004-10-11 Thread Dmitri Trembovetski
Hello Emmanuel, this is more of an AWT issue. I've cc-ed one of our AWT folks. Thank you, Dmitri On Mon, Oct 11, 2004 at 04:12:12PM +0200, Emmanuel Pietriga wrote: Hello, I have some Java code that sets the cursor to Cursor.CROSSHAIR_CURSOR on a JPanel in my application

Re: [JAVA2D] memory management

2004-10-14 Thread Dmitri Trembovetski
FYI, some of these tools are now shipping with jdk1.5. Check out: jconsole, jstat, jinfo, for example. Thank you, Dmitri On Thu, Oct 14, 2004 at 08:14:45AM -0400, David Kavanagh wrote: Here is the link to that Sun tool I was referring to.

Re: [JAVA2D] color depth

2004-10-21 Thread Dmitri Trembovetski
Hi David, you can use BufferedImage bi = ...; ColorModel cm = bi.getColorModel(); int bpp = cm.getPixelSize(); Thank you, Dmitri On Thu, Oct 21, 2004 at 05:39:47PM +0100, Rosenstrauch, David wrote: Is there a way to query the color depth (bits per pixel) from a

Re: [JAVA2D] Java_sun_awt_windows_WColor_getDefaultColor+0x2A52

2004-10-22 Thread Dmitri Trembovetski
Hi Bill, we haven't seen this crash. Could you please send over the hs_err file. Thank you, Dmitri On Fri, Oct 22, 2004 at 09:21:26AM -0400, Bill York wrote: Has anyone seen this exception recently? We have a windows application that is loading the JVM at startup then attempting

Re: [JAVA2D] Java_sun_awt_windows_WColor_getDefaultColor+0x2A52

2004-10-22 Thread Dmitri Trembovetski
Thanks. This looks like 4816519: VM crash in WColor.getDefaultColor under jtreg Can you reproduce it on jdk 1.5? Thank you, Dmtitri On Fri, Oct 22, 2004 at 09:57:35AM -0400, Bill York wrote: Here's the log. Bill From: Dmitri Trembovetski [mailto:[EMAIL PROTECTED

Re: [JAVA2D] tooltiptext

2004-11-03 Thread Dmitri Trembovetski
Hi Dave, Could you please provide a stack trace when the app is frozen? Hit Ctrl+\ on unix, and Ctrl+Break on windows. Thank you, Dmitri On Wed, Nov 03, 2004 at 11:08:37AM +0100, Braun-Friedman, David wrote: Im hoping that someone can give me some insight on the following issue:

Re: [JAVA2D] Image I/O library

2004-12-07 Thread Dmitri Trembovetski
On Tue, Dec 07, 2004 at 02:29:09AM -0800, kirill grouchnikov wrote: One advantage of using MediaTracker is when you load multiple images over the Web. You then may show a progress bar that indicates how many images have been completely downloaded. This gives a nice illusion of the

Re: [JAVA2D] Sluggish window refreshes since 1.4ish

2005-02-01 Thread Dmitri Trembovetski
Hi Dan, On Tue, Feb 01, 2005 at 09:27:21AM -0800, Dan Blanks wrote: The Sun 1.5 JDK seems the obvious choice, but I found to my dismay that the mouse events are being handled differently. If I press the mouse button, drag, then release, the 1.4 JDK's all register mouse press, move,

Re: [JAVA2D] C++ - JNI - BufferedImage - Screen ?

2005-05-10 Thread Dmitri Trembovetski
Hello Jasper, On Thu, May 05, 2005 at 04:43:02PM +0100, Jasper Potts wrote: I am using C/C++ native libraries for image loading and working on JNI code that takes those images into Java. These images are either directly painted to the screen with Graphics.drawImage(Image,x,y,null); or

Re: [JAVA2D] Acceleration and movement problem

2005-05-11 Thread Dmitri Trembovetski
You might want to ask this on javagaming.org forums, since it's not a Java2D-specific question: http://www.javagaming.org/cgi-bin/JGNetForums/YaBB.cgi#JavaDevelopment Thanks, Dmitri On Wed, May 11, 2005 at 11:00:32AM -0600, Flavius Alecu wrote: I'm trying to make a game with a

Re: [JAVA2D] Affine Operations

2005-06-14 Thread Dmitri Trembovetski
Hi Sumit, it'd help if you point out the version of jdk you're using and the platform you run it on.. Thanks, Dmitri Java2D Team On Tue, Jun 14, 2005 at 08:03:43AM -0700, sumit shah wrote: Dear Java2D Users: I am trying an affine transformation operation that works

Re: [JAVA2D] Affine Operations

2005-06-15 Thread Dmitri Trembovetski
with the same images has always worked flawlessly with Bicubic, Bicubic2, Bilinear, and Nearest neighbor interpolation algorithms. Thanks, Sumit On Jun 14, 2005, at 8:26 AM, Dmitri Trembovetski wrote: Hi Sumit, it'd help if you point out the version of jdk you're using

Re: [JAVA2D] Java2D and Quadro FX 500/FX 600

2005-07-01 Thread Dmitri Trembovetski
Hi Donovan, On Wed, Jun 29, 2005 at 01:27:51PM -0700, Boden, Donovan wrote: I am developing a Java 1.4.2 application using Swing that will run on a Were you using the latest 1.4.2 or the fcs version? set of Dell servers running WinXP Pro SP2, DirectX 9.0c, and the latest drivers for

Re: [JAVA2D] Graphics context and AffineTransform

2005-07-08 Thread Dmitri Trembovetski
Hi Ted, On Thu, Jul 07, 2005 at 02:41:30PM -0500, Ted Hill wrote: Is there some documentation/tutorial etc. that discusses the fact that the AffineTransform attached to the Graphics param of a Swing component's paintComponent(Graphics g) will not always be the identity transform?

Re: [JAVA2D] SwingSet2 JColorChooserDemo

2005-07-11 Thread Dmitri Trembovetski
Hi Michele, I believe this is a known problem with the demo itself. Thanks, Dmitri On Mon, Jul 11, 2005 at 10:56:31AM +0200, Michele Puccini wrote: Hello, I'm facing a strange behavior of the Swingset2 JColorChooser demo. The animated bezier curve flashes around the screen

Re: [JAVA2D] java2d Glyph questions

2005-10-24 Thread Dmitri Trembovetski
Hi Michele, take a look at this JavaOne presentation by the Java2D team members. I think you'll find exactly what you need: Advanced Java 2D API Topics for Desktop Applications: TS-3214, 2005 http://developers.sun.com/learning/javaoneonline/2005/desktop/TS-3214.pdf

Re: [JAVA2D] Java 2d performance

2005-10-24 Thread Dmitri Trembovetski
Hi Bira, could you provide mode details? Which releae are you using? What platform/os? Are you setting any jav2d-related flags/properties? Also, w/o knowing what your application is doing it'd be hard to guess what could be wrong. Thanks, Dmitri On Sun, Oct 23, 2005 at

Re: [JAVA2D] Artifacts when using drawRenderedImage.

2005-12-13 Thread Dmitri Trembovetski
Hi Simone, looks like you've run into one of the known problems. Could you try with jdk5.0? There were a number of fixes in this area since 1.4.2 Thanks, Dmitri Java2D Team On Tue, Dec 13, 2005 at 12:35:32PM +0100, simone giannecchini wrote: Hi List, I am exeperiencing a

Re: [JAVA2D] Artifacts when using drawRenderedImage.

2005-12-14 Thread Dmitri Trembovetski
, simone giannecchini [EMAIL PROTECTED] wrote: Hi Dimitri, I updated to JDK1.5 but nothing changed, I tried to disable ddraw but with no luck. I am running out of ideas, hope you can provide some other hints. Simone. On 12/13/05, Dmitri Trembovetski [EMAIL PROTECTED] wrote

Re: [JAVA2D] OT - Swing mailing list?

2006-01-12 Thread Dmitri Trembovetski
Hello David, it'd be useful to see the stack traces for the rest of the threads. It looks like some kind of deadlock. Anyway this seems like an AWT problem, not Swing. Thanks, Dmitri On Thu, Jan 12, 2006 at 03:46:33PM -0500, Rosenstrauch, David wrote: I'm not sure of the best

Re: [JAVA2D] OT - Swing mailing list?

2006-01-12 Thread Dmitri Trembovetski
Hi David, thanks for the information. Could you try to run your java application with -Dsun.java2d.noddraw=true property set and see if it helps? Also, I'm still interested in the complete stack trace dump from all threads - it's likely that there's a thread that's holding a lock

Re: [JAVA2D] OT - Swing mailing list?

2006-01-13 Thread Dmitri Trembovetski
Hi David, thanks for the full stack trace - looks like I missed it in your previous email, sorry. From the stack trace it looks as I suspected that we hang when trying to initialize one of Java2D's objects. The flag I suggested in my previous email could help. Would it be possible

Re: [JAVA2D] FullScreen, BufferStrategy, Vertical Blanking

2006-01-17 Thread Dmitri Trembovetski
Hi Mik, On Mon, Jan 16, 2006 at 09:46:23AM +0100, Michele Puccini wrote: Hello everybody, I've done some experiments with both FullScreen exclusive mode and BufferStrategy and I have some questions (win32): 1) Imagine a dual monitor application, the main monitor for the GUI and the

Re: [JAVA2D] Slow repaint

2006-01-17 Thread Dmitri Trembovetski
Hi Hilde, For the record, which java release are you using? Also, on what platform? What you describe is generally known as a Gray Rectangle problem. It was addressed in Mustang (Java 6), you can try the builds here: http://mustang.dev.java.net See these blogs for more

Re: [JAVA2D] FullScreen, BufferStrategy, Vertical Blanking

2006-01-18 Thread Dmitri Trembovetski
Hi Michele, On Wed, Jan 18, 2006 at 11:29:38AM +0100, Michele Puccini wrote: RFE: It would be nice to have a .show(boolean VSynch) in java2d. The main problem is the CPU load: the caller waits until it gets the vsynch. The implementation could setup an event and be signalled when

Re: [JAVA2D] FullScreen, BufferStrategy, Vertical Blanking

2006-01-26 Thread Dmitri Trembovetski
From: Dmitri Trembovetski [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 18, 2006 5:52 PM Subject: Re: [JAVA2D] FullScreen, BufferStrategy, Vertical Blanking I realize that. What I'm saying is that since a Vsynched windowed buffer strategy would

Re: [JAVA2D] FullScreen, BufferStrategy, Vertical Blanking

2006-01-29 Thread Dmitri Trembovetski
From: Dmitri Trembovetski [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 26, 2006 10:17 PM Subject: Re: [JAVA2D] FullScreen, BufferStrategy, Vertical Blanking Hi Michele, sorry

Re: [JAVA2D] How To Disable Mouse Pointer In Full Screen Mode

2006-04-03 Thread Dmitri Trembovetski
Hi Michael, you can do something like this: Cursor nullCursor = null; Toolkit t = Toolkit.getDefaultToolkit(); Dimension d = t.getBestCursorSize(1,1); if ((d.width|d.height)!=0) { nullCursor = t.createCustomCursor( new

Re: [JAVA2D] JTextField in one Rectangle....

2006-04-13 Thread Dmitri Trembovetski
I'm not sure what you want to achieve, but you might want to read up on Swing borders (see JTextField.setBoder()). You will probably be able to achieve the effect you're trying to do without custom rendering. Thank you, Dmitri On Thu, Apr 13, 2006 at 12:39:48AM -0700, [EMAIL

Re: [JAVA2D] Converting between winding modes

2006-04-19 Thread Dmitri Trembovetski
Hi Chris, there were some issues with forwarding between forum and the list, which were resolved recenlty. May be you were lucky to run into those just before they got fixed. Thanks, Dmitri On Sun, Apr 16, 2006 at 07:08:40PM -0700, Chris Nokleberg wrote: I just stumbled on my

Re: [JAVA2D] graphic interface development

2006-04-24 Thread Dmitri Trembovetski
You might want to check out Swing Sightings: http://java.sun.com/products/jfc/tsc/sightings/ May be you'll find an application which looks something like what you're trying to create. Thanks, Dmitri On Mon, Apr 24, 2006 at 02:08:42PM -0700, [EMAIL PROTECTED] wrote: Hi all,

Re: [JAVA2D] Real Time Image Processing

2006-04-27 Thread Dmitri Trembovetski
Hello, You might want to take a look at Java Media Framework: http://java.sun.com/products/java-media/jmf/ Thanks, Dmitri On Wed, Apr 26, 2006 at 10:51:27PM -0700, [EMAIL PROTECTED] wrote: Can I capture real-time video to process it. I wrote a program in Matlab that acquires

Re: [JAVA2D] Graphics Tearing Issue

2006-04-27 Thread Dmitri Trembovetski
I just wanted to add, do you really need to have two _translucent_ images the size of the screen? Why not render directly to the back-buffer? Thanks, Dmitri On Thu, Apr 27, 2006 at 02:11:23PM -0700, Chet Haase wrote: Hi, I talked about the tearing issue in my blog entry and

Re: [JAVA2D] BufferStrategy acceleration

2006-05-08 Thread Dmitri Trembovetski
Hi Keith, here's a copy of my reply on javagaming.org: What java version are you seeing this on? Also, what OS/video board? Is this full-screen or windowed application I could imagine a situation where buffer strategy takes all available video memory so there's not enough left for a

Re: [JAVA2D] Dithering

2006-05-11 Thread Dmitri Trembovetski
Hi Eric, final BufferedImage buf = new BufferedImage(Math.round(fWidth*scale), Math.round(fHeight*scale), BufferedImage.TYPE_BYTE_BINARY, new Well, here's you problem. You're creating a binary image, with only two possible colors. So the dithering can't be smooth by definition - each

Re: [JAVA2D] Creating Java Images from native code

2006-05-11 Thread Dmitri Trembovetski
Hello, I think you can do something like this: 1. Create a BufferedImage of appropriate type (say, INT_RGB) 2. get the array from the DataBuffer (((DataBufferInt)(BI.getRaster().getDataBuffer())).getData() in case of INT_[A]RGB image type) and pass it to the native code 3. At

Re: [JAVA2D] Canvas vs. JComponent for drawing (again)

2006-05-26 Thread Dmitri Trembovetski
Hi Jonathan, yes, in Swing applications JComponent should be used, and not Canvas. Canvas is a heavyweight component and using it may interfere with Swing's repainting. Thanks, Dmitri On Fri, May 26, 2006 at 12:28:57AM -0400, Jonathan Mast wrote: [I sent this the first day I

Re: [JAVA2D] sun.java2d.Disposer questions (possible leak)

2006-06-12 Thread Dmitri Trembovetski
Hello, On Fri, Jun 09, 2006 at 01:52:32PM -0700, [EMAIL PROTECTED] wrote: First, is there a good description available on how the sun.java2d.Disposer class works in Java 1.5.0? There isn't such a description. Disoser is an internal mechanism for disposing of graphics-related resources

Re: [JAVA2D] sun.java2d.Disposer questions (possible leak)

2006-06-26 Thread Dmitri Trembovetski
Hi, On Sun, Jun 25, 2006 at 01:02:35PM -0700, [EMAIL PROTECTED] wrote: Hi Dmitri, Is Mustang b89 recent enough to test? Yes, that should do it. Out of curiosity, what was changed wrt the Disposer in Mustang? Is the disposer thread initialized on JVM startup? The change is

Re: [JAVA2D] sun.java2d.Disposer questions (possible leak)

2006-06-26 Thread Dmitri Trembovetski
Could you try the workaround I've suggested? (do some java2d activity - in particular, create a BufferedImage and render to it - on a thread created either prior to creating and setting the InheritableThreadLocalStorage or started from a separate thread). I'll think on what we can do

Re: [JAVA2D] sun.java2d.Disposer questions (possible leak)

2006-06-26 Thread Dmitri Trembovetski
Hi, On Mon, Jun 26, 2006 at 07:22:35AM -0700, Dmitri Trembovetski wrote: Could you try the workaround I've suggested? (do some java2d activity - in particular, create a BufferedImage and render to it - on a thread created either prior to creating and setting

Re: [JAVA2D] sun.java2d.Disposer questions (possible leak)

2006-06-27 Thread Dmitri Trembovetski
On Mon, Jun 26, 2006 at 10:47:29PM -0700, [EMAIL PROTECTED] wrote: Sure, let's say I manageg to remove all the inheritableThreadLocals. The next issue is the contextClassLoader that is propagated to the Java2D Disposer Thread. Which, of course, is exactly the ClassLoader I'd like to

Re: [JAVA2D] sun.java2d.Disposer questions (possible leak)

2006-06-27 Thread Dmitri Trembovetski
But before I start asking I need to understand more about this. Do you set your own classloader, or is it the default one? Better yet, is there any way you could create a small test case illustrating the problem? Thanks, Dmitri On Tue, Jun 27, 2006 at 06:18:19AM -0700, Dmitri

Re: [JAVA2D] BufferStrategy not working on Windows?

2006-07-25 Thread Dmitri Trembovetski
Hi there, Stupid question time. :-) Not so stupid, actually. This is because of our bug, which I happy to report was fixed in mustang. To work around it, don't use Canvas, just create the BufferStrategy off your frame. Also, you might want to use Frame instead of JFrame - you

Re: [JAVA2D] BufferStrategy not working on Windows?

2006-07-25 Thread Dmitri Trembovetski
Well, if he were to just change JFrame to Frame (no lightweight/heavyweight issues), it still wouldn't work because of the (fullscreen/BufferStrategy-related) bug. But anyway, the workaround is indeed to ditch Canvas. Thanks, Dmitri Java2D Team On Tue, Jul 25, 2006 at 04:43:47PM

Re: [JAVA2D] Problems with VolatileImage

2006-08-28 Thread Dmitri Trembovetski
Hello, what JDK release is this with? Have you tried JDK6? There were some issues with VolatileImage initial validation in JDK5, most of which should be resolved in JDK6. I'm assuming this is on Windows, correct? Also, is this with full-screen mode or windowed? Do you use

Re: [JAVA2D] Problems with VolatileImage

2006-08-28 Thread Dmitri Trembovetski
Well, it looks like Chet answered your question. Note that the demo you pointed at to doesn't use VolatileImages at all. A couple of suggestions: you might want to refrain from using Image.getSubImage() method call as it disables potential use of hardware acceleration for the

Re: [JAVA2D] Problems with VolatileImage

2006-08-29 Thread Dmitri Trembovetski
On Mon, Aug 28, 2006 at 08:41:35PM -0700, [EMAIL PROTECTED] wrote: Also, as Chet pointed out, you don't really need to to use VolatileImages for your sprites, just use regular BufferedImages (which are managed since 5.0) - you ou have a better chance of having them hardware

Re: [JAVA2D] rendering swing components in 3D

2006-09-19 Thread Dmitri Trembovetski
Hello, you might want to take a look at this if you haven't already: http://weblogs.java.net/blog/campbell/archive/2005/09/java2djogl_inte_1.html This is Chris Campbell's blog post about the experimental Java2D/JOGL bridge available in JDK6. Also, here's a longish thread on

Re: [JAVA2D] Bug in ... sun.java2d.pipe.AlphaPaintPipe.renderPathTile()

2006-09-22 Thread Dmitri Trembovetski
Hi, this indeed looks like a bug - there's even a comment in the code to this effect (that it wouldn't work for non-writable rasters).. Thanks, Dmitri On Wed, Sep 20, 2006 at 10:35:57AM -0700, [EMAIL PROTECTED] wrote: I have a custom PaintContext that implements the following

  1   2   3   4   >