oxyplot / oxyplot-sharpdx

MIT License
16 stars 10 forks source link

Issue8 fix #11

Closed Dunkhan closed 6 years ago

Dunkhan commented 6 years ago

Fixes #8

The issue was that empty and null strings were being measured, returning the font height and 0 width. This was creating additional space wherever a text could be shown but was not.

The behaviour implemented in this PR is copied directly from the original oxyplot CanvasRenderContext https://github.com/oxyplot/oxyplot/blob/fe84b034c1105fd0cd679d8cedd88d9c20fde417/Source/OxyPlot.Wpf/CanvasRenderContext.cs and simply returns OxySize.Empty for null and empty strings

Checklist

@oxyplot/admins

objorke commented 6 years ago

thanks!