15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


FloodFill works with Preview, not with printer

Ralf Prien -- ralf@sfb313.uni-kiel.d400.de
Friday, April 12, 1996

Environment: VC++ 4.0 / Win95 and VC++1.52 / Win95 & 3.1

I have a problem with the FloodFill (ExtFloodFill) function:
It works pretty good with the Preview but I don't get
filled objects on the printer. Filled polygons are shown
correctly in both, Preview and Printer. The german developer
support said that FloodFill only works with DC's having a
pixelarray background and they suggested to use polygons
but in my application I can't do that.

In tracing down the problem I also found, that no device
seems to be capable of performing floodfills itself (
GetDeviceCaps allways says that the device can't do that)
so I wonder what the RC_FLOODFILL flag is good for.

I hope that anybody out there can help me with this
problem since I'm really stuck.
Thanks
----------------------------------------------------------
Ralf Prien                  ralf@sfb313.uni-kiel.d400.de
----------------------------------------------------------



Mukesh Prasad Development Contractor -- mukesh@everest.XAIT.Xerox.COM
Tuesday, April 16, 1996

[Mini-digest: 2 responses]

You can create a memory bitmap and a DC, and
floodfill into the memory bitmap.  Then bitblt the
bitmap into the printer DC.

   /Mukesh

>  Environment: VC++ 4.0 / Win95 and VC++1.52 / Win95 & 3.1
>  
>  I have a problem with the FloodFill (ExtFloodFill) function:
>  It works pretty good with the Preview but I don't get
>  filled objects on the printer. Filled polygons are shown
>  correctly in both, Preview and Printer. The german developer
>  support said that FloodFill only works with DC's having a
>  pixelarray background and they suggested to use polygons
>  but in my application I can't do that.
>  
>  In tracing down the problem I also found, that no device
>  seems to be capable of performing floodfills itself (
>  GetDeviceCaps allways says that the device can't do that)
>  so I wonder what the RC_FLOODFILL flag is good for.
>  
>  I hope that anybody out there can help me with this
>  problem since I'm really stuck.
>  Thanks
>  ----------------------------------------------------------
>  Ralf Prien                  ralf@sfb313.uni-kiel.d400.de
>  ----------------------------------------------------------
>  
-----From: "David W. Gillett" 

  It's not inconceivable that some high-end graphics accelerator 
might implement FloodFill.  I don't actually know of any that do, but 
it's a reasonable thing for MS to anticipate that somebody might 
implement.

  In the absence of hardware support, the GDI implementation may need 
to rely on GetPixel() to implement FloodFill.  Does GetPixel work on 
the printer?  I bet not.
  What you may be able to do is draw to a memory bitmap, including 
calling FloodFill, and then BitBlt that bitmap to the printer.  [You 
may need to keep this memory bitmap around and BitBlt different parts 
of it to "bands" for printing -- no sense in redoing the FloodFill 
for each band, and attempts to optimize memory use to fit banding are 
likely to screw up the FloodFill.]

Dave





| Вернуться в корень Архива |