Add PathAnnotation.TextBackground properties (#1900) by VisualMelon · Pull Request #1913 · oxyplot/oxyplot · GitHub
Skip to content

Add PathAnnotation.TextBackground properties (#1900)#1913

Merged
VisualMelon merged 4 commits intooxyplot:developfrom
VisualMelon:Issue1900
Aug 10, 2023
Merged

Add PathAnnotation.TextBackground properties (#1900)#1913
VisualMelon merged 4 commits intooxyplot:developfrom
VisualMelon:Issue1900

Conversation

@VisualMelon
Copy link
Copy Markdown
Contributor

Fixes #1900 by adding properties to PathAnnotation that match the functionality of TextAnnotation. Decided to not try to put everything in TextualAnnotation because there would be naming issues, as the same names are used in PathAnnotation and TextAnnotation already for different purposes.

Checklist

  • I have included examples or tests
  • I have updated the change log
  • I am listed in the CONTRIBUTORS file
  • I have cleaned up the commit history (use rebase and squash)

Changes proposed in this pull request:

  • Add four new properties to PathAnnotation:
    • TextBackground
    • TextBackgroundStroke
    • TextBackgroundStrokeThickness
    • TextBackgroundPadding

@colejonson66 suggested Border for the stroke properties as an alternative to Background, which may be a better name.

@oxyplot/admins

@VisualMelon
Copy link
Copy Markdown
Contributor Author

@VisualMelon
Copy link
Copy Markdown
Contributor Author

@oxyplot/admins does this API look OK? Not wild about ChangeOpacity now that I look at it again, but can remove that and keep the other changes otherwise.

Any preference between Border/Background for naming per ermakrs from @colejonson66 ?

@Jonarw
Copy link
Copy Markdown
Member

Jonarw commented Jul 11, 2023

Border sounds more adequate at first, however the property TextBackground doesn't make sense when renamed to TextBorder. I guess we'd have to do TextBorderBackground then. TextBorderStroke, TextBorderStrokeThickness and TextBorderPadding would be fine however.

Currently I would tend to leaving it at Background, but could be convinced otherwise.

ChangeOpacity is fine in my opinion, ChangeAlpha could also work.

@VisualMelon
Copy link
Copy Markdown
Contributor Author

Looking at this quickly now, I'm tempted again by TextBorderStroke and TextBorderThickness, leaving everything else as is. If that's agreeable, then I'll make that change and I think we should get this merged.

@Jonarw
Copy link
Copy Markdown
Member

Jonarw commented Jul 22, 2023

Sounds good to me!

@VisualMelon
Copy link
Copy Markdown
Contributor Author

VisualMelon commented Jul 22, 2023

Copy link
Copy Markdown
Member

@Jonarw Jonarw left a comment

Choose a reason for hiding this comment

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

All fine with me, if you're happy I think we can merge this :)

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.

Background property is missing on PathAnnotations and Stoke properties are ignored

2 participants