Cleaning up the paint API of KoShape
Inge Wallin
inge at lysator.liu.se
Sun Jan 23 16:01:34 GMT 2011
On Sunday, January 23, 2011 16:31:18 Yue Liu wrote:
> On Sun, Jan 23, 2011 at 10:36 PM, Inge Wallin <inge at lysator.liu.se> wrote:
> > There is a big wart on the KoShape API and that is the one for painting.
> > Currently we have these two functions:
> >
> > virtual void paint(QPainter &painter, const KoViewConverter &converter)
> > = 0; virtual void paintDecorations(QPainter &painter,
> > const KoViewConverter &converter,
> > const KoCanvasBase *canvas);
> >
> > The biggest problem is the KoViewConverter parameter. There is no reason
> > why this should be necessary. It should be the responsibility of the
> > calling code to set up the painter so that the shape itself can just
> > paint from (0, 0) to size() and that's it (if we for the moment ignore
> > painting outside the shape).
>
> I don't know what's the meaning of ignore painting outside the shape,
> just to mention that blur effect to drop-shadow caused the actual
> shadow size bigger than the shape size, there are some pixels outside
> the shape need to be painted.
Not ignore in the code, of course, just ignore for the sake of this
discussion.
More information about the calligra-devel
mailing list