Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostScript shape,size and position improvements. #1638

Merged

Conversation

GillesDuvert
Copy link
Contributor

@GillesDuvert GillesDuvert commented Sep 13, 2023

this PR concerns exclusively the PostScript driver and PostScript Device

It should

  • insure exact position and dimension of paper (plots,[0,0,1,1,0],[0,1,1,0,0],/norm) on a postscript file whatever the size ratio and landscape/portrait
  • a better THICKness of lines for PostScript output
  • no more 'stretching' of Hershey fonts and Symbols as described in commit d6a8e4e
  • a better default size for landscape PostScript outputs.
  • possibly solving Postscript graphic dimensions #1567 also

…Device

It  should
 - insure exact position and dimension of paper (plots,[0,0,1,1,0],[0,1,1,0,0],/norm) on a postscript file whatever the size ratio and landscape/portrait
 - a better THICKness of lines for PostScript output
 - no more 'stretching' of Hershey fonts and Symbols as described in commit gnudatalanguage@d6a8e4e
 - a better default size for landscape PostScript outputs.
However: the Hershey fonts and Symbols, while maintaining their shape, may differ from size depending on the paper size (should be harmless for most uses)
@codecov
Copy link

codecov bot commented Sep 13, 2023

Codecov Report

Attention: 23 lines in your changes are missing coverage. Please review.

Comparison is base (4957c61) 41.00% compared to head (6cc9c0d) 41.05%.
Report is 17 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1638      +/-   ##
==========================================
+ Coverage   41.00%   41.05%   +0.05%     
==========================================
  Files         355      356       +1     
  Lines       95050    95091      +41     
  Branches    19534    19544      +10     
==========================================
+ Hits        38975    39044      +69     
+ Misses      56075    56047      -28     
Files Coverage Δ
src/gdlgstream.hpp 57.93% <ø> (+0.68%) ⬆️
src/gdlpsstream.hpp 69.23% <100.00%> (+2.56%) ⬆️
src/initct.cpp 100.00% <100.00%> (ø)
src/plotting.cpp 55.87% <ø> (ø)
src/plplotdriver/ps.c 46.66% <100.00%> (-0.53%) ⬇️
src/deviceps.hpp 82.63% <96.29%> (+1.30%) ⬆️
src/gdlgstream.cpp 59.09% <84.61%> (-0.23%) ⬇️
src/snippets/A85p.c 70.96% <70.96%> (ø)
src/gdlpsstream.cpp 60.24% <72.50%> (+14.08%) ⬆️

... and 8 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…t whatever the PS page size. (compensate defect of the plplot ps driver, most aovious now that the size and position are OK)

modified symbols so they appear OK whith THICK lines (butt cap for PS problems).
Apparently the Hershey with/heigh character is 1/1.3 in IDL, not 1.2 as I thought. Modofied.
AFAIK this makes the PS output identical with IDL.
…e with plplot) now that PS outputs use the -a option.
… - simple C code, and it's almost impossible to get the real PS trandfrmation from plplot anyways as this is hidden in the ps.c driver.
…ow compressed with Ascii85 encoding as IDL does.

Many tricks used to externally "insert" postscript code in a file opened by the (modified) plplot ps.c driver.
The dirver has been modified to produce a more modern and exact ps file, without rewriting it from scratch.
@GillesDuvert GillesDuvert merged commit c0f7171 into gnudatalanguage:master Oct 12, 2023
6 of 8 checks passed
@GillesDuvert
Copy link
Contributor Author

The failure of test_tic_toc on OSX is due to the difficulty to estimate what should be the Systime() passed. With the new tictoc, more accurate and faster, the current test procedure is bound to fail sometimes.

@GillesDuvert GillesDuvert deleted the PS_correct_position_and_sizes branch July 2, 2024 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant