problem with floodfill and printer 
Author Message
 problem with floodfill and printer

Help! I'm trying to fill in a shape on the printer and am having
difficulty getting FloodFill or ExtFloodFill to work. If I run the
following code I get a box but it isn't filled in red like it should be.
What am I doing wrong? I need to use some sort of flood fill. I cannot
use polygon or perform the fill with the line method because in my full
program I have no idea what the shape is going to look like in advance.
btw: the value of Suc% I am getting returned is zero. The box is drawn
fine but is not filled in.

Thanx

dave

code snippet......
Printer.FillStyle = 1
    Printer.Line (1000, 1000)-(3000, 3000), , B
    Printer.FillStyle = 0
    Printer.FillColor = RGB(230, 0, 0)
    Suc% = ExtFloodFill(Printer.hdc, 1500 / Printer.TwipsPerPixelX, 1500
/ Printer.TwipsPerPixelY, 0, 0)
    Printer.EndDoc



Sun, 30 Sep 2001 03:00:00 GMT  
 problem with floodfill and printer
Check if the printer supports FloodFill functions:

Const RASTERCAPS = 38        '  Bitblt capabilities
Const RC_FLOODFILL = &H1000              '  supports FloodFill

Private Declare Function GetDeviceCaps Lib "gdi32" (ByVal hdc As Long, ByVal
nIndex As Long) As Long

Private Sub Form_Load()
Dim caps As Long

    caps = GetDeviceCaps(Printer.hdc, RASTERCAPS)

    If (caps And RC_FLOODFILL) = RC_FLOODFILL Then
        MsgBox "The printer supports FloodFill"
    Else
        MsgBox "The printer does not support FloodFill"
    End If

End Sub

--
Eduardo Morcillo
Free ActiveX Controls: http://www.geocities.com/SiliconValley/Foothills/9940

Quote:
> Help! I'm trying to fill in a shape on the printer and am having
> difficulty getting FloodFill or ExtFloodFill to work. If I run the
> following code I get a box but it isn't filled in red like it should be.
> What am I doing wrong? I need to use some sort of flood fill. I cannot
> use polygon or perform the fill with the line method because in my full
> program I have no idea what the shape is going to look like in advance.
> btw: the value of Suc% I am getting returned is zero. The box is drawn
> fine but is not filled in.

> Thanx

> dave

> code snippet......
> Printer.FillStyle = 1
>     Printer.Line (1000, 1000)-(3000, 3000), , B
>     Printer.FillStyle = 0
>     Printer.FillColor = RGB(230, 0, 0)
>     Suc% = ExtFloodFill(Printer.hdc, 1500 / Printer.TwipsPerPixelX, 1500
> / Printer.TwipsPerPixelY, 0, 0)
>     Printer.EndDoc



Sun, 07 Oct 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. problem with floodfill and printer

2. Equivalent of FloodFill for Printers

3. FLOODFILL on a printer example wanted !

4. Floodfill on a printer

5. Floodfill for Printer Object

6. Floodfill problem still occurring

7. Problem with FloodFill

8. FloodFill problems....

9. FloodFill Problems in VB4.0

10. FloodFill problem

11. Problem with FloodFill

12. Problem setting the active printer of Word 97 without changing the Windows default printer

 

 
Powered by phpBB® Forum Software