#90 Non-integer -ori values turn rectangles into parallelograms

open
nobody
None
5
2010-05-22
2010-05-22
No

The following test demonstrates all the rotated rectangles have incorrectly been rendered as parallelograms.

examples/c/x01c -dev pngcairo -geometry 800x400 -ori 0.2 -o test.png

The resulting test.png file (attached) also shows incorrectly oriented labels.

Discussion

  • Alan W. Irwin

    Alan W. Irwin - 2010-05-22

    pngcairo result showing parallelogram distortion issue

     
  • Alan W. Irwin

    Alan W. Irwin - 2010-05-22

    If inside calc_diori in src/plcore.c, the line

    lx = plsc->phyxlen;

    is changed to

    lx = plsc->phyxlen/plsc->aspori;

    the parallelogram distortion and mis-oriented text issues disappear as can be seen from test1.png (to be attached). These issues also disappear if the -freeaspect option is added. However, if you try

    examples/c/x01c -dev psc -ori 1 -freeaspect -o test.ps

    or the equivalent

    examples/c/x01c -dev psc -portrait -o test.ps

    the above fix has some side effects such as elliptical circular symbols and incorrect clipping limits that need to be addressed before committing the fix. Also, the fix was determined by experiment, and before committing the fix it would be good to know why it works.

     
  • Alan W. Irwin

    Alan W. Irwin - 2010-05-22

    Good result with fix applied

     
  • Alan W. Irwin

    Alan W. Irwin - 2010-05-22

    Clarification:

    "These issues also disappear if the -freeaspect option is added" was not clear. What I should have said instead, is that if you use the combination os the -ori and -freeaspect options, the fix also works to get rid of distortion that occurs in the unfixed case.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks