Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Set PostScript language level to 3 #25769

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

Merged
merged 4 commits into from
Apr 26, 2023
Merged

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Apr 26, 2023

PR Summary

We currently use various operators from level 2:

  • <<
  • >>
  • colorimage
  • glyphshow
  • makepattern
  • rectfill
  • selectfont
  • setpagedevice
  • setpattern

and from level 3:

  • ShadingType
  • shfill
  • Type 42 fonts, possibly

without any conditions or fallback, so we should be explicit about what we require. This is already part of the xpdf distiller at level 2, but not ghostscript. Since the distiller is optional though, we shouldn't rely on that.

Also, since we would now require at least level 2, we can use the rectclip operator.

PR Checklist

Linked Issue

  • [n/a] Added "closes #0000" in the PR description to link it to the original issue.

Documentation and Tests

  • Has pytest style unit tests (and pytest passes)
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • [n/a] New plotting related features are documented with examples.

Release Notes

  • [n/a] New features are marked with a .. versionadded:: directive in the docstring and documented in doc/users/next_whats_new/
  • [n/a] API changes are marked with a .. versionchanged:: directive in the docstring and documented in doc/api/next_api_changes/
  • Release notes conform with instructions in next_whats_new/README.rst or next_api_changes/README.rst

QuLogic added 4 commits April 25, 2023 20:58
We currently use various operators from level 2:

- `<<`
- `>>`
- `colorimage`
- `glyphshow`
- `makepattern`
- `rectfill`
- `selectfont`
- `setpagedevice`
- `setpattern`

and from level 3:

- `ShadingType`
- `shfill`
- Type 42 fonts, possibly

without any conditions or fallback, so we should be explicit about what
we require. This is already part of the xpdf distiller at level 2, but
not ghostscript. Since the distiller is optional though, we shouldn't
rely on that.
This is just a bunch of shortcut procedure definitions for Matplotlib's
internal use; there's not much use for them externally.
Since we require language level 2 now, we can use this directly.
I only change places that used the exact same formatting, and not cases
of, e.g., `%f` or `%g`.
@tacaswell tacaswell added this to the v3.8.0 milestone Apr 26, 2023
@tacaswell tacaswell merged commit 2e2d2d5 into matplotlib:main Apr 26, 2023
@QuLogic QuLogic deleted the ps-level3 branch April 26, 2023 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants