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

Let psconvert -N+kfill set alternate fade fill #7972

Merged
merged 6 commits into from Oct 24, 2023
Merged

Conversation

PaulWessel
Copy link
Member

@PaulWessel PaulWessel commented Oct 24, 2023

See #7593 for some background. movie allows two fill settings that are passed to psconvert when building the rasters:

  1. With -G one can optionally fill the bounding box with specified colour before other things are painted
  2. With -K (and -E) one can specify what the terminal fade colour should be [Default is black].

Unfortunately, psconvert only had -N+g to accept the background fill and the fade colour was passed from movie the same way via -N+g, resulting in two different +gcolor modifier passed to psconvert, which then of course used just the last one given. Thus, fade was always black.

This PR does several things:

  1. Adds +kfadefill to -N and updates movie to pass that modifier to psconvert when the fading colour is explicitly set.
  2. Deprecates -N+i for ancient ghostscript versions. We honour it under the hood but drop the documentation and the reasoning behind it.
  3. Fix a few missing psconvertoptions in figure
  4. Use gmt_rgb_syntax not gmt_pen_syntax to complain about bad rgb fill

Closes #7593

ffmpeg3.mp4

Movie allows two fill settings that are passed to psconvert when building the rasters

WIth -G one can fill the bounding box with selected color before other things are painted
With -K (and -E) one can specify what the terminal fade color should be [black].

Unfortunately, psconvert only had -N+g to accept the backgorund fill and the fade color was passed the same way via -N+g, resulting in two different +g<color> modifier passed to psconvert, which then used the last one given.

THis PR adds +kfadefill to -N and updates movie to pass that modifier to psconvert when the fading color is explicitly set.
@PaulWessel PaulWessel added documentation Improve documentation enhancement Improving an existing feature deprecation Deprecating a feature labels Oct 24, 2023
@PaulWessel PaulWessel added this to the 6.5.0 milestone Oct 24, 2023
@PaulWessel PaulWessel self-assigned this Oct 24, 2023
@PaulWessel PaulWessel merged commit 0a1a66d into master Oct 24, 2023
6 checks passed
@PaulWessel PaulWessel deleted the fade-fill-psconvert branch October 24, 2023 12:14
@Esteban82
Copy link
Member

I see now that the default color for the fade is black while the canvas color is white (no fill). Wouldn't be better to have the same default color? I know that it is not important.

@PaulWessel
Copy link
Member Author

If they both were white or black, you would fade from white to white or black to black. Since -G changes background from white it makes most sense to me to default fade from black if -K or -E is used.

@Esteban82
Copy link
Member

If they both were white or black, you would fade from white to white or black to black.

Mmm, yes, you will see the content of the last frame dissapear (to white or black).

But, I am ok with your solution.

@maxrjones maxrjones added the add-changelog Add PR to the changelog label Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add-changelog Add PR to the changelog deprecation Deprecating a feature documentation Improve documentation enhancement Improving an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Movie. Canvas color and -K
4 participants