fix for abicocoa

From: R. Payette <premi_at_altern.org>
Date: Sun Oct 03 2004 - 05:11:15 CEST

Sorry, I'm not that experienced with cvs and patches...

ap_CocoaTopRuler.mm and ap_CocoaLeftRuler.mm in function
_graphicsUpdateCB

UT_Rect rClip;
rClip.left = (UT_sint32)rint(pG->tluD(aRect->origin.x));
rClip.top = (UT_sint32)rint(pG->tluD(aRect->origin.y));
rClip.width = (UT_sint32)rint(pG->tluD(aRect->size.width));
rClip.height = (UT_sint32)rint(pG->tluD(aRect->size.height));
/*UT_Rect rClip;
rClip.left = (UT_sint32)aRect->origin.x;
rClip.top = (UT_sint32)aRect->origin.y;
rClip.width = (UT_sint32)aRect->size.width;
rClip.height = (UT_sint32)aRect->size.height;*/

this fixes the times when the rulers is displayed by this function (
like when selecting "show ruler" from view menu )

and I'd like to know from more experienced dev, what would be the best
way to archive this:

in gr_Graphics.cpp

UT_sint32 GR_Graphics::_tduX(UT_sint32 layoutUnits) const
{
        return tdu(layoutUnits+getPrevXOffset()) - tdu(getPrevXOffset())-1;
}

adding the -1 at the end fixes a few display bugs on the cocoa port but
I'm pretty sure it not the right way to do it, other ports will be
broken by that.

by the way, good job Francis on the scroll thing... work great

abicocoa is almost on par with linux port
Received on Sun Oct 3 05:12:10 2004

This archive was generated by hypermail 2.1.8 : Sun Oct 03 2004 - 05:12:10 CEST