RE: GDK_POINTER_MOTION_HINT_MASK has no effect

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

 



Aha!  I did not know that I could configure the GC to draw using
various functions of the source and dest pixels values. Thanks !

Stewart

> -----Original Message-----
> From: Paul Davis [mailto:paul@xxxxxxxxxxxxxxxxxxxxx]
> Sent: Tuesday, November 27, 2007 11:13 PM
> To: stewart.weiss@xxxxxxx
> Cc: richard boaz; gtk-list@xxxxxxxxx
> Subject: RE: GDK_POINTER_MOTION_HINT_MASK has no effect
> 
> 
> On Tue, 2007-11-27 at 22:17 -0500, Stewart Weiss wrote:
> > Richard:
> >  
> > Thanks for this suggestion.  Last night after sending the message, I
> > did, in fact, resort to
> > doing pretty much what you suggested below, by getting the mouse-down,
> > then tracking it 
> > with button-motion-notify, and then getting the mouse-up event. But I
> > am not using a temporary
> > pixmap, and I have to erase each previously drawn line.
> >  
> > What I want to achieve is a typical Line Tool, like the one in Windows
> > Paint, one that will
> > continuously redraw the line as I drag the mouse.   In order to solve
> > this, in my motion-notify-event
> > handler I erase the previous line by drawing it on the window (not the
> > pixmap) using the background 
> > color of my pixmap, then draw a new one in the window (not in the
> > pixmap). When I get the mouse up event,
> > I draw the last line into the pixmap and render it to the screen. But
> > I still have some problems.
> > When I erase the previous line, I also erase pixels that might have
> > been drawn as part of something
> > else in the window, so my solution is that when I get the button-up
> > event I invalidate the entire
> > window to redraw it. But until I release the mouse button, the erase
> > pixels remain erased. I was thinking
> > of invalidating the rectangle containing the line each time to se if
> > that would work, but I have not tried it
> > yet (busy day). But any other ideas would be appreciated.
> 
> google for "draw xor gtk" and read on ...
> 
> 
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux