> When printing from Scintilla, using SCI_FORMATRANGE it seems that
> there is aslight bug concerning trailing blank lines here. If I have
> this text, 3 lines, with the two trailing lines blank;
> <sample>
> some text
>
>
> </sample>
> Scintilla will say it can fit this printing within only 2 lines of
> text here.
How is this information returned from Scintilla? The return value
is the index after the last character printed.
> The reason I found this out was that I was using this, with
> bDraw set to false, to figure out how big an area Scintilla was really
> printing to, so I could follow the printout with something else or
> draw a frame around it.
>
> If I print THIS text though, it seems to work as expected, and says
> that three lines are required, not 2 as above.
> <sample>
> some text
> x
> x
> </sample>
Three lines are printed in each case.
> And the feature request then follows on this: Would it be possible to
> have SCI_FORMATRANGE return the RECT actually used when printing, like
> Win32 DrawText does when passing DT_CALCRECT is passed.
That would not be compatible with current behaviour or with
EM_FORMATRANGE which it is based on. It should be possible to
determine the rectangle by changing the bottom of the printing
rectangle until a different value is returned.
Neil