[Okular-devel] Review Request: Implement the handling of page rotations for source references
Albert Astals Cid
tsdgeos at terra.es
Wed Sep 26 16:44:24 UTC 2012
> On Sept. 25, 2012, 9:44 p.m., Albert Astals Cid wrote:
> > Ok, i'm a bit confused again, sorry for that, but reading the patch (I'm really trying to get it in for 4.10) and it says
> >
> > For document::setViewport
> > Note that coordinates given in @p viewport must be relative to Rotation0.
> >
> > But then in Part::slotGotoLast() we actually give different x, y depending on the rotation, but shouldn't we always pass 0,1 if we need to pass them based on the Rotation0?
>
> Michel Ludwig wrote:
> This refers to the question of what Part::slotGotoLast() is supposed to do :)
>
> If I remember correctly, I took it as "move the horizontal scrollbar as far left as possible, and the vertical one as far down as possible", and that point then depends on the current rotation.
>
> Albert Astals Cid wrote:
> Sure, but if the documentation says that setViewport has to be on Rotation0 coordinates shouldn't it just be 0,1? Otherwise what does the mention of Rotation0 in setViewport mean?
>
> Michel Ludwig wrote:
> You are right in the sense that Part::slotGotoLast() moves to (0,1) but w.r.t. the _current_ rotation.
>
> If you take a page in Rotation0 and move it to Rotation180, let's say, then the point that corresponds to (0,1) (bottom left) w.r.t. Rotation180 is (1,0) w.r.t. Rotation0.
> Hence, (1,0) has to be passed to setViewport.
>
> Am I making sense? :)
Ok, got it, now i see we have around 10 switch uses for the rotation stuff, seems a bit too extreme to me and a bit prone to breaking, is there no way we can reduce those?
- Albert
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103060/#review19428
-----------------------------------------------------------
On Sept. 18, 2012, 9:08 p.m., Michel Ludwig wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/103060/
> -----------------------------------------------------------
>
> (Updated Sept. 18, 2012, 9:08 p.m.)
>
>
> Review request for Okular.
>
>
> Description
> -------
>
> Implement the handling of page rotations for source references.
>
>
> Diffs
> -----
>
> core/document.h 85cd821
> core/document.cpp 9d6b25c
> core/page.h a8f2761
> core/page.cpp d746382
> core/utils.h 8d5d5fc
> core/utils.cpp 5dd8448
> generators/dvi/generator_dvi.cpp 5cd327f
> generators/poppler/generator_pdf.cpp c63753e
> part.cpp fe11189
> ui/pagepainter.cpp 537e5c5
> ui/pageview.h 8cf8844
> ui/pageview.cpp d3e1888
> ui/side_reviews.cpp a35f9ed
> ui/thumbnaillist.cpp 60288cb
>
> Diff: http://git.reviewboard.kde.org/r/103060/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Michel Ludwig
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20120926/0fc9c76a/attachment.html>
More information about the Okular-devel
mailing list