Unfortunately the Stroke interface in 2D is defined as just a geometric
effect - it can turn a Path into an "outline to fill", but cannot
specify any color properties for the result. As a result, there would
be no "custom Stroke implementation" you could use to achieve this
result and I can't think of any better ways of doing it than what you
did short of writing your own rendering function(s)...
...jim
[EMAIL PROTECTED] wrote:
Hi,
in my application, I need to draw a shape with Graphics2D methods where the
Stroke used is not a uniform color but instead some kind of gradient from solid
color to semi-transparent color with a given thickness.
The current way I am dealing with this is to draw the shape several times, each
time with wider and more transparent stroke. This way I pretty much achieve the
effect I wanted. However, this operation has to happen around 40 times per sec
on quite a lot of shapes... I would like to know if there is a faster way I am
not aware of that could do this in one single drawing path.
In other word, is there a kind of GradientStroke that could be used as argument
for the Graphics2D.setStroke() method.
Regards.
Vince
[Message sent by forum member 'vync79' (vync79)]
http://forums.java.net/jive/thread.jspa?messageID=303211
===========================================================================
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".