On Monday 13 January 2003 1:49 pm, Michael Schmitt wrote:
> Angus Leeming wrote:
> >Index: src/insets/insetgraphics.C
> >This looks like the right thing to do although it also looks like a right
> >pain in the arse. I take it that TEXT_TO_INSET_OFFSET is the width of the
> >frame that separates the content of the inset (image) from the rest of the
> >lyx page. I take it that mathed doesn't have such nastiness because André
> > has written a frame-inset that does just this?
>
> Well, it wasn't me who has invented TEXT_TO_INSET_OFFSET! I just wanted
> to align the code with the code of the other insets because it makes it
> easier to understand what is going on.
>
> >This doesn't look right. Who's meant to draw that extra pixel if you've
> > moved it from Formula::draw? Also, can you explain why we need this?
>
> I spent a lot of time to find out how much space is needed in front of a
> previewed math formula such that it is fully integrated
> ("undistinguishable") from normal text. (Note that there is also a gap
> between characters in normal text). After a while, I decided that 1
> pixel is exactly the right size :-) You can check this, if you move the
> cursor between two characters and between a character and a previewed
> formula and compare the spacings between the cursor and the surrounding
> text.
>
> As you can see from the code, the image is shifted one pixel to right.
> AFAICS there is no need to draw the background explicitly.
> Note that the drawing of non-previewed formula is not touched at all (at
> least it shouldn't).

No criticism intended. I was merely grumbling to myself about the ugliness of 
such stuff. Moreover, I'm ambivalent about applying stuff that I don't 
understand and this counts as stuff I don't fully understand. I'll try and 
dig deeper this evening.

-- 
Angus

Reply via email to