P
pixel
hi
GDI ExtFloodFill doesn't "see" GDI+ colors
..ToArgb() doesn't work at all
any suggestions
br
pixel
sample code
Graphics
gIm = Graphics.FromImage(im);
gIm.DrawEllipse(new Pen(Color.Red), 10, 10, 50, 50);
IntPtr
hIm = gIm.GetHdc(),
hBitmap = CreateCompatibleBitmap(hIm, 100, 100),
hDC = CreateCompatibleDC(hIm);
IntPtr
hOldBitmap = SelectObject(hDC, hBitmap);
BitBlt(hDC, 0, 0, 100, 100, hIm, 0, 0, SRCCOPY);
IntPtr
hOldBrush = SelectObject(hDC, GetStockObject(GRAY_BRUSH));
ExtFloodFill(hDC, e.X, e.Y, Color.Red.ToArgb(), FLOODFILLBORDER);
SelectObject(hDC, hOldBrush);
BitBlt(hIm, 0, 0, 100, 100, hDC, 0, 0, SRCCOPY);
SelectObject(hDC, hOldBitmap);
DeleteDC(hDC);
gIm.ReleaseHdc(hIm);
GDI ExtFloodFill doesn't "see" GDI+ colors
..ToArgb() doesn't work at all
any suggestions
br
pixel
sample code
Graphics
gIm = Graphics.FromImage(im);
gIm.DrawEllipse(new Pen(Color.Red), 10, 10, 50, 50);
IntPtr
hIm = gIm.GetHdc(),
hBitmap = CreateCompatibleBitmap(hIm, 100, 100),
hDC = CreateCompatibleDC(hIm);
IntPtr
hOldBitmap = SelectObject(hDC, hBitmap);
BitBlt(hDC, 0, 0, 100, 100, hIm, 0, 0, SRCCOPY);
IntPtr
hOldBrush = SelectObject(hDC, GetStockObject(GRAY_BRUSH));
ExtFloodFill(hDC, e.X, e.Y, Color.Red.ToArgb(), FLOODFILLBORDER);
SelectObject(hDC, hOldBrush);
BitBlt(hIm, 0, 0, 100, 100, hDC, 0, 0, SRCCOPY);
SelectObject(hDC, hOldBitmap);
DeleteDC(hDC);
gIm.ReleaseHdc(hIm);