You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Oleg Tkachenko <ol...@multiconn.com> on 2003/01/02 12:15:52 UTC

coordinates

Hello!
I'm stuck in understanding the coordinate system trying to sort out writing 
mode stuff, e.g. in this snippet from SimplePageMaster.java:

     /* Create the page reference area rectangle in first quadrant coordinates
      * (ie, 0,0 is at bottom,left of the "page media" and y increases
      * when moving towards the top of the page.
      * The media rectangle itself is (0,0,pageWidth,pageHeight).
      */
     Rectangle pageRefRect =
         new Rectangle(mProps.marginLeft, mProps.marginTop,
               pageWidth - mProps.marginLeft - mProps.marginRight,
               pageHeight - mProps.marginTop - mProps.marginBottom);

am I right that the comment is wrong and 0,0 is really at top-left?
-- 
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: coordinates

Posted by Oleg Tkachenko <ol...@multiconn.com>.
Keiron Liddle wrote:

> That appears to be the old coordinate system which was tied to the pdf
> coordinate system.
> The new way is to have 0,0 at the top left.
> It appears that some of the page master stuff hasn't been updated.
I fixed that a little bit, now regions are placed ok in lr-tb, rl-tb and 
tb-rl modes, what else may still not be updated?
btw, how can I define *value* shortcut in properies file? I mean lr, rl 
and tb writing modes (I know, shortcuts are not basic level but these 
don't require any efforts to implement) - they are simply shortcuts for 
lr-tb, rl-tb and tb-rl, so property maker should just have
if (value.equals("lr-tb")) { return s_propLR_TB; }
if (value.equals("lr")) { return s_propLR_TB; }
If it's not implemented I'm volunteering to do it.

-- 
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: coordinates

Posted by Keiron Liddle <ke...@aftexsw.com>.
On Thu, 2003-01-02 at 12:15, Oleg Tkachenko wrote:
> Hello!
> I'm stuck in understanding the coordinate system trying to sort out writing 
> mode stuff, e.g. in this snippet from SimplePageMaster.java:
> 
>      /* Create the page reference area rectangle in first quadrant coordinates
>       * (ie, 0,0 is at bottom,left of the "page media" and y increases
>       * when moving towards the top of the page.
>       * The media rectangle itself is (0,0,pageWidth,pageHeight).
>       */
>      Rectangle pageRefRect =
>          new Rectangle(mProps.marginLeft, mProps.marginTop,
>                pageWidth - mProps.marginLeft - mProps.marginRight,
>                pageHeight - mProps.marginTop - mProps.marginBottom);
> 
> am I right that the comment is wrong and 0,0 is really at top-left?

Yes, you are right.
That appears to be the old coordinate system which was tied to the pdf
coordinate system.
The new way is to have 0,0 at the top left.
It appears that some of the page master stuff hasn't been updated.



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org