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

List:       koffice-devel
Subject:    Re: Patch for KIllustrator and KWord (XIM)
From:       Toshitaka Fujioka <toshitaka () kde ! gr ! jp>
Date:       2001-07-17 13:51:41
[Download RAW message or body]

On Tuesday 17 July 2001 20:23, David Faure wrote:
> > > >    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 :}

Character conflicts in cPoint.x().

> > 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, hmm, XIM position is incomplete with cPoint.x() + 5.

> > 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 :)

Oh, I see. You're right. I did understand. :)

Will you apply this
  QPoint ximPoint = viewMode->normalToView( clip.topRight() );
  int line;
  cursor->parag()->lineStartOfChar( cursor->index(), 0, &line );
  canvas->setXimPosition( ximPoint.x(), ximPoint.y(), 0, h - cursor->parag()->lineSpacing( line ) );
?

Thank you.
-- 
Toshitaka Fujioka
http://www.kde.org                The K Desktop Environment Project
                                                    fujioka@kde.org
http://www.kde.gr.jp               Japan KDE User's Group
                                                    toshitaka@kde.gr.jp

-- We offer the best Desktop Environment to you.  (This is my goal. ;-)) --     

_______________________________________________
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