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

List:       koffice-devel
Subject:    Re: Some random KOffice ideas
From:       Thomas Zander <zander () kde ! org>
Date:       2006-03-31 22:23:21
Message-ID: 200604011023.25338.zander () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Wednesday 29 March 2006 21:08, Dirk Schönberger wrote:
> > The idea is to solve these issues by making sure that the host
> > application knows how to render the entire document, *including* the
> > embedded objects. The only thing the host application has no
> > knowledge about is how to edit the embedded objects. This is left to
> > the responsible KPart.
>
> The problem is that the rendering API which is used (QPainter),
> provides no implicit context, where the part can access information
> about where it is supposed to be rendered. Think things like current
> Zoom level, current rotation.
> These informations have to be provided by some kind of API, and they
> can be ignored at will. There is currently no real way to enforce this
> context.
> Additionally, each document has its own "coordinate system".

This is a normal state of affairs that all 2d rendering systems have.  I 
don't know the Qt4 API yet, but if there are no regressions then you 
should not worry about such things.

The solution is simple and more maintainable than the current solution 
anyway.
The solution is to translate and rotate the painter _before_ it is given 
to the embedded part. The embedded part will then paint itself at 
coordinates 0,0 using the QPainter API (and thus using lines and arcs 
etc).
Together with clipping rects this is a complete and OO solution to the 
problem.

This is the way that Swing works for its widgets which technically 
speaking are just objects that paint a small region in the window (since 
Swing does not actually use widgets like Qt does).

I'm looking forward to exploring the Qt4 API and figuring out if the 
Trolls made something we can be proud of :)
-- 
Thomas Zander

[Attachment #5 (application/pgp-signature)]

_______________________________________________
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