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

Add the alpha command to set the opacity of a layer #447

Merged
merged 2 commits into from
Apr 2, 2022
Merged

Conversation

abey79
Copy link
Owner

@abey79 abey79 commented Apr 2, 2022

Description

There was no way to adjust a layer's opacity without providing the base colour, which may have been set already. This PR introduce the alpha command, which does exactly that. If no colour is defined for the layer, it is set to black.

Also:

  • added vpype_cli.FloatRangeType
  • fixed typo in vpype_cli.IntRangeType docstring
  • fixed misnamed vpype.Color.as_rgb_hex() member name
  • added test for alpha
  • updated doc and readme
  • Fixed error in test_read_command_page_size() on Windows introduced in Improve handling of SVG with missing width and height. #446

Checklist

  • feature/fix implemented
  • code formatting ok (black and isort)
  • mypy returns no error
  • tests added/updated and pytest succeeds
  • documentation added/updated
    • command docstring and option/argument help
    • README.md updated (Feature Overview)
    • CHANGELOG.md updated
    • added new command to reference.rst
    • RTD doc updated and building with no error (make clean && make html in docs/)

abey79 added 2 commits April 2, 2022 14:38
…ing its base color.

If no color is defined for the layer, it is set to black.

Also:
- added `vpype_cli.FloatRangeType`
- fixed typo in `vpype_cli.IntRangeType` docstring
- fixed misnamed `vpype.Color.as_rgb_hex()` member name
- added test for `alpha`
- updated doc and readme
…#446)

- Fixed missing alpha in __all__
- Updated CHANGELOG.md
@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 2, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented Apr 2, 2022

Codecov Report

Merging #447 (459c7c6) into master (2d50a1d) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #447      +/-   ##
==========================================
+ Coverage   94.32%   94.34%   +0.01%     
==========================================
  Files          60       60              
  Lines        5339     5355      +16     
  Branches      781      783       +2     
==========================================
+ Hits         5036     5052      +16     
  Misses        185      185              
  Partials      118      118              
Impacted Files Coverage Δ
tests/test_commands.py 99.06% <100.00%> (+0.01%) ⬆️
tests/test_files.py 98.53% <100.00%> (ø)
vpype/io.py 84.57% <100.00%> (ø)
vpype/metadata.py 97.56% <100.00%> (ø)
vpype_cli/metadata.py 92.70% <100.00%> (+0.45%) ⬆️
vpype_cli/types.py 90.07% <100.00%> (+0.21%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2d50a1d...459c7c6. Read the comment docs.

@abey79 abey79 merged commit cd95e2d into master Apr 2, 2022
@abey79 abey79 deleted the feature-alpha branch April 2, 2022 12:58
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