Re: [RFC] New fl_BlockLayout::findPointCoords implementation


Subject: Re: [RFC] New fl_BlockLayout::findPointCoords implementation
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Mon May 29 2000 - 01:01:01 CDT


On Sat, 27 May 2000, Jesper Skov wrote:

> Hi
>
> I'd like people to look at this new implementation of the
> findPointCoords method, and help me with suggestions for improvement.
>

Hi Jesper,
          I haven't taken the time read through your code in depth but I
have submitted it to some tests which show up shortcommings in the cursor
sizing and positioning calculations. Basically the problem arises at the
boundaries of subscript and superscript text. When positioning the cursor
at the start of superscript run, the cursor shows superscript size and
position but the text is actually entered as normal. At the end of a
superscript run the cursor shows normal size and position but the text is
actually entered as superscript. A very similar problem exists on the
boundaries of different size fonts. The code chooses exactly the wrong
size for the cursor at both the beginning and end. This used to work with
the old code.

In addition inserting Fields leads to the following assertion:

**** (23) FP_RUN_NOT != containsOffset(iOffset) at fp_Run.cpp:1022 ****
**** (23) Continue ? (y/n) [y] : y

and the cursor is positioned before the field instead of after the field.

On the other hand you've fixed tons of assertions, especially those from
page breaks and if you press "superscript" or "subscript" the cursor
immediately changes size and location correctly. This didn't used to work.
Also changing font size immediately changes the size of the cursor. This
also didn't use to work on new lines after hitting return.

Clearly you've made progress, can you work on fixing the cursor sizing on
boundaries between text of different size and location? Also the
positioning the cursor at field boundaries is wrong too.

I once looked at this code and tried to sort it all out. I thought in the
end it would be better to size the cursor from the text properties using
the pview->getpoint() function. Maybe Mike's new cursor class could do
this?

I'm looking out for an even better patch :-)

Cheers!

Martin



This archive was generated by hypermail 2b25 : Mon May 29 2000 - 01:01:17 CDT