On Wednesday 18 May 2005 12:24, Chris Cannam wrote:
>
> One thing to remember for audio previews -- that will either make things
> really difficult or possibly slightly easier, but will certainly make
> them really difficult if it isn't thought about in advance -- is that
> our main timeline is "musical time" whereas the audio previews are
> "real time".  The ratio between audio preview pixels and on-screen
> pixels will vary depending on the current tempo, and this may change
> during an audio segment, so the segment previews will have to stretch
> and squash accordingly.

Oh great. I'm already having problems simply integrating the current preview 
generation mechanism with AudioPreviewThread, and now this. *sigh*.

For the record, the main problem is that the previews are generated by the 
model (following the idea that the model handles the raw data, and the view 
asks it for abstract drawing info). But the AudioPreviewThread needs to know 
the size of the rect in which the preview will be drawn, and that size is 
computed by the view at drawing time according to the current zoom level. The 
model can and does compute rectangles from segments, but it's up to the view 
to scale them. I guess that I'll have to break my nice abstraction and make 
the model aware of the zoom level.

> > > Surely all it takes is to draw the box background first, then the
> > > previews with those pixels within the box appearing in a fainter
> > > colour, and then the box outline and the text.
> >
> > The way the drawing code is currently designed doesn't make it that
> > simple, and doing it that way would turn it into a big mess.
>
> So you _are_ a wuss!  I knew it.

I'd like to keep my code in a maintainable state, if you don't mind :-).

> > Translucency will have to be done at the X level.
>
> Oh nonsense.  What a waste -- demanding translucency support at the
> toolkit or server level just for the sake of drawing one poxy little
> label.  Honestly.

Well, since it's there in all new distribs and Qt is about to support it, we 
might as well take advantage of it. In the meantime I'm not sure I want to 
indulge into what would be a gross hack.

> I'll try to find a few.  Bit in the middle of something right now
> though.

Thanks.

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


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&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