Home All Groups Group Topic Archive Search About

Pls Help me ,about GDI+ fill some image area

Author
3 Jul 2006 7:16 AM
eking
HI,all:
please see the picture, How  to do the job ?  use vb.net2005 or C#


Thanks for any help....

[attached file: HowToFill.jpg]

Author
3 Jul 2006 7:48 AM
Domac
Check,

GDI+ , regions, Fill functions that take region as argument!




Show quoteHide quote
"eking" <a**@123.com> wrote in message
news:OetzjDnnGHA.5056@TK2MSFTNGP02.phx.gbl...
> HI,all:
> please see the picture, How  to do the job ?  use vb.net2005 or C#
>
>
> Thanks for any help....
>
>
Author
4 Jul 2006 12:22 AM
eking
I will design a  "paint-bucket" tool !
before use the Fill functions ,I must get the region ,
but i dont know how to get the region has include the  point of mousedown.
how to Detection area to get  Region?

thanks
Show quoteHide quote
"Domac" <d*@dd.cc> дÈëÏûÏ¢ news:uNXdSUnnGHA.4288@TK2MSFTNGP02.phx.gbl...
> Check,
>
> GDI+ , regions, Fill functions that take region as argument!
>
>
>
>
> "eking" <a**@123.com> wrote in message
> news:OetzjDnnGHA.5056@TK2MSFTNGP02.phx.gbl...
>> HI,all:
>> please see the picture, How  to do the job ?  use vb.net2005 or C#
>>
>>
>> Thanks for any help....
>>
>>
>
>
Author
3 Jul 2006 10:32 AM
Herfried K. Wagner [MVP]
"eking" <a**@123.com> schrieb:
> please see the picture, How  to do the job ?  use vb.net2005 or C#

'System.Drawing' ('Graphics.FillPath', 'Graphics.FillRegion',
'GraphicsPath', 'Region', 'LinearGradientBrush', etc.).

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
4 Jul 2006 12:22 AM
eking
I will design a  "paint-bucket" tool !
before use the Fill functions ,I must get the region ,
but i dont know how to get the region has include the  point of mousedown.
how to Detection area to get  Region?

thanks

Show quoteHide quote
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> ????
news:%238MjqvonGHA.1808@TK2MSFTNGP02.phx.gbl...
> "eking" <a**@123.com> schrieb:
>> please see the picture, How  to do the job ?  use vb.net2005 or C#
>
> 'System.Drawing' ('Graphics.FillPath', 'Graphics.FillRegion',
> 'GraphicsPath', 'Region', 'LinearGradientBrush', etc.).
>
> --
> M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
> V B   <URL:http://classicvb.org/petition/>
Author
6 Jul 2006 12:23 PM
Jay B. Harlow [MVP - Outlook]
eking,
You may want to ask "down the hall" in the
microsoft.public.dotnet.framework.drawing newsgroup.

Off hand I believe you will need to use Bitmap.GetPixel to search for &
identify the edges of the "region" to fill. I would be inclined to change
the pixels as I go.

http://msdn2.microsoft.com/en-us/library/system.drawing.bitmap.getpixel.aspx

However the "trick" is going to be to come up with an efficient algorithm
that searches & identify the edges...

--
Hope this helps
Jay B. Harlow [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net


Show quoteHide quote
"eking" <a**@123.com> wrote in message
news:OjRfe$vnGHA.1808@TK2MSFTNGP02.phx.gbl...
| I will design a  "paint-bucket" tool !
| before use the Fill functions ,I must get the region ,
| but i dont know how to get the region has include the  point of mousedown.
| how to Detection area to get  Region?
|
| thanks
|
| "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> ????
| news:%238MjqvonGHA.1808@TK2MSFTNGP02.phx.gbl...
| > "eking" <a**@123.com> schrieb:
| >> please see the picture, How  to do the job ?  use vb.net2005 or C#
| >
| > 'System.Drawing' ('Graphics.FillPath', 'Graphics.FillRegion',
| > 'GraphicsPath', 'Region', 'LinearGradientBrush', etc.).
| >
| > --
| > M S   Herfried K. Wagner
| > M V P  <URL:http://dotnet.mvps.org/>
| > V B   <URL:http://classicvb.org/petition/>
|
|
Author
6 Jul 2006 12:55 PM
Cor Ligthert [MVP]
Jay,

I had not seen this one for a long time, however I have about 3 months ago
written a message to somebody at Microsoft that after a change from the MSDN
newsgroups pages, this newsgroup was completely not to find anymore. The
newsgroup was getting less and less visitors.

I have the idea that they changed it a month ago.

Now this newsgroup is not anymore the backyard as Fergus Cooney was used to
say but one of the front offices direct at the entree.

So maybe a change in "Upstairs in one of the  ........................"

:-)

Cor

Show quoteHide quote
"Jay B. Harlow [MVP - Outlook]" <Jay_Harlow_***@tsbradley.net> schreef in
bericht news:%23ZnWwbPoGHA.1592@TK2MSFTNGP04.phx.gbl...
> eking,
> You may want to ask "down the hall" in the
> microsoft.public.dotnet.framework.drawing newsgroup.
>
> Off hand I believe you will need to use Bitmap.GetPixel to search for &
> identify the edges of the "region" to fill. I would be inclined to change
> the pixels as I go.
>
> http://msdn2.microsoft.com/en-us/library/system.drawing.bitmap.getpixel.aspx
>
> However the "trick" is going to be to come up with an efficient algorithm
> that searches & identify the edges...
>
> --
> Hope this helps
> Jay B. Harlow [MVP - Outlook]
> .NET Application Architect, Enthusiast, & Evangelist
> T.S. Bradley - http://www.tsbradley.net
>
>
> "eking" <a**@123.com> wrote in message
> news:OjRfe$vnGHA.1808@TK2MSFTNGP02.phx.gbl...
> | I will design a  "paint-bucket" tool !
> | before use the Fill functions ,I must get the region ,
> | but i dont know how to get the region has include the  point of
> mousedown.
> | how to Detection area to get  Region?
> |
> | thanks
> |
> | "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> ????
> | news:%238MjqvonGHA.1808@TK2MSFTNGP02.phx.gbl...
> | > "eking" <a**@123.com> schrieb:
> | >> please see the picture, How  to do the job ?  use vb.net2005 or C#
> | >
> | > 'System.Drawing' ('Graphics.FillPath', 'Graphics.FillRegion',
> | > 'GraphicsPath', 'Region', 'LinearGradientBrush', etc.).
> | >
> | > --
> | > M S   Herfried K. Wagner
> | > M V P  <URL:http://dotnet.mvps.org/>
> | > V B   <URL:http://classicvb.org/petition/>
> |
> |
>
>
Author
7 Jul 2006 2:42 AM
Jay B. Harlow [MVP - Outlook]
I use NNTP to read Newsgroups. I continue to see the
microsoft.public.dotnet.framework.drawing newsgroup.


--
Hope this helps
Jay B. Harlow [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net


Show quoteHide quote
"Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message
news:uaY5StPoGHA.4800@TK2MSFTNGP04.phx.gbl...
| Jay,
|
| I had not seen this one for a long time, however I have about 3 months ago
| written a message to somebody at Microsoft that after a change from the
MSDN
| newsgroups pages, this newsgroup was completely not to find anymore. The
| newsgroup was getting less and less visitors.
|
| I have the idea that they changed it a month ago.
|
| Now this newsgroup is not anymore the backyard as Fergus Cooney was used
to
| say but one of the front offices direct at the entree.
|
| So maybe a change in "Upstairs in one of the  ........................"
|
| :-)
|
| Cor
|
| "Jay B. Harlow [MVP - Outlook]" <Jay_Harlow_***@tsbradley.net> schreef in
| bericht news:%23ZnWwbPoGHA.1592@TK2MSFTNGP04.phx.gbl...
| > eking,
| > You may want to ask "down the hall" in the
| > microsoft.public.dotnet.framework.drawing newsgroup.
| >
| > Off hand I believe you will need to use Bitmap.GetPixel to search for &
| > identify the edges of the "region" to fill. I would be inclined to
change
| > the pixels as I go.
| >
| >
http://msdn2.microsoft.com/en-us/library/system.drawing.bitmap.getpixel.aspx
Show quoteHide quote
| >
| > However the "trick" is going to be to come up with an efficient
algorithm
| > that searches & identify the edges...
| >
| > --
| > Hope this helps
| > Jay B. Harlow [MVP - Outlook]
| > .NET Application Architect, Enthusiast, & Evangelist
| > T.S. Bradley - http://www.tsbradley.net
| >
| >
| > "eking" <a**@123.com> wrote in message
| > news:OjRfe$vnGHA.1808@TK2MSFTNGP02.phx.gbl...
| > | I will design a  "paint-bucket" tool !
| > | before use the Fill functions ,I must get the region ,
| > | but i dont know how to get the region has include the  point of
| > mousedown.
| > | how to Detection area to get  Region?
| > |
| > | thanks
| > |
| > | "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> ????
| > | news:%238MjqvonGHA.1808@TK2MSFTNGP02.phx.gbl...
| > | > "eking" <a**@123.com> schrieb:
| > | >> please see the picture, How  to do the job ?  use vb.net2005 or C#
| > | >
| > | > 'System.Drawing' ('Graphics.FillPath', 'Graphics.FillRegion',
| > | > 'GraphicsPath', 'Region', 'LinearGradientBrush', etc.).
| > | >
| > | > --
| > | > M S   Herfried K. Wagner
| > | > M V P  <URL:http://dotnet.mvps.org/>
| > | > V B   <URL:http://classicvb.org/petition/>
| > |
| > |
| >
| >
|
|
Author
7 Jul 2006 9:09 AM
Cor Ligthert [MVP]
Jay,

A misunderstanding, I mean that I had not seen for a *very* long time "ask
down the hall"

Cor

Show quoteHide quote
"Jay B. Harlow [MVP - Outlook]" <Jay_Harlow_***@tsbradley.net> schreef in
bericht news:%231wJP8WoGHA.196@TK2MSFTNGP05.phx.gbl...
>I use NNTP to read Newsgroups. I continue to see the
> microsoft.public.dotnet.framework.drawing newsgroup.
>
>
> --
> Hope this helps
> Jay B. Harlow [MVP - Outlook]
> .NET Application Architect, Enthusiast, & Evangelist
> T.S. Bradley - http://www.tsbradley.net
>
>
> "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message
> news:uaY5StPoGHA.4800@TK2MSFTNGP04.phx.gbl...
> | Jay,
> |
> | I had not seen this one for a long time, however I have about 3 months
> ago
> | written a message to somebody at Microsoft that after a change from the
> MSDN
> | newsgroups pages, this newsgroup was completely not to find anymore. The
> | newsgroup was getting less and less visitors.
> |
> | I have the idea that they changed it a month ago.
> |
> | Now this newsgroup is not anymore the backyard as Fergus Cooney was used
> to
> | say but one of the front offices direct at the entree.
> |
> | So maybe a change in "Upstairs in one of the  ........................"
> |
> | :-)
> |
> | Cor
> |
> | "Jay B. Harlow [MVP - Outlook]" <Jay_Harlow_***@tsbradley.net> schreef
> in
> | bericht news:%23ZnWwbPoGHA.1592@TK2MSFTNGP04.phx.gbl...
> | > eking,
> | > You may want to ask "down the hall" in the
> | > microsoft.public.dotnet.framework.drawing newsgroup.
> | >
> | > Off hand I believe you will need to use Bitmap.GetPixel to search for
> &
> | > identify the edges of the "region" to fill. I would be inclined to
> change
> | > the pixels as I go.
> | >
> | >
> http://msdn2.microsoft.com/en-us/library/system.drawing.bitmap.getpixel.aspx
> | >
> | > However the "trick" is going to be to come up with an efficient
> algorithm
> | > that searches & identify the edges...
> | >
> | > --
> | > Hope this helps
> | > Jay B. Harlow [MVP - Outlook]
> | > .NET Application Architect, Enthusiast, & Evangelist
> | > T.S. Bradley - http://www.tsbradley.net
> | >
> | >
> | > "eking" <a**@123.com> wrote in message
> | > news:OjRfe$vnGHA.1808@TK2MSFTNGP02.phx.gbl...
> | > | I will design a  "paint-bucket" tool !
> | > | before use the Fill functions ,I must get the region ,
> | > | but i dont know how to get the region has include the  point of
> | > mousedown.
> | > | how to Detection area to get  Region?
> | > |
> | > | thanks
> | > |
> | > | "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> ????
> | > | news:%238MjqvonGHA.1808@TK2MSFTNGP02.phx.gbl...
> | > | > "eking" <a**@123.com> schrieb:
> | > | >> please see the picture, How  to do the job ?  use vb.net2005 or
> C#
> | > | >
> | > | > 'System.Drawing' ('Graphics.FillPath', 'Graphics.FillRegion',
> | > | > 'GraphicsPath', 'Region', 'LinearGradientBrush', etc.).
> | > | >
> | > | > --
> | > | > M S   Herfried K. Wagner
> | > | > M V P  <URL:http://dotnet.mvps.org/>
> | > | > V B   <URL:http://classicvb.org/petition/>
> | > |
> | > |
> | >
> | >
> |
> |
>
>
Author
8 Jul 2006 3:06 AM
Jay B. Harlow [MVP - Outlook]
Oh! ok...


--
Hope this helps
Jay B. Harlow [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net


Show quoteHide quote
"Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message
news:upEscTaoGHA.3636@TK2MSFTNGP03.phx.gbl...
| Jay,
|
| A misunderstanding, I mean that I had not seen for a *very* long time "ask
| down the hall"
|
| Cor
|
| "Jay B. Harlow [MVP - Outlook]" <Jay_Harlow_***@tsbradley.net> schreef in
| bericht news:%231wJP8WoGHA.196@TK2MSFTNGP05.phx.gbl...
| >I use NNTP to read Newsgroups. I continue to see the
| > microsoft.public.dotnet.framework.drawing newsgroup.
| >
| >
| > --
| > Hope this helps
| > Jay B. Harlow [MVP - Outlook]
| > .NET Application Architect, Enthusiast, & Evangelist
| > T.S. Bradley - http://www.tsbradley.net
| >
| >
| > "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message
| > news:uaY5StPoGHA.4800@TK2MSFTNGP04.phx.gbl...
| > | Jay,
| > |
| > | I had not seen this one for a long time, however I have about 3 months
| > ago
| > | written a message to somebody at Microsoft that after a change from
the
| > MSDN
| > | newsgroups pages, this newsgroup was completely not to find anymore.
The
| > | newsgroup was getting less and less visitors.
| > |
| > | I have the idea that they changed it a month ago.
| > |
| > | Now this newsgroup is not anymore the backyard as Fergus Cooney was
used
| > to
| > | say but one of the front offices direct at the entree.
| > |
| > | So maybe a change in "Upstairs in one of the
........................."
| > |
| > | :-)
| > |
| > | Cor
| > |
| > | "Jay B. Harlow [MVP - Outlook]" <Jay_Harlow_***@tsbradley.net> schreef
| > in
| > | bericht news:%23ZnWwbPoGHA.1592@TK2MSFTNGP04.phx.gbl...
| > | > eking,
| > | > You may want to ask "down the hall" in the
| > | > microsoft.public.dotnet.framework.drawing newsgroup.
| > | >
| > | > Off hand I believe you will need to use Bitmap.GetPixel to search
for
| > &
| > | > identify the edges of the "region" to fill. I would be inclined to
| > change
| > | > the pixels as I go.
| > | >
| > | >
| >
http://msdn2.microsoft.com/en-us/library/system.drawing.bitmap.getpixel.aspx
Show quoteHide quote
| > | >
| > | > However the "trick" is going to be to come up with an efficient
| > algorithm
| > | > that searches & identify the edges...
| > | >
| > | > --
| > | > Hope this helps
| > | > Jay B. Harlow [MVP - Outlook]
| > | > .NET Application Architect, Enthusiast, & Evangelist
| > | > T.S. Bradley - http://www.tsbradley.net
| > | >
| > | >
| > | > "eking" <a**@123.com> wrote in message
| > | > news:OjRfe$vnGHA.1808@TK2MSFTNGP02.phx.gbl...
| > | > | I will design a  "paint-bucket" tool !
| > | > | before use the Fill functions ,I must get the region ,
| > | > | but i dont know how to get the region has include the  point of
| > | > mousedown.
| > | > | how to Detection area to get  Region?
| > | > |
| > | > | thanks
| > | > |
| > | > | "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> ????
| > | > | news:%238MjqvonGHA.1808@TK2MSFTNGP02.phx.gbl...
| > | > | > "eking" <a**@123.com> schrieb:
| > | > | >> please see the picture, How  to do the job ?  use vb.net2005 or
| > C#
| > | > | >
| > | > | > 'System.Drawing' ('Graphics.FillPath', 'Graphics.FillRegion',
| > | > | > 'GraphicsPath', 'Region', 'LinearGradientBrush', etc.).
| > | > | >
| > | > | > --
| > | > | > M S   Herfried K. Wagner
| > | > | > M V P  <URL:http://dotnet.mvps.org/>
| > | > | > V B   <URL:http://classicvb.org/petition/>
| > | > |
| > | > |
| > | >
| > | >
| > |
| > |
| >
| >
|
|
Author
3 Jul 2006 12:34 PM
Tom Spink
eking wrote:

> HI,all:
> please see the picture, How  to do the job ?  use vb.net2005 or C#
>
>
> Thanks for any help....

Hi eking,

Do you have a graphics path or region object for this graphic?  Or is it an
area which you need to fill, much like using a "paint-bucket" tool?

--
Hope this helps,
Tom Spink