cstester - a tool for testing loading and painting of documents

Jaroslaw Staniek staniek at kde.org
Wed Jan 19 09:34:52 GMT 2011


On 19 January 2011 09:27, Cyrille Berger Skott <cberger at cberger.net> wrote:
> On Tuesday 18 January 2011, Jaroslaw Staniek wrote:
>> On 18 January 2011 15:02, Cyrille Berger Skott <cberger at cberger.net> wrote:
>> > On Tuesday 18 January 2011, Boudewijn Rempt wrote:
>> >> Doesn't QPicture do something like that already? Or else we might
>> >> compare the svg.
>> >
>> > Well QPicture is a binary format. And I am not sure if SVG would provide
>> > easy to use diff.
>>
>> Well, for my understanding, the binary format is only because of
>> specific serialization. At logical level it's a sequence of stokes,
>> circles, points, bitmap blits etc., whatever is possible via QPainter.
>> Two series can be certainly compared but the question is how to define
>> identity relation. Two different sequences can result in eqal pictures
>> (in this case the set of items are equal), and conversely two sets can
>> be equal but result in different pictures, e.g. because z-order
>> matters.
> Yes it could help with DPI. Since you could use it to rebuild both QImage by
> replaying the original QPicture on a QImage.
>
> But my problem with it being binary is that a diff is of little value. What I
> am hopping with the text format is to be able to run diff, and get this
> output:
>
> -LINE 11.0 -12.1 34.3 2.3 QPEN(255,0,0)
> +LINE 12.0 -12.1 34.3 2.3 QPEN(255,0,0)
>
> And of course if you run that on a big document it might not be that helpfull,
> but on smaller unit tests, I am thinking it could give an idea of what went
> wrong.

That was my assumption. Since QPicture API does not expose the way how
(de)serialization is implemented, how about forking it for our (not
really typical) purposes?

-- 
regards / pozdrawiam, Jaroslaw Staniek
 http://www.linkedin.com/in/jstaniek
 Kexi & Calligra (kexi-project.org, identi.ca/kexi, calligra-suite.org)
 KDE Software Development Platform on MS Windows (windows.kde.org)



More information about the calligra-devel mailing list