On Sunday 20 Feb 2005 20:31, Guillaume Laurent wrote:
> In the new CompositionItemHelper::getStartTime() and getEndTime() I
> use snapX() to compute the start/end time represented by an item's
> rectangle. The problem is that I seem to get an off-by-1 error,
> except when the passed x coordinate is 0. 

Uh, I don't get it.

Are you talking about your new functions that include these lines?:

return std::max(grid.snapX(item->rect().x()) - 1, 0L);
return std::max(grid.snapX(item->rect().x() + item->rect().width()) - 1, 
0L);

If so, then presumably the off-by-1 error is caused by subtracting 1?


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

Reply via email to