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

List:       koffice-devel
Subject:    Re: Question about KoZoomHandler
From:       Boudewijn Rempt <boud () valdyas ! org>
Date:       2006-09-21 14:55:42
Message-ID: 200609211655.46413.boud () valdyas ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Thursday 21 September 2006 16:31, Thomas Zander wrote:

> The same can be true for krita. There are usecases where a user wants to
> show his pixmap in a specific amount centimeters. But most of the time that
> is not the case. A user just wants to ignore the screen DPI and show things
> at a certain amount of pixels.

I discussed this about a year ago with a professional, and he asked 
specifically for the centimeter thing: that is, 100% shows the image just as 
big as its resolution would make it out to be. Pixel-for-pixel can be any 
zoom level, but will show one pixel for the image on one screen pixel. Any 
other zoomlevel than pfp will have to reckon with both image and screen 
resolution.

Of course, looking at this as a reasonable, non-professional person, I have to 
say that raster images do not, actually, possess a resolution. They just have 
points, and as I remember from my daughters' first-grade math classes, point 
shave no size, therefore an image has no size.

> From what I see, the only reason you want a class that converts between
> real units and pixels (like KoZoomHander does) is when you calculate the
> zoom level, and maybe for interacting with KoRuler.

That's a biggy. I really want to share rulers with the rest of KOffice. 
Another, derived, problem is the guides, which currently need rulers & 
zoomhandler. And I want those guides very much in krita, both for the flake 
layer as for the alignment of layers.

> Other then that I think Krita needs its own implementation of the
> KoViewConverter interface if it interfaces with Flake. At this point I
> think its even a dummy interface that doesn't actually convert anything.
>
> To get back to the KoRuler usage; it needs a KoViewConverter in the
> constructor.
> The only reason nikolaus states that its the screen dpi is due to this line
> in the KoZoomHanlder constructor:
>     setZoomAndResolution( 100, KoGlobal::dpiX(), KoGlobal::dpiY() );
> Call another setZoomAndResolution each time the DPI of your image changes
> and your rulers should update just fine.

That sounds rather more hopeful, but I think that I'll need to consult with 
someone with more maths than me again to see how it works out.

-- 
Boudewijn Rempt 
http://www.valdyas.org/fading/index.cgi

[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