Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@VisualMelon
Copy link
Contributor

@VisualMelon VisualMelon commented Aug 16, 2024

I was going to refit ImageSharp completely, but then I realised that ImageSharp.Drawing is fine with version 1.0.0 still, so this just bumps it so that it's not a beta version.

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

  • Bump SixLabors.ImageSharp.Drawing dependencies to version 1.0.0
  • Add support for LineJoin in OxyPlot.ImageSharp/ImageRenderContext
  • Enable nullable in OxyPlot.ImageSharp

@oxyplot/admins

@VisualMelon VisualMelon mentioned this pull request Aug 16, 2024
4 tasks
@VisualMelon
Copy link
Contributor Author

TODO:

@VisualMelon
Copy link
Contributor Author

TODO bits are done and tests all run; some examples are erroring but not sure if that's new.

@VisualMelon VisualMelon marked this pull request as ready for review August 16, 2024 13:40
@VisualMelon
Copy link
Contributor Author

Need to think about why fontFamily is nullable in IRenderContext.

@VisualMelon
Copy link
Contributor Author

Only errors that seem to be generated now are related to missing fonts

Copy link
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.

Other than the one TODO, looks good to me!

public override OxySize MeasureText(string text, string? fontFamily = null, double fontSize = 10, double fontWeight = 500)
{
return this.MeasureTextLoose(text, fontFamily, fontSize, fontWeight);
// TODO: should fontFamily be nullable?
Copy link
Member

Choose a reason for hiding this comment

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

Were you able to come to a conclusion on this?

Copy link
Contributor Author

@VisualMelon VisualMelon Sep 3, 2024

Choose a reason for hiding this comment

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

The RenderErrorMessage logic leaves it null, which I presume is intentional to allow the render context to pick a simple font if there are rendering errors, or something like that. The example library is also full of null font families, so I don't think we can change it in a hurry. I did spot a bug, though, which I've lazily pushed as a small addition to this PR.

@VisualMelon VisualMelon requested a review from Jonarw September 3, 2024 17:58
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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.