On 03/17/2014 01:56 AM, Mitul Modi wrote:
In this case now inset dimensions are dynamic as it will depend on
position of inset.
Current implementation of dimensions has 3 members
{wid - width,
  ascent - asc,
  des-descent}.
With three box implementation, I think we will need four members

{ wid1-width of first row,
   wid2-width of last row,
   asc-ascent,
   des-descent}.

Now to compute dimensions, I have thought something like below:

This all looks like a reasonable approach, though, as I've said, I don't know this part of the code terribly well.

Now with this implementation, I think I have to re-implement methods like TextMetrics:drawParagraph, TextMetrics:redoParagraph, methods in rowPainter class and maybe some others because with current implementation, text is painted row by row in original text and with new implementation of 3 box model of insets, rows in original text is not same as rows painted in workarea (like in fig3 and fig4).

Yes, this is where most of the difficulty in doing this lies.

With nested Insets complications may increase (I am not sure at this moment) .

I expect that won't be an issue, but of course we will not know until we try.

Richard

Reply via email to