Drawing lines



Taking a cue from a previous poster, I'd like to draw a line in a drawing
area between two points, starting where the user presses a mouse button
and ending where the button is released.

The code fragment in

  http://www.radix.net/~bbrown/temp/draw_lines.c

almost does this.  It reports the coordinates where the button is pressed
and released just fine.  The problem is, when I uncomment-out the line
that calls gdk_draw_line I get a segmentation fault.

So, what's missing in the code fragment?

In addition, how can I get the color of each pixel in the line to be the
XOR of the pixel's original color?  I want to do that so I can eventually
redraw the line and recover the original underlying image.

TIA,

Bryan


*---------------------------------------------------------------
* Bryan Brown      <*>              bbrown radix net
* http://www.radix.net/~bbrown
*---------------------------------------------------------------




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