On Wednesday 23 Feb 2005 13:31, Guillaume Laurent wrote: > No, the -1 is here to correct the off-by-1 error.
Well, I'm not sure about this at the moment, but I do feel there's probably a fundamental misdesign contributing to this. I don't think the position and width of objects that represent things on the canvas should be stored as integer coordinates; I think they should be stored in time units, and only converted when rendered. Every horizontal measure should be a timeT internally. Otherwise you get nasty rounding errors, such as the inevitable rounding error (that we currently have in the 1.0 branch) when repeatedly adding on an integer width in order to calculate segment repeat rectangle positions instead of repeatedly adding on the actual time that the width approximates. To avoid that particular case, the repeat length in CompositionRect needs to be in time units rather than display ones. Similarly CompositionItemImpl should probably be storing time for x instead of using a QRect, and so on. The new design isn't completely obvious to me on first glance so I might be missing some details, but I'm pretty confident of the general gist. This is one of the things we do wrong in the 1.0 segment canvas code, and it'd be a pity to keep the same irritating deficiencies around in the new code. Chris ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Rosegarden-devel mailing list [email protected] - use the link below to unsubscribe https://lists.sourceforge.net/lists/listinfo/rosegarden-devel
