[wxpython-users] FloodFill on OSX

Timothy Grant timothy.grant at gmail.com
Wed Apr 2 00:15:52 PDT 2008


Hello Peter,

Thank  you for your help, I tried all four possible combinations of
DARKGREY/BLUE  and SURFACE/BORDER, and each of them behaved exactly the
same.

I'll start messing about with the  rectangles, though i'd love to know what
I'm doing wrong with this bit of code.

Thanks again.


-- =

Stand Fast,
tjg.

On Tue, Apr 1, 2008 at 11:30 PM, Peter Damoc <pdamoc at gmail.com> wrote:

> Tim,
>
> try using:
> wx.FLOOD_BORDER
>
> or change the reference color in the FloodFill to BLUE
>
> Also, if it is a rectangle... it would look simpler if you just draw a
> rectangle over the grid in the right position.
>
> Peter.
>
> On Wed, Apr 2, 2008 at 2:57 AM, Timothy Grant <timothy.grant at gmail.com>
> wrote:
>
> > I'm just mucking about with some wxPython code and am a bit flummoxed by
> > this behavior..
> >
> > I have a window with a 'DARKGREY' grid painted on it. I simply want to
> > colour the square on the grid I click in a different colour.
> >
> >         dc =3D wx.PaintDC(self)
> >         dc.SetBrush(wx.Brush('BLUE'))
> >
> >         print dc.Brush.GetColour()
> >         dc.BeginDrawing()
> >         if dc.FloodFill((w * GRIDSIZE) + 1, (h * GRIDSIZE) + 1,
> > 'DARKGREY', wx.FLOOD_SURFACE):
> >             print "flood successful"
> >         else:
> >             print "flood not successful"
> >         dc.EndDrawing()
> >
> > The FloodFIll always prints "flood not successful" and I'm not sure what
> > I'm doing wrong.
> >
> > --
> > Stand Fast,
> > tjg.
> > _______________________________________________
> > wxpython-users mailing list
> > wxpython-users at lists.wxwidgets.org
> > http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
> >
> >
>
>
> --
> There is NO FATE, we are the creators.
> _______________________________________________
> wxpython-users mailing list
> wxpython-users at lists.wxwidgets.org
> http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200804=
02/72f6048e/attachment.htm


More information about the wxpython-users mailing list