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

List:       koffice-devel
Subject:    Confused by KWord
From:       Simon MacMullen <simon.macmullen () aspect-proteus ! com>
Date:       2002-03-11 11:07:48
[Download RAW message or body]

I've been trying to get my KOffice thumbnail thing working properly (mostly
concentrating on KWord), but I'm getting more and more confused. The thing
I'm getting confused by is the semantics of KoDocument::paintContent().

I initially assumed that paintContent() was supposed to be free of side
effects to the document, and would just effect the QPainter that was passed
to it. But calling it with a zoom of anything other than 1.0 leads to the
currently loaded document resizing to that zoom level (but the text point
size does not change!) Looking at KwDocument::paintContent I see that the
first thing it does is set m_zoom, and then call setResolution(), so this
behaviour is unsurprising.

So is this a bug (in which case I can try to fix it myself, fail, and then
watch David Faure fix it in 10 minutes), or is it meant to work like this? I
wondered whether what I wanted was a KoView (assuming that's View as in
Model-View-Controller) but KoView::paintEverything just tells the document
to paint itself and we get the same effect.

I tried just calling paintContent() with a zoom of always 1.0, and scaling
the resultant pixmap, but it would appear that when KWord is at a zoom of
"100%", m_zoom is equal to 0.998723 (on my system anyway), so the screen
display gets corrupted anyway.

So can someone (David?) tell me, is paintContent() supposed to be
side-effect free?

Thanks,

Simon

_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.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