Guillaume:
> Stephen:
> > and how can this be passed to the notation editor?
> 
> With a QCanvasPixmap, but Chris will tell you more on the specifics here.

The ideal thing from the notation editor's point of view would be for a 
fretboard to be drawable at any scale by a dedicated method in 
NotePixmapFactory.

This effective and convenient but overgrown and tangly class (refactoring 
suggestions welcomed, but cautiously because of its fragility) produces various 
notation symbols either by drawing them onto new canvas pixmaps (for screen 
use) or directly onto a canvas (for printer use - this is purely an optional 
optimisation to cut out large intermediate pixmaps when printing). 

The fretboard could be drawn using plain lines for the grid and maybe even 
NoteFont characters for the finger positions. In RG terms a NoteFont can refer 
to any collection of pixmaps and characters from any actual fonts as defined in 
the font mapping XML files (we may have been over this before). Alternatively 
if using plain circles, the screen-sized ones should be antialiased (you can do 
this easily for circles by drawing at 2 or 3 times the required size and using 
Qt's rescale). 

There are plenty of examples in the other methods, anyway. 

And then look to the NotationStaff for the next level up of logic about what to 
draw when and what to do with it, and Notation[VH]Layout for where to do it. I 
would assume a fretboard would be treated much like other notation objects such 
as key signatures - the fact that it's outside the staff should be no 
impediment. 

I won't claim that this is the best way for you necessarily - it may well be 
that it would be hard to do this way without too much linkage between gui and 
guitar classes. It should give you some idea of what the norm for the notation 
view is, anyway. 


Chris


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to