On Fri, Oct 13, 2000 at 04:56:50PM +0200, mark dufour wrote:
> 
> the following code is now used here to draw a line:
> 
>       TSXDrawLine(display, physDev->drawable, physDev->gc,
>                         dc->w.DCOrgX + XLPTODP( dc, dc->w.CursPosX ),
>                         dc->w.DCOrgY + YLPTODP( dc, dc->w.CursPosY ),
>                         dc->w.DCOrgX + XLPTODP( dc, x ),
>                         dc->w.DCOrgY + YLPTODP( dc, y ) );  
> 
> where
> 
> #define XLPTODP(dc,x) \
>     (MulDiv(((x)-(dc)->wndOrgX), (dc)->vportExtX, (dc)->wndExtX) +
> (dc)->vportOrgX)
> #define YLPTODP(dc,y) \
>     (MulDiv(((y)-(dc)->wndOrgY), (dc)->vportExtY, (dc)->wndExtY) +
> (dc)->vportOrgY)                

Please before we start optimizing can we at least make it work
correctly :) All of these XLPTODP all completely broken if we have a
world transform set up that involves anything less trivial than a
translate/scale.  We're going to end up using something like LPtoDP
here instead.  By all means optimize, all I'm saying is that this
stuff is going to change soon anyway.

Huw.



Reply via email to