[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: Patch for KIllustrator and KWord (XIM)
From:       David Faure <david () mandrakesoft ! com>
Date:       2001-07-17 11:23:03
[Download RAW message or body]

> > >    QPoint ximPoint = viewMode->normalToView( clip.topRight() );
> >
> > Out of curiosity, why topRight ?
> > Why does it depend on the clip rect ?
> 
> case of ximPoint.x():
>  http://www.kde.gr.jp/~toshitaka/Kde/KOffice/KWord/xim1.png
> 
> case of cPoint.x():
>  http://www.kde.gr.jp/~toshitaka/Kde/KOffice/KWord/xim2.png

Hehe, I'm not too sure what I'm supposed to see there, but ok ;-)
I suppose it's not the vertical line (looks like a normal cursor),
so it's the horizontal line (kind of an underline) ? That one looks
fine in both shots :}

> XIM position is delicately wrong. ximPoint.x() is better.

It means there's a small offset somewhere (there are 5 horizontal
pixels difference between cPoint and cliprect.topRight() - it's as if
you had written cPoint.x() + 5). The only problem is that it might change
a bit when approaching the right border of the frame, because the cliprect
is "clipped" to the frame, so cliprect.topRight() will not be at +5 anymore 

> Hmm, I see. But return value of cursor->parag()->lineSpacing( lineY ) is 
> same as
>   int line;
>   cursor->parag()->lineStartOfChar( cursor->index(), 0, &line );
Only because we don't support per-line line spacing yet - and have you tried paragraphs
with more than one line ? (the line number and Y are 0 for the first line, but for the second
line they're very much different !)
Please use the line number, not the line Y position :)

-- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://perso.mandrakesoft.com/~david/, http://www.konqueror.org/
KDE, Making The Future of Computing Available Today
_______________________________________________
Koffice-devel mailing list
Koffice-devel@master.kde.org
http://master.kde.org/mailman/listinfo/koffice-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic