File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Source/OxyPlot.SharpDX.Wpf Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -15,3 +15,4 @@ All notable changes to this project will be documented in this file.
15
15
- Image Annotations (#7 )
16
16
- MeasureText fixed in cases where string is null or empty
17
17
- Fixed render extent not being set in ArrangeOverride step on WPF (#12 )
18
+ - Fixed zero dimensions crashing plot (#14 )
Original file line number Diff line number Diff line change @@ -591,8 +591,8 @@ private void InitRendering()
591
591
dpiScale = hwndTarget . TransformToDevice . M11 ;
592
592
}
593
593
594
- int surfWidth = ( int ) ( this . viewport . Width < 0 ? 0 : Math . Ceiling ( this . viewport . Width * dpiScale ) ) ;
595
- int surfHeight = ( int ) ( this . viewport . Height < 0 ? 0 : Math . Ceiling ( this . viewport . Height * dpiScale ) ) ;
594
+ int surfWidth = ( int ) ( this . viewport . Width <= 0 ? 1 : Math . Ceiling ( this . viewport . Width * dpiScale ) ) ;
595
+ int surfHeight = ( int ) ( this . viewport . Height <= 0 ? 1 : Math . Ceiling ( this . viewport . Height * dpiScale ) ) ;
596
596
597
597
var windowHandle = ( new WindowInteropHelper ( Window . GetWindow ( this ) ) ) . Handle ;
598
598
You can’t perform that action at this time.
0 commit comments