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

(DiamondLightSource/dodal#751) Draw crosshairs with better contrast #787

Merged
merged 4 commits into from
Sep 16, 2024

Conversation

rtuck99
Copy link
Contributor

@rtuck99 rtuck99 commented Sep 13, 2024

Fixes #751

Instructions to reviewer on how to test:

  1. Crosshairs in the oav snapshot should now be more visible white-on-black outlined

Copy link

codecov bot commented Sep 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.91%. Comparing base (693cfd1) to head (0f65e7c).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #787   +/-   ##
=======================================
  Coverage   94.91%   94.91%           
=======================================
  Files         115      115           
  Lines        4658     4665    +7     
=======================================
+ Hits         4421     4428    +7     
  Misses        237      237           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@DominicOram DominicOram left a comment

Choose a reason for hiding this comment

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

Great, thank you! I tested it against a light and a dark background and both were very visible. Couple of minor comments

Comment on lines 112 to 119
draw.rectangle(
[beam_x - 1, beam_y - HALF_LEN - 1, beam_x + 1, beam_y + HALF_LEN + 1],
fill=cls.CROSSHAIR_OUTLINE_COLOUR,
)
draw.rectangle(
[beam_x - HALF_LEN - 1, beam_y - 1, beam_x + HALF_LEN + 1, beam_y + 1],
fill=cls.CROSSHAIR_OUTLINE_COLOUR,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should: The 1 in here is the width of the outline right? Might be worth pulling into a constant for readability?

@@ -91,7 +91,8 @@ class SnapshotWithBeamCentre(MJPG):
image and saves the image to disk."""
Copy link
Contributor

Choose a reason for hiding this comment

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

Could: Would be good to mention the outline in the docstring

@rtuck99 rtuck99 merged commit 44abdd2 into main Sep 16, 2024
18 checks passed
@rtuck99 rtuck99 deleted the dodal_751_draw_crosshairs_with_better_contrast branch September 16, 2024 08:39
This pull request was closed.
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.

Draw crosshairs with better contrast
2 participants