[prev in list] [next in list] [prev in thread] [next in thread]
List: calligra-devel
Subject: Re: Cleaning up the paint API of KoShape
From: Yue Liu <opuspace () gmail ! com>
Date: 2011-01-23 15:31:18
Message-ID: AANLkTikN7sv5tMP0rHuKtMTsFtv483yfy8p3AVt=+Bu0 () mail ! gmail ! com
[Download RAW message or body]
On Sun, Jan 23, 2011 at 10:36 PM, Inge Wallin <inge@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.
--
Yue Liu
_______________________________________________
calligra-devel mailing list
calligra-devel@kde.org
https://mail.kde.org/mailman/listinfo/calligra-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic