Re: flood fill



I wish I can use gdk_draw_polygon....However I need to plug in my own custom
flood fill algorithm. (its actually a texture synthesis method!)  I
basically need to iterate thorough the pixel array and detect what color the
pixel is and decide weather to continue to fill or stop (hit a boundary).
I'm just not sure how to detect the color of a pixel on a drawable widget?

Thanks,
Saul.

> >I'm trying to write a custom procedure that would flood fill an area
using a c
> >olor (or texture). I have used the drawing_area widget
> >and drew an arbitrary closed polygon on it using the gdk_draw_line()
function
> >(black lines over a white background). All I need to do is fill in the
pixels
> >within the boundary. Does anyone know how I can get the boundary. (I
obviously
> > have the points of the polygon vertices, but I would need the scan-line
point
> >s generated from the draw_line function). Perhaps I can capture the color
at t
> >he (x,y) positions? anyone know how?
>
> gdk_draw_polygon ?
>
> --p
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/.listinfo/gtk-list
>
>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]