Hi all,

We have an application that draws many polygons and rectangles that are
filled with various fill patterns.  The performance is poor.  The fill pattern,
or TexturePaint, draw is at least 3x slower than alpha channel fills.
I would welcome any suggestions on how we can improve our performance.

This is our current process:

At initialization we create all of the patterns.  We create a 16x16 bit
BufferedImage
and draw various lines into the image.  We then create a TexturePaint from the
image.

        BufferedImage bi = new BufferedImage(16,16,
                                        BufferedImage.TYPE_4BYTE_ABGR_PRE);
        Graphics2D g = bi.createGraphics();
        g.drawLine(0,15,15,0);   // course 45 degree pattern
        TexturePaint tp = new TexturePaint(bi, new Rectangle(16,16));
        // tp is placed in a table for later drawing

At paint time:

We look up the desired pattern in a table and get its TexturePaint.  When call
setPaint with the pattern and draw the filled polygon or rectangle.

comments?

===========================================================================
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