On Friday 25 July 2003 14:05, William wrote:
>
> Wouldn't it be quick and easy to read the value of the pixel in
> the QCanvasPixmap at the coordinates of the mouse button double-click.
> If the pixel value is black/blue, then the user has hit a note, a stem or a
> flag,

Or a staff line...

> If the pixel value is non-black/blue (grey/white background), then the user
> has hit the background,

Or very near the note, and we need some kind of threshold.

> Wouldn't this work and be easy to implement?

Not really, that's not how the QCanvas works : it computes the collisions, not 
us.

> Which .cpp file has the code for detecting and reacting to a user's
> double-click on a canvas?

notationcanvasview.cpp. Better look at Qt's 'canvas' sample (and QCanvas 
documentation) for a start.

-- 
                                                Guillaume.
                                                http://www.telegraph-road.org


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Rosegarden-devel mailing list
[EMAIL PROTECTED] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to