Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Hatching
Hatching [message #443041] Fri, 17 September 2004 07:22 Go to next message
David Sciamma is currently offline David SciammaFriend
Messages: 78
Registered: July 2009
Member
Hi,

I want to draw a polygon and fill it with hatching... Is ti possible ?
Or could we do something like this in awt :
Graphics2D g2d = (Graphics2D)g;
g2d.setPaint(hatchedImage);
g2d.fillPolygon(polygone);
?

Thanks
--
David Sciamma

Addr : Prologue 2, Rue Ampere
Addr : BP 87216, 31672 LABEGE Cedex
Tel : + 33 (0)5.61.00.73.45 / +33 (0)6.27.39.43.29
Fax : + 33 (0)5.61.00.51.46
Anyware Technologies - http://www.anyware-tech.com
Re: Hatching [message #443064 is a reply to message #443041] Fri, 17 September 2004 22:40 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
You could create a Region for the polygon, use that as the clipping for a GC
and draw the hatched image.

"David Sciamma" <david.sciamma@anyware-tech.com> wrote in message
news:cie330$mf$1@eclipse.org...
> Hi,
>
> I want to draw a polygon and fill it with hatching... Is ti possible ?
> Or could we do something like this in awt :
> Graphics2D g2d = (Graphics2D)g;
> g2d.setPaint(hatchedImage);
> g2d.fillPolygon(polygone);
> ?
>
> Thanks
> --
> David Sciamma
>
> Addr : Prologue 2, Rue Ampere
> Addr : BP 87216, 31672 LABEGE Cedex
> Tel : + 33 (0)5.61.00.73.45 / +33 (0)6.27.39.43.29
> Fax : + 33 (0)5.61.00.51.46
> Anyware Technologies - http://www.anyware-tech.com
Re: Hatching [message #443109 is a reply to message #443064] Sat, 18 September 2004 09:09 Go to previous message
David Sciamma is currently offline David SciammaFriend
Messages: 78
Registered: July 2009
Member
Thanks !
This is great !

Steve Northover wrote:
> You could create a Region for the polygon, use that as the clipping for a GC
> and draw the hatched image.
>
> "David Sciamma" <david.sciamma@anyware-tech.com> wrote in message
> news:cie330$mf$1@eclipse.org...
>
>>Hi,
>>
>>I want to draw a polygon and fill it with hatching... Is ti possible ?
>>Or could we do something like this in awt :
>>Graphics2D g2d = (Graphics2D)g;
>>g2d.setPaint(hatchedImage);
>>g2d.fillPolygon(polygone);
>>?
>>
>>Thanks
>>--
>>David Sciamma
>>
>>Addr : Prologue 2, Rue Ampere
>>Addr : BP 87216, 31672 LABEGE Cedex
>>Tel : + 33 (0)5.61.00.73.45 / +33 (0)6.27.39.43.29
>>Fax : + 33 (0)5.61.00.51.46
>>Anyware Technologies - http://www.anyware-tech.com
>
>
>
Previous Topic:Size of View
Next Topic:Text widget - auto-resizing, shouldn't
Goto Forum:
  


Current Time: Fri Apr 26 04:11:39 GMT 2024

Powered by FUDForum. Page generated in 0.02539 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top