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

Skip to content

Conversation

rfuest
Copy link
Member

@rfuest rfuest commented Oct 25, 2020

Hi! Thank you for helping out with Embedded Graphics development! Please:

  • Check that you've added passing tests and documentation
  • Add a simulator example(s) where applicable
  • Add a CHANGELOG.md entry in the Unreleased section under the appropriate heading (Added, Fixed, etc) and appropriate crate (embedded-graphics, simulator, tinytga, tinybmp) if your changes affect the public API
  • Run rustfmt on the project
  • Run just build (Linux/macOS only) and make sure it passes. If you use Windows, check that CI passes once you've opened the PR.

PR description

This PR adds DynamicTga which is the first part of #424. The implementation depends on the color conversion suggested in #446, so I've also included that in this PR.

I've also decided to revert a change I made in #430, where I merged Tga and TgaRaw. Keeping them separate results in a cleaner API and I'm not sure why I decided to change that in the first place.

@rfuest rfuest changed the title Dynamic tga Add DynamicTga and ConvertColor Oct 25, 2020
@rfuest rfuest requested a review from jamwaffles October 25, 2020 21:48
@rfuest rfuest linked an issue Oct 25, 2020 that may be closed by this pull request
@jamwaffles
Copy link
Member

Do we want to revert the same change to tinybmp and go back to Bmp and BmpRaw as well?

@rfuest
Copy link
Member Author

rfuest commented Oct 26, 2020

Yes, I would like to keep the APIs of tinybmp and tinytga as similar as possible. But this doesn't belong in this PR IMO and I plan to include that change in the PR where I add DynamicBmp.

@jamwaffles
Copy link
Member

I thought that might be the case :). I agree it doesn't belong in this PR.

Copy link
Member

@jamwaffles jamwaffles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I left some small comment/naming nits.

Copy link
Member

@jamwaffles jamwaffles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@rfuest rfuest merged commit 7e0ea2c into embedded-graphics:master Oct 30, 2020
@rfuest rfuest deleted the dynamic-tga branch November 9, 2020 20:12
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.

Add DrawTarget adapter to perform automatic colour conversions

2 participants