Making custom Paint objects isn't that bad actually. I've done one for a 3-point GradientPaint recently (to provide a Gouraud shading effect). The hardest part was the math behind the Gouraud shading algorithm. Really all you do is fill in a rectangular Raster with color values. If you want more info on this, ask and I'll give.
Jeff K
-----Original Message-----
From: Kevin Weiner [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 15, 2001 11:37 AM
To: [EMAIL PROTECTED]
Subject: Re: [JAVA2D] Hatched fill pattern.
Michael Saunders wrote:
> What PaintContext do I use to get a hatched fill pattern. I see that I have the
> option of a solid color fill, gradient fill, and image fill but I don't see any
> patterns. If a hatched fill is not available is the best technique to simply use
> my general path as a clipping region and then draw lines at intervals to achive
> the hatched look?
Another way would be to draw into a small BufferedImage "swatch"
that contains a complete sample of your pattern. Then use it as a
fill image. A generalized hatch Paint would be nice, but more work
to put together.
---------------------------------------------------------------------
Kevin Weiner FM Software Phone 610-997-3930 Fax 509-463-7655
===========================================================================
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".
