Re: [JAVA2D] GlyphVectors

2006-06-05 Thread Phil Race

For text display issues where you are using using the Graphic2D class
and TextLayout
and GlyphVector this is the right place.

But there is a Java Internationalization forum
http://forum.java.sun.com/forum.jspa?forumID=16
which may be a more appropriate forum for other text processing questions

-phil.

Peter B. West wrote:


Is this the right place to ask questions concerning GlyphVectors and
other text-processing components which may overlap with I18N?

Peter

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




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


Re: [JAVA2D] Smooth Gradients

2006-06-05 Thread Jim Graham

Hi Ben,

What is the ColorModel in the destination you are rendering to?

What kind of device are you displaying on?

Can you send a test case that demonstrates it?

   ...jim

Ben Galbraith wrote:

Hi all,

I'm seeking to create a smooth gradient background for a JComponent
that goes from RGB 101, 101, 101 to RGB 130, 130, 130. Of course,
that's only 29 colors, and I'm getting some serious banding when the
JComponent takes up a large space.

Yet, increasing the color range doesn't meet my needs; the contrast
between the dark and light is too harsh.

Do I have any options for smoothing out the gradient? I don't know
much about graphics, so I'm fumbling around in the dark on this one.
Can I switch to some fancy color space that supports thousands of
grays instead of just 256 shades? Am I meant to start dithering?
Should I introduce some color into my gradient to increase the pool
of colors interpolated into the gradient?

Thanks!

Ben

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


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


Re: [JAVA2D] BMPImageReader fails if the Destination is set

2006-06-05 Thread java2d
Yes, I see that the BMPImageReader only supports TYP_3BYTE_BGR.   It's too bad 
that the generic Image IO framework doesn't handle the sample model conversion 
to read into a generic BufferedImage automatically.  Either way, as you say, it 
isn't failing with the proper exception.
[Message sent by forum member 'swpalmer' (swpalmer)]

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

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


Re: [JAVA2D] Smooth Gradients

2006-06-05 Thread java2d
I was bored, so here's a test case... I can see the banding, just barely.  I 
suppose some monitors will make it look worse than others.  In any case I think 
the solution is dithering, but you will have to do it manually, simply 
supplying the rendering hint 
(g2.setRenderingHint(RenderingHints.KEY_DITHERING,RenderingHints.VALUE_DITHER_ENABLE);
 ) doesn't seem to have an effect on the behavior of GradientPaint.

[code]
/*
 * Gradient.java
 *
 * Created on June 5, 2006, 10:29 PM
 *
 */

package scott.palmer;

import java.awt.Color;
import java.awt.GradientPaint;
import java.awt.Graphics;
import java.awt.Graphics2D;
import javax.swing.JFrame;
import javax.swing.JPanel;

/**
 *
 * @author Scott Palmer
 */
public class Gradient extends JPanel
{
public static void main(String [] args)
{
JFrame f = new JFrame(Gradient with Banding issues);
f.setContentPane(new Gradient());
f.setSize(800,200);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setVisible(true);
}

protected void paintComponent(Graphics g)
{
Graphics2D g2 = (Graphics2D) g;
g2.setPaint(new GradientPaint(
0,0,new Color(101,101,101),
getWidth(),0,new Color(130,130,130)));
g2.fillRect(0,0,getWidth(),getHeight());
}
}
[/code]
[Message sent by forum member 'swpalmer' (swpalmer)]

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

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