Skip to content

Releases: reactiveui/splat

Splat 1.2.0

12 Feb 22:43
Compare
Choose a tag to compare

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

17 Dec 21:16
Compare
Choose a tag to compare

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

17 Dec 19:43
Compare
Choose a tag to compare

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

  • Color.ToNative had parameters flipped (#35) - thanks @tberman!

Splat 1.0.0

05 Dec 10:29
Compare
Choose a tag to compare

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

07 Nov 23:56
Compare
Choose a tag to compare

What's New

  • Fix WP8 cross-thread bitmap loading for reals this time.

Splat 0.3.3

17 Oct 20:55
Compare
Choose a tag to compare

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

15 Oct 01:32
Compare
Choose a tag to compare

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

  • Handle loading images from resources in WinRT via fallback if needed (#22, thanks @rzhw!)
  • Make loading images thread-safe on WinRT

Splat 0.3.1

27 Sep 19:16
Compare
Choose a tag to compare

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

30 Jul 21:35
Compare
Choose a tag to compare

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

Other Changes

  • WinRT now uses WritableBitmap for all bitmaps (#16, thanks @rzhw)

Splat 0.2.0

10 Jul 00:14
Compare
Choose a tag to compare

What's New

Cross-platform Geometry

Splat now makes System.Drawing's geometry primitives (Point / Size / Rect) cross-platform by copying code from the Mono project for platforms that cannot directly add a reference to System.Drawing. Just like everything else, these classes now have a ToNative and FromNative methods to convert them to the platform-specific classes.

Thanks to @distantcam for adding this support!

Other Changes / Bug fixes

  • Splat now supports Xamarin.Mac
  • Fixed a bug in Color.ToNative where the this keyword was left off, thereby not making it an extension method.