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

api: separate out AWT dependent parts (2.x) #338

Merged
merged 1 commit into from
Dec 14, 2021

Conversation

bradh
Copy link
Collaborator

@bradh bradh commented Nov 28, 2021

Motivation and Context

There is still a small amount of AWT usage in the API module that is blocking Android usage. It is mostly around BufferedImage, and is located in two areas - the EmbeddedImage support for ST 0903, and the ST 1909 metadata overlay.

This refactors the API module to avoid that. Its a breaking change, suited to 2.x.

Resolves #332.

The Android build support (#253) needs significantly more than this, but its a step forward.

Description

The ST 0903 embedded image becomes a byte array. The user can invoke ImageIO if needed.

The ST 1909 rendering support moves to a new module (api-awt).

I'm not tied to the module name or namespace - feel free to suggest or modify as required.

How Has This Been Tested?

Full build.
Tested overlay still works OK in the viewer application.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

The ST 0903 embedded image becomes a byte array.

The ST 1909 rendering support moves to a new module.
@codecov-commenter
Copy link

Codecov Report

Merging #338 (711564d) into 2.x (d1d84c5) will decrease coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x     #338      +/-   ##
============================================
- Coverage     89.91%   89.83%   -0.08%     
+ Complexity     4854     4818      -36     
============================================
  Files           518      516       -2     
  Lines         13237    13078     -159     
  Branches       1248     1245       -3     
============================================
- Hits          11902    11749     -153     
+ Misses         1293     1287       -6     
  Partials         42       42              
Flag Coverage Δ
unittests-api 98.80% <100.00%> (+0.03%) ⬆️
unittests-api-ffmpeg 15.78% <ø> (ø)
unittests-core 98.49% <ø> (ø)
unittests-geoid 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../jmisb/api/klv/st1909/ST1909DateTimeFormatter.java 100.00% <ø> (ø)
.../org/jmisb/api/klv/st0903/vchip/EmbeddedImage.java 100.00% <100.00%> (+26.08%) ⬆️
...java/org/jmisb/api/awt/st1909/OverlayRenderer.java
...b/api/awt/st1909/OverlayRendererConfiguration.java

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 d1d84c5...711564d. Read the comment docs.

@wlfgang wlfgang merged commit 24734e1 into WestRidgeSystems:2.x Dec 14, 2021
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.

3 participants