Browse Source

Replaced assert with DebugGuard

pull/200/head
Vicente Penades 9 years ago
parent
commit
ebc9d2ca25
  1. 2
      src/ImageSharp/PixelFormats/PorterDuffFunctions.cs

2
src/ImageSharp/PixelFormats/PorterDuffFunctions.cs

@ -244,7 +244,7 @@ namespace ImageSharp.PixelFormats
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static TBckPixel Compose(Vector4 backdrop, Vector4 source, Vector4 xform)
{
System.Diagnostics.Debug.Assert(source.W > 0, nameof(source) + " Alpha must be non zero");
DebugGuard.MustBeGreaterThan(source.W, 0, nameof(source.W));
// calculate weights
float xw = backdrop.W * source.W;

Loading…
Cancel
Save