Re: Matrix Inconsistency?

Lawrence D'Oliveiro <[email protected]>
Newsgroups gmane.comp.lib.cairo
Organization Geek Central
Message-ID <[email protected]>
On Tue, 5 Jul 2016 14:28:38 -0700, Bryce Harrington wrote:

> On Thu, Jun 30, 2016 at 03:57:15PM +1200, Lawrence D'Oliveiro wrote:
>>
>> I wrote:
>>  
>>> ... the docs for cairo_transform
>>> <https://www.cairographics.org/manual/cairo-Transformations.html#cairo-transform>
>>> say “The new transformation of user space takes place after any  
>>>                                                       ^^^^^  
>>> existing transformation”.  
>>
>> I think the fix should be to change “after” to “before”.  
>
> That was introduced in commit
> 0b09748296ea3f0ebb554061ef248373b8437947, which changed the order of
> transformation in the docs for multiply/scale/rotate/translate.  That
> didn't touch the transform docs, perhaps it should have?

Clearly it should have. Presumably the change was introduced to be
consistent with PostScript. E.g. the following works as documented in
the PLRM:

    /mat_rotate
        45 matrix rotate
    def

    /mat_translate
        1 1 matrix translate
    def

    (* matrix:) =
    (rotate × translate = ) print
    mat_rotate mat_translate matrix concatmatrix ==
    (translate × rotate = ) print
    mat_translate mat_rotate matrix concatmatrix ==

    (* graphics state:) =
    matrix setmatrix
    gsave
    (rotate × translate = ) print
    mat_translate concat mat_rotate concat matrix currentmatrix ==
    grestore
    gsave
    (translate × rotate = ) print
    mat_rotate concat mat_translate concat matrix currentmatrix ==
    grestore
-- 
cairo mailing list
[email protected]
https://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.