findPointsCoords signature and BiDi


Subject: findPointsCoords signature and BiDi
From: Tomas Frydrych (tomas@frydrych.uklinux.net)
Date: Thu Feb 08 2001 - 13:20:41 CST


The BiDi version of findPointCoords needs three more parameters:
extra set of coordiances x2, y2 and a bDirection, which indicates
the direction of the run immediately preceding the caret. The former
two are needed because one physical location of the insertion point
can have two simultaneous visual positions on the screen, the later
is needed so that xorInsertionPoint can draw a direction flag at the
top of the insertion point.

Adopting the BiDi signature even for the non-bidi version reduces
the number of #ifdef BIDI_ENABLED in the patch by 60, without
any real impact on the performance.

Using an overloaded version is not, IMO, very good idea, because
we would not want the longer version to reside in the non-BiDi
code, and so we would end up with the #ifdef's anyway. Further,
and more importantly, it would make it very difficult to track
changes to this function. At the moment when someone makes
changes or fixes any bugs in findPointCoords, the CVS either can
merge these, so that the BiDi version is also fixed, or more of then
not, in which case I know and fix it by hand. If I there was an
overloaded version for BiDi, any such changes would not make it
in, because the CVS would always be able to merge the non-BiDi
variant, leaving no warning.

Tomas

*********************************************
tomas@frydrych.net / www.frydrych.net
PGP keys: http://www.frydrych.net/contact.html



This archive was generated by hypermail 2b25 : Thu Feb 08 2001 - 13:26:40 CST