Abdelrazak Younes wrote:

> Alfredo Braunstein wrote:
>> Abdelrazak Younes wrote:
>>> I think there is a misundertanding here... I agree that the baseline is
>>> the reference and I did not change that philosophy I think. For me the
>>> baseline is the baseline of the inset, not the baseline of the inner
>>> Text. The fact that InsetCollapsable adjust its baseline to its inner
>>> Text is just a special case.
>> 
>> Not so special (pretty much every Text related Inset) but yes.
> 
> Well, tabular is another special case but that's what I meant yes.
> 
>> 
>>> Now, that's my turn to be unsure of the clarity of what I'm saying...
>> 
>> I'm not sure either... So you don't plan to switch every InsetX::draw
>> function to accept top_y, just TextMetrics::draw?
> 
> No, I didn't even do that for InsetCollopsable, please note that the
> code at the top of the draw() method now is:
> 
> int const top = y - tm.ascent();
> 
> So, this _is_ the text baseline. The only effect of my change is that I
> factorized the substraction of the text ascent. Probably we should
> rename top to baseline. Now I understand where you got confused...

Sorry I can't follow you. Maybe I'm just tired today. ;-)

What I read from the code is:

Insetcollapsable::draw(x, y) (and other insets):

y is the baseline of the InsetCollapsable (that happends to be the same
baseline of the InsetText, at least in inlined situation) [-- I don't get
why you would substract the ascent in the non-inlined situation]

y - tm.ascent() is the top of the Text, not a baseline

- InsetText::draw(x, y):

the y refers to the top of the *Text* (horrible, not even top of the
InsetText)

- TextMetrics::draw(x, y):

the y refers to the top of the Text



It seems pretty much a mess to me.

A/


Reply via email to