473,406 Members | 2,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

using ExtFloodFill from GDI

hi

i know there is no ExtFloodFill in GDI+
so i decided to use GDI
but there is something that i don't understand

when i got DC from ie PictureBox
like this
Graphics g = PictureBox.CreateGraphics();
IntPtr hdc = g.GetHdc();

then ExtFloodFill on this hdc works perfectly ok

but when i got hdc from bitmap
like this
Image i = new Bitmap(100, 100);
Graphics g = Graphics.FromImage(i);
IntPtr hdc = g.GetHdc();

then ExtFloodFill fills whole bitmap

ofcourse on both graphics there is circle or something like this!!!

and ofcourse other GDI functions work on both hdc
ie SetPixel or Rectangle works perfectly ok
so why ExtFloodFill has different products???

br
pixel
Nov 16 '05 #1
2 4780
Hi!

A blind guess - possible differences in the pixel format due to which
ExtFloodFill fails to 'see' the circle's (or something else's) border.

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

"pixel" <pi****@poczta.onet.pl> wrote in message
news:cc**********@nettle.mcnet.pl...
hi

i know there is no ExtFloodFill in GDI+
so i decided to use GDI
but there is something that i don't understand

when i got DC from ie PictureBox
like this
Graphics g = PictureBox.CreateGraphics();
IntPtr hdc = g.GetHdc();

then ExtFloodFill on this hdc works perfectly ok

but when i got hdc from bitmap
like this
Image i = new Bitmap(100, 100);
Graphics g = Graphics.FromImage(i);
IntPtr hdc = g.GetHdc();

then ExtFloodFill fills whole bitmap

ofcourse on both graphics there is circle or something like this!!!

and ofcourse other GDI functions work on both hdc
ie SetPixel or Rectangle works perfectly ok
so why ExtFloodFill has different products???

br
pixel


Nov 16 '05 #2
hi dimitriy

i also thought so
so i did
compatible dc from pixturebox
and compatible bitmap into this dc

and unfortunatelly it still doesn't work :(((

i have no more ideas

pixel

"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote in message
news:#R**************@TK2MSFTNGP11.phx.gbl...
Hi!

A blind guess - possible differences in the pixel format due to which
ExtFloodFill fails to 'see' the circle's (or something else's) border.

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

"pixel" <pi****@poczta.onet.pl> wrote in message
news:cc**********@nettle.mcnet.pl...
hi

i know there is no ExtFloodFill in GDI+
so i decided to use GDI
but there is something that i don't understand

when i got DC from ie PictureBox
like this
Graphics g = PictureBox.CreateGraphics();
IntPtr hdc = g.GetHdc();

then ExtFloodFill on this hdc works perfectly ok

but when i got hdc from bitmap
like this
Image i = new Bitmap(100, 100);
Graphics g = Graphics.FromImage(i);
IntPtr hdc = g.GetHdc();

then ExtFloodFill fills whole bitmap

ofcourse on both graphics there is circle or something like this!!!

and ofcourse other GDI functions work on both hdc
ie SetPixel or Rectangle works perfectly ok
so why ExtFloodFill has different products???

br
pixel

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: rawCoder | last post by:
Hi All, I have a *.cer file, a public key of some one and I want to encrypt some thing using this public key. Can someone point me to a sample code for Encrypting some file using...
1
by: Mike | last post by:
When trying to compile (using Visual Web Developer 2005 Express Beta; frameworkv2.0.50215 ) the source code below I get errors (listed below due to the use of ICallBackEventHandler. Ultimately I...
10
by: Christopher Benson-Manica | last post by:
Why can't I use a class destructor in a using declaration: using MyClass::~MyClass; ? -- Christopher Benson-Manica | I *should* know what I'm talking about - if I ataru(at)cyberspace.org ...
17
by: beliavsky | last post by:
Many of my C++ programs have the line using namespace std; but the "Accelerated C++" book of Koenig and Moo has many examples where the library names are included one at a time, for example ...
8
by: Petter Reinholdtsen | last post by:
I ran into a problem on HP-UX 11.00 the other day, where it refused to compile a program using 'using namespace std;' at the top. The reason seem to be that the compiler refuses to accept 'using...
14
by: john.burton.email | last post by:
I've done some extensive searching and can't seem to find an answer to this - Is it correct to using "using" with templates, for example: using std::vector; Or do I need to specify the type...
5
by: Enos Meroka | last post by:
Hallo, I am a student doing my project in the university.. I have been trying to compile the program using HP -UX aCC compiler, however I keep on getting the following errors. ...
2
by: Vili | last post by:
Hi all I have a circle with lines drawn from the center to edge of circlef orming a wedge. I am trying to fill that wedge with a color, but there is some problems with this. I have declared the...
3
by: JDeats | last post by:
I have some .NET 1.1 code that utilizes this technique for encrypting and decrypting a file. http://support.microsoft.com/kb/307010 In .NET 2.0 this approach is not fully supported (a .NET 2.0...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.