Skip to content

Commit

Permalink
Merge pull request oxyplot#995 from zur003/develop
Browse files Browse the repository at this point in the history
Fix double-to-int conversion bug which was causing axis title to not …
  • Loading branch information
objorke authored Sep 13, 2016
2 parents e648037 + 90b28d5 commit 9d2b005
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ All notable changes to this project will be documented in this file.
- Improve tracker style (Windows Forms) (#106)
- Font rendering in OxyPlot.GtkSharp improved by using Pango (#972)
- Improved LineSeries performance (#834)
- Fixed bug causing axes titles to not display in OxyPlot.GtkSharp (#989)

### Changed
- Fixed closing file stream for PdfReportWriter when PdfReportWriter is closed or disposed of. (#892)
Expand Down
6 changes: 4 additions & 2 deletions Source/OxyPlot.GtkSharp/GraphicsRenderContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,10 @@ public override void DrawText(
size.Height /= (int)Pango.Scale.PangoScale;
if (maxSize != null)
{
size.Width = Math.Min(size.Width, (int)maxSize.Value.Width);
size.Height = Math.Min(size.Height, (int)maxSize.Value.Height);
int maxWidth = (int)Math.Min((Double)Int32.MaxValue, maxSize.Value.Width);
int maxHeight = (int)Math.Min((Double)Int32.MaxValue, maxSize.Value.Height);
size.Width = Math.Min(size.Width, maxWidth);
size.Height = Math.Min(size.Height, maxHeight);
}
this.g.Save();
double dx = 0;
Expand Down

0 comments on commit 9d2b005

Please sign in to comment.