[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: KoCanvasBase::updateCanvas() and QPainter::boundingRect()
From: "Florian Merz" <FlorianMerz () gmx ! de>
Date: 2008-11-07 21:29:01
Message-ID: 20081107212901.97600 () gmx ! net
[Download RAW message or body]
Hi everyone,
I was working on the paragraph tool and trying to improve the text labels, but I have \
a chicken and egg problem when I'm trying to paint the text onto the canvas:
I need the bounding rectangle of the text to call updateCanvas() with the proper \
parameters. I need the QPainter to get the bounding rectangle of the text (via \
QPainter::boundingRect()). I need the KoTool::paint() method to be called to get a \
QPainter. And finally I need to call updateCanvas() to get the KoTool::paint() method \
to be called. But I cannot call updateCanvas() without the bounding rectangle...
The rectangle might change any time, so it's not a real option to store the size of \
the rectangle, and I really would like to have a bounding rectangle as small as \
possible. Is there a clean solution to this problem?
Thanks for your help,
Florian
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://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