Releases: reactiveui/splat
Splat 1.2.1
What's New
Bug Fixes
- Fix a bug in logging where we'd fail to call String.Format properly (#43, thanks @SimonCropp)
- Fix alpha channel bugs on bitmaps in WinRT (#45, thanks @dharmaturtle)
- Force images to be loaded in background threads instead of deferring them on WPF
Splat 1.2.0
What's New
- A Windows Forms implementation of BitmapLoader - not set by default (since WPF and WinForms can be in the same project), access it via
Splat.WinForms
(#37, thanks @rzhw!) - A new API for libraries depending on Splat to be able to automatically register themselves when the service locator changes (#42)
Splat 1.1.1
What's New
Bug Fixes
- Initialize the service locator on startup
- Provide a method for 3rd party service locators to be initialized,
InitializeSplat()
Splat 1.1.0
What's New
Service Location
Splat now ships with a built in Service Locator (#32). This allows you to register interfaces in your platform-specific code and use them in a Portable Library. While you can set up your own resolver using any 3rd party IoC container, Splat also has a quite capable built-in one that is configured by default.
// In the startup code for your app
Locator.CurrentMutable.Register(() => new AndroidAlertDialog(), typeof(IAlertDialog));
// Later, in your portable ViewModel
var alertDlg = Locator.Current.GetService<IAlertDialog>();
await alertDlg.ShowAlert("It worked!");
This feature is based on ReactiveUI 5.0's Service Locator, so the documentation in ReactiveUI also applies great here.
Logging
Continuing the "Steal from ReactiveUI" theme, Splat now also ships with a common logging platform (#33). This allows libraries to be able to handle logging in a framework-neutral way, while getting a sensible default logger that will just spew to stdout.
// Add this to your class
class Toaster : IEnableLogger
// Now, in your method code
this.Log().Warn("Oh no!");
this.Log().ErrorException("Something Bad happened", ex);
The ReactiveUI-based docs for this feature can be found here
Rectangle Additions
A new method has been added to Rectangle, called Copy
, which allows you to copy a Rectangle with modifications (#34) - thanks @tberman!
Bug Fixes
Splat 1.0.0
What's New
Splat is now 1.0!
Splat now is post-1.0, which means that SemVer's breaking change rules kick in - now Splat's API will remain stable until 2.0.
Type Unification of System.Drawing on iOS
In previous versions of Splat, you might have gotten weird compilation errors while using Color
- these should be fixed now. As part of this change, the Splat.Portable.dll
library is dead - everything is now in Splat.dll
, but now there is a PLib version of Splat.dll
. Link to the PLib version in your portable code, link to the platform-specific version in your app, and everything will work.
Thread-safe Cocoa image loading
Thanks to @rzhw, image loading / saving in Cocoa (Mac+iOS) is now thread-safe!
Splat 0.3.4
What's New
- Fix WP8 cross-thread bitmap loading for reals this time.
Splat 0.3.3
What's New
Bugfix Release
- Fix WinRT bitmap loading (again), and enable anti-aliasing (#24, thanks @christianlang!)
- Make WP8 image loading thread-safe, fixes a bug in Akavache image loading
- Fix a bug in saving images on WinRT (#26, thanks @TheAngryByrd)
Splat 0.3.2
What's New
Android Resource Names Fix
On iOS, you have to pass the extension to Splat in order to load an image via resource:
var img = BitmapLoader.Current.LoadFromResource("DefaultAvatar.png");
However, on Android, the generated Resource class doesn't include the extensions (rightfully so!), so the same code dies with a "Resource not found", even if you named it the same. With this PR, you can now name resources the same way and we'll guess to try to remove the extension
Other Fixes
Splat 0.3.1
What's New
- Bitmap performance enhancements to Xamarin.Mac. Thanks @jonlipsky!
- Fallback bitmap handling via WIC for WinRT, which sometimes successfully loads images that the standard WinRT bitmap loader can't handle. Thanks @rzhw!
Splat 0.3.0
What's New
Resource Loading (#13)
Now, you can load resource bitmaps via a name
var defaultUser = await BitmapLoader.Current.LoadByResource("defaultUser.png", null, null);
For Android, you can do one of two things, either cast the resource to string:
var defaultUser = await BitmapLoader.Current.LoadByResource(R.Drawable.DefaultUser.ToString(), null, null);
or, you can use the name of a Drawable:
var defaultUser = await BitmapLoader.Current.LoadByResource("DefaultUser", null, null);
Geometry Extensions (#14)
Splat now ports over GitHub's Archimedes so that you can do cross-platform geometry manipulation. These are implemented as extension methods on Point
, Rect
, and Size
:
var pt1 = new PointF(0.0f, 0.0f);
var pt2 = new PointF(5.0f, 5.0f);
pt1.DistanceTo(pt2);
>>> 7.07f