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

Improvements to render style support and selection #44

Merged
merged 6 commits into from
May 26, 2022
Merged

Conversation

AnonymouX47
Copy link
Owner

@AnonymouX47 AnonymouX47 commented May 22, 2022

  • Introduces render style categories.
    • Adds TextImage and GraphicsImage (subclasses of BaseImage) in .image.
    • Moves _pixel_ratio definitions into category baseclasses and turns BaseImage._pixel_ratio into an abstract property.
    • Changes the baseclass of TermImage to TextImage.
    • Changes the baseclass of KittyImage to GraphicsImage.
  • Improves render style selection and support detection.
  • Adds --force-style.
  • Changes -S from --scroll to --style.
  • Documents render style support.

- Add: Added `TextImage` and `GraphicsImage` (subclasses of `BaseImage`) in `.image.common`.
- Add: Now exporting `TextImage` and `GraphicsImage` from `.image`.
- Change: Moved `_pixel_ratio` definitions into category baseclasses and turned `BaseImage._pixel_ratio` into an abstract property.
- Change: Changed the baseclass of `TermImage` to `TextImage`.
- Change: Changed the baseclass of `KittyImage` to `GraphicsImage`.
- Change: Updated docs, docstrings and comments.
@AnonymouX47 AnonymouX47 added documentation Improvements or additions to documentation enhancement New feature / Improvement suggestion or request lib Related to the library (Not to be used anymore) labels May 22, 2022
@AnonymouX47 AnonymouX47 added this to the 0.4.0 milestone May 22, 2022
- Add: Added render style support validation in `GraphicsImage.__init__()`.
- Change: Updated style-dependent tests.
- Change: All graphics-based render styles now raise `TermImageException` at instantiation if not supported in the active terminal.
- Add: Added '--force-style' CL option to force unsupported render styles.
- Fix: Handled selection of unsupported and partially supported render styles.
- Fix: Emmited support detection APCs are now "erased".
- Change: Support checks for automatic selection now occur only when "auto" style is chosen.
  - Eliminates unneccesary render style support checks.
- Change: Changed `-S` from `--scroll` to `--style`.
@AnonymouX47 AnonymouX47 force-pushed the render-styles branch 2 times, most recently from 45d08f7 to f7816bc Compare May 24, 2022 05:06
@AnonymouX47 AnonymouX47 added the cli Related to the image viewer's CLI (Not to be used anymore) label May 26, 2022
@AnonymouX47 AnonymouX47 merged commit c6670d1 into main May 26, 2022
@AnonymouX47 AnonymouX47 deleted the render-styles branch May 27, 2022 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to the image viewer's CLI (Not to be used anymore) documentation Improvements or additions to documentation enhancement New feature / Improvement suggestion or request lib Related to the library (Not to be used anymore)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant