diff --git a/CHANGELOG.md b/CHANGELOG.md index 961b5c9..4128c16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Add `SystemDpi` to store the system `dpi` value. - Update `GetBitmapFrameByWidthAndDpi` to round `dpi` frame value. - Update `Width` to `Math.Round` to improve order by `Width`. +- Update `GetBitmapFrameByWidthAndDpi` to public. ### Example - Add `Cube-Grey-Light.tiff` and `Cube-Grey-Dark.tiff` in `AppTheme`. ### Tests diff --git a/Directory.Build.props b/Directory.Build.props index 37ccfc5..776e1de 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,5 +1,5 @@ - 0.7.1-alpha.3 + 0.7.1-alpha.4 \ No newline at end of file diff --git a/ricaun.Revit.UI/BitmapExtension.cs b/ricaun.Revit.UI/BitmapExtension.cs index d5d88cb..757497c 100644 --- a/ricaun.Revit.UI/BitmapExtension.cs +++ b/ricaun.Revit.UI/BitmapExtension.cs @@ -109,16 +109,20 @@ internal static double GetSystemDpi() catch { } return systemDpi; } - internal readonly static double SystemDpi = GetSystemDpi(); + + /// + /// System Dpi + /// + public readonly static double SystemDpi = GetSystemDpi(); /// /// Get the bitmap frame from the based on the DPI and width. /// /// The bitmap decoder. /// The desired width of the bitmap frame. When set to zero, the smallest width frame is returned. - /// The optimal dpi for the frame. + /// The optimal dpi for the frame. When set to zero, is used. /// The bitmap frame with the specified width or the smallest width frame. - internal static BitmapFrame GetBitmapFrameByWidthAndDpi(this BitmapDecoder bitmapDecoder, int width = 0, int dpi = 0) + public static BitmapFrame GetBitmapFrameByWidthAndDpi(this BitmapDecoder bitmapDecoder, int width, int dpi = 0) { double systemDpi = dpi > 0 ? dpi : SystemDpi;