Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Flood fill
Flood fill [message #436817] Tue, 25 May 2004 09:05 Go to next message
Eclipse UserFriend
Originally posted by: lasyn_no_spam.postmark.net

I'm developing a charting application(currently only line charts) in
SWT. How can I flood fill a certain region with a chosen color.
fillXX() APIs work only for standard geometric shapes.
Take the scenario where I'm plotting the sine wave.
I need to fill the upper & lower part of the sine wave with color A
and color B respectively. I'm using double buffering. I didnt seem to
find any charting/graph implementation done using SWT. Any suggestions
would be helpful.
Re: Flood fill [message #436819 is a reply to message #436817] Tue, 25 May 2004 09:55 Go to previous messageGo to next message
Konstantin Scheglov is currently offline Konstantin ScheglovFriend
Messages: 555
Registered: July 2009
Senior Member
Aleph <lasyn_no_spam@postmark.net> wrote:

> I'm developing a charting application(currently only line charts) in
> SWT. How can I flood fill a certain region with a chosen color.
> fillXX() APIs work only for standard geometric shapes.
fillPolygon ?

--
SY, Konstantin.
Advanced Eclipse SWT Designer (http://www.swt-designer.com)


Konstantin Scheglov,
Google, Inc.
Re: Flood fill [message #436902 is a reply to message #436819] Wed, 26 May 2004 05:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: lasyn_no_spam.postmark.net

The area I need to flood fill might be the region between two graphs(say
speed vs time & accelaration vs time). The graph is continually plotted
& I need to fill the region between these two graphs with a chosen
color. I'm not sure how fillPolygon might help here. It will be too
complex to get the vertices of a polygon that optimally covers the
region I want to paint. Thanks for your response.

Konstantin Scheglov wrote:

> Aleph <lasyn_no_spam@postmark.net> wrote:
>
>
>>I'm developing a charting application(currently only line charts) in
>>SWT. How can I flood fill a certain region with a chosen color.
>>fillXX() APIs work only for standard geometric shapes.
>
> fillPolygon ?
>
Re: Flood fill [message #436903 is a reply to message #436902] Wed, 26 May 2004 05:38 Go to previous messageGo to next message
Konstantin Scheglov is currently offline Konstantin ScheglovFriend
Messages: 555
Registered: July 2009
Senior Member
Aleph <lasyn_no_spam@postmark.net> wrote:


Well, of course you know your task better, this was just advise.

Other idea. You can fill this area yourself using many vertical lines
from one graph to other. But in this case you will need to know each 'x'
coordinate from them.

> The area I need to flood fill might be the region between two graphs(say
> speed vs time & accelaration vs time). The graph is continually plotted
> & I need to fill the region between these two graphs with a chosen
> color. I'm not sure how fillPolygon might help here. It will be too
> complex to get the vertices of a polygon that optimally covers the
> region I want to paint. Thanks for your response.

> Konstantin Scheglov wrote:

>> Aleph <lasyn_no_spam@postmark.net> wrote:
>>
>>
>>>I'm developing a charting application(currently only line charts) in
>>>SWT. How can I flood fill a certain region with a chosen color.
>>>fillXX() APIs work only for standard geometric shapes.
>>
>> fillPolygon ?
>>

--
SY, Konstantin.
Advanced Eclipse SWT Designer (http://www.swt-designer.com)


Konstantin Scheglov,
Google, Inc.
Re: Flood fill [message #436941 is a reply to message #436903] Wed, 26 May 2004 13:35 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
There isn't a flood fill but it's easy enough to write. It will be much
slower than the one supported by the operating systems but this probably
won't matter for you. Check google for "flood fill".

"Konstantin Scheglov" <scheglov_ke@nlmk.ru> wrote in message
news:XyKFeOuQEHA.1948@fairy.ao.nlmk...
> Aleph <lasyn_no_spam@postmark.net> wrote:
>
>
> Well, of course you know your task better, this was just advise.
>
> Other idea. You can fill this area yourself using many vertical lines
> from one graph to other. But in this case you will need to know each 'x'
> coordinate from them.
>
> > The area I need to flood fill might be the region between two graphs(say
> > speed vs time & accelaration vs time). The graph is continually plotted
> > & I need to fill the region between these two graphs with a chosen
> > color. I'm not sure how fillPolygon might help here. It will be too
> > complex to get the vertices of a polygon that optimally covers the
> > region I want to paint. Thanks for your response.
>
> > Konstantin Scheglov wrote:
>
> >> Aleph <lasyn_no_spam@postmark.net> wrote:
> >>
> >>
> >>>I'm developing a charting application(currently only line charts) in
> >>>SWT. How can I flood fill a certain region with a chosen color.
> >>>fillXX() APIs work only for standard geometric shapes.
> >>
> >> fillPolygon ?
> >>
>
> --
> SY, Konstantin.
> Advanced Eclipse SWT Designer (http://www.swt-designer.com)
Previous Topic:Library Loading
Next Topic:StackOverflow error in tree viewer
Goto Forum:
  


Current Time: Thu Apr 25 13:22:27 GMT 2024

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

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

Back to the top