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

List:       koffice-devel
Subject:    Re: The WMF support
From:       shaheed <srhaque () iee ! org>
Date:       2001-02-08 22:38:27
[Download RAW message or body]

Hi David,

> First thing I'm hitting, is that we have 3 handlers for WMF.
>
> kpresenter/qwmf.*
> killustrator/share/qwmf.*
> and the new lib/kwmf/kwmf.*
>
> The first two come from the same codebase (Stefan Taferner) but
> have evolved slightly differently (it looks like the one in killu
> is the one to keep, since it has polypolygon and mBBox, that
> the one in kpresenter doesn't have).
>
> The new one (kwmf) is more generic apparently.
> It requires the "user" of that class to reimplement some methods.
> What's the plan, Shaheed ?
> Should it be possible to generate a QPixmap or a QPicture from it
> (i.e. have a particular reimplementation of KWMF that converts the WMF ?)

That is exactly the idea. Unfortunately, I lack good knowledge of the 
fundamentals of drawing (e.g. how best to represent an abstract drawing 
context), but I designed what is there to be easy to extend as required once 
I worked out how!

> If that could be done, we could get rid of qwmf.*, and my plan is then
> to move preview.* to kofficeui, so that any koffice app can have a preview
> of wmf files when inserting one. (preview.* is currently in kword &
> kpresenter, but not in killu, ironically :)

If someone can help me a bit with the DC stuff, we can quickly rewrite qwmf 
like this:

1. take all the specific implmentations in qwmf, and make generalised 
versions in kwmf. This can then be used in several places where we want to 
keep the vector representation but also in qpixmap.

2. keep the QPixmap-specific stuff in qwmf.

The issue there is that WMF is a based on a drawing context type philosophy 
which I found difficult to map onto an abstraction layer, but that qpixmap in 
turn also wants drawing contexts. So:

wmf -> qpixmap is easy
wmf -> generic is hard (for me) but flexible and reusable
generic -> qpixmap is easy

> Otherwise, I'll have to move qwmf over with it, but that looks dirty :)

I'm up for doing it the right way!

Thanks, Shaheed
_______________________________________________
Koffice-devel mailing list
Koffice-devel@master.kde.org
http://master.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