Skip to content

Commit

Permalink
Merge pull request #760 from SixLabors/dl/whitespace
Browse files Browse the repository at this point in the history
Replaced tabs with spaces.
  • Loading branch information
antonfirsov authored Oct 29, 2018
2 parents 937dd81 + a72a551 commit 8d66303
Show file tree
Hide file tree
Showing 19 changed files with 466 additions and 517 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ public partial struct Argb32
/// </summary>
internal class PixelOperations : PixelOperations<Argb32>
{

/// <inheritdoc />
/// <inheritdoc />
internal override void FromArgb32(Configuration configuration, ReadOnlySpan<Argb32> source, Span<Argb32> destPixels)
{
Guard.NotNull(configuration, nameof(configuration));
Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(source, destPixels, nameof(destPixels));

source.CopyTo(destPixels);
Expand All @@ -36,41 +35,40 @@ internal override void FromArgb32(Configuration configuration, ReadOnlySpan<Argb
/// <inheritdoc />
internal override void ToArgb32(Configuration configuration, ReadOnlySpan<Argb32> sourcePixels, Span<Argb32> destPixels)
{
Guard.NotNull(configuration, nameof(configuration));
Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));

sourcePixels.CopyTo(destPixels);
}


/// <inheritdoc />
internal override void FromVector4(Configuration configuration, ReadOnlySpan<Vector4> sourceVectors, Span<Argb32> destPixels)
{
Vector4Converters.RgbaCompatible.FromVector4(configuration, this, sourceVectors, destPixels, false);
}
/// <inheritdoc />
internal override void FromVector4(Configuration configuration, ReadOnlySpan<Vector4> sourceVectors, Span<Argb32> destPixels)
{
Vector4Converters.RgbaCompatible.FromVector4(configuration, this, sourceVectors, destPixels, false);
}

/// <inheritdoc />
internal override void ToVector4(Configuration configuration, ReadOnlySpan<Argb32> sourcePixels, Span<Vector4> destVectors)
{
Vector4Converters.RgbaCompatible.ToVector4(configuration, this, sourcePixels, destVectors, false);
}
/// <inheritdoc />
internal override void ToVector4(Configuration configuration, ReadOnlySpan<Argb32> sourcePixels, Span<Vector4> destVectors)
{
Vector4Converters.RgbaCompatible.ToVector4(configuration, this, sourcePixels, destVectors, false);
}

/// <inheritdoc />
internal override void FromScaledVector4(Configuration configuration, ReadOnlySpan<Vector4> sourceVectors, Span<Argb32> destPixels)
{
Vector4Converters.RgbaCompatible.FromVector4(configuration, this, sourceVectors, destPixels, true);
}
/// <inheritdoc />
internal override void FromScaledVector4(Configuration configuration, ReadOnlySpan<Vector4> sourceVectors, Span<Argb32> destPixels)
{
Vector4Converters.RgbaCompatible.FromVector4(configuration, this, sourceVectors, destPixels, true);
}

/// <inheritdoc />
internal override void ToScaledVector4(Configuration configuration, ReadOnlySpan<Argb32> sourcePixels, Span<Vector4> destVectors)
{
Vector4Converters.RgbaCompatible.ToVector4(configuration, this, sourcePixels, destVectors, true);
}
/// <inheritdoc />
internal override void ToScaledVector4(Configuration configuration, ReadOnlySpan<Argb32> sourcePixels, Span<Vector4> destVectors)
{
Vector4Converters.RgbaCompatible.ToVector4(configuration, this, sourcePixels, destVectors, true);
}

/// <inheritdoc />
internal override void ToRgba32(Configuration configuration, ReadOnlySpan<Argb32> sourcePixels, Span<Rgba32> destPixels)
/// <inheritdoc />
internal override void ToRgba32(Configuration configuration, ReadOnlySpan<Argb32> sourcePixels, Span<Rgba32> destPixels)
{
Guard.NotNull(configuration, nameof(configuration));
Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));

ref uint sourceRef = ref Unsafe.As<Argb32,uint>(ref MemoryMarshal.GetReference(sourcePixels));
Expand All @@ -83,12 +81,12 @@ internal override void ToRgba32(Configuration configuration, ReadOnlySpan<Argb32
}
}

/// <inheritdoc />
/// <inheritdoc />
internal override void FromRgba32(Configuration configuration, ReadOnlySpan<Rgba32> sourcePixels, Span<Argb32> destPixels)
{
Guard.NotNull(configuration, nameof(configuration));
Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));

ref uint sourceRef = ref Unsafe.As<Rgba32,uint>(ref MemoryMarshal.GetReference(sourcePixels));
ref uint destRef = ref Unsafe.As<Argb32, uint>(ref MemoryMarshal.GetReference(destPixels));

Expand All @@ -98,10 +96,10 @@ internal override void FromRgba32(Configuration configuration, ReadOnlySpan<Rgba
Unsafe.Add(ref destRef, i) = PixelConverter.FromRgba32.ToArgb32(sp);
}
}
/// <inheritdoc />
internal override void ToBgra32(Configuration configuration, ReadOnlySpan<Argb32> sourcePixels, Span<Bgra32> destPixels)
/// <inheritdoc />
internal override void ToBgra32(Configuration configuration, ReadOnlySpan<Argb32> sourcePixels, Span<Bgra32> destPixels)
{
Guard.NotNull(configuration, nameof(configuration));
Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));

ref uint sourceRef = ref Unsafe.As<Argb32,uint>(ref MemoryMarshal.GetReference(sourcePixels));
Expand All @@ -114,12 +112,12 @@ internal override void ToBgra32(Configuration configuration, ReadOnlySpan<Argb32
}
}

/// <inheritdoc />
/// <inheritdoc />
internal override void FromBgra32(Configuration configuration, ReadOnlySpan<Bgra32> sourcePixels, Span<Argb32> destPixels)
{
Guard.NotNull(configuration, nameof(configuration));
Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));

ref uint sourceRef = ref Unsafe.As<Bgra32,uint>(ref MemoryMarshal.GetReference(sourcePixels));
ref uint destRef = ref Unsafe.As<Argb32, uint>(ref MemoryMarshal.GetReference(destPixels));

Expand All @@ -129,11 +127,11 @@ internal override void FromBgra32(Configuration configuration, ReadOnlySpan<Bgra
Unsafe.Add(ref destRef, i) = PixelConverter.FromBgra32.ToArgb32(sp);
}
}
/// <inheritdoc />

/// <inheritdoc />
internal override void ToBgr24(Configuration configuration, ReadOnlySpan<Argb32> sourcePixels, Span<Bgr24> destPixels)
{
Guard.NotNull(configuration, nameof(configuration));
Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));

ref Argb32 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
Expand All @@ -147,11 +145,11 @@ internal override void ToBgr24(Configuration configuration, ReadOnlySpan<Argb32>
dp.FromArgb32(sp);
}
}
/// <inheritdoc />

/// <inheritdoc />
internal override void ToGray8(Configuration configuration, ReadOnlySpan<Argb32> sourcePixels, Span<Gray8> destPixels)
{
Guard.NotNull(configuration, nameof(configuration));
Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));

ref Argb32 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
Expand All @@ -165,11 +163,11 @@ internal override void ToGray8(Configuration configuration, ReadOnlySpan<Argb32>
dp.FromArgb32(sp);
}
}
/// <inheritdoc />

/// <inheritdoc />
internal override void ToGray16(Configuration configuration, ReadOnlySpan<Argb32> sourcePixels, Span<Gray16> destPixels)
{
Guard.NotNull(configuration, nameof(configuration));
Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));

ref Argb32 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
Expand All @@ -183,11 +181,11 @@ internal override void ToGray16(Configuration configuration, ReadOnlySpan<Argb32
dp.FromArgb32(sp);
}
}
/// <inheritdoc />

/// <inheritdoc />
internal override void ToRgb24(Configuration configuration, ReadOnlySpan<Argb32> sourcePixels, Span<Rgb24> destPixels)
{
Guard.NotNull(configuration, nameof(configuration));
Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));

ref Argb32 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
Expand All @@ -201,11 +199,11 @@ internal override void ToRgb24(Configuration configuration, ReadOnlySpan<Argb32>
dp.FromArgb32(sp);
}
}
/// <inheritdoc />

/// <inheritdoc />
internal override void ToRgb48(Configuration configuration, ReadOnlySpan<Argb32> sourcePixels, Span<Rgb48> destPixels)
{
Guard.NotNull(configuration, nameof(configuration));
Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));

ref Argb32 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
Expand All @@ -219,11 +217,11 @@ internal override void ToRgb48(Configuration configuration, ReadOnlySpan<Argb32>
dp.FromArgb32(sp);
}
}
/// <inheritdoc />

/// <inheritdoc />
internal override void ToRgba64(Configuration configuration, ReadOnlySpan<Argb32> sourcePixels, Span<Rgba64> destPixels)
{
Guard.NotNull(configuration, nameof(configuration));
Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));

ref Argb32 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
Expand All @@ -237,7 +235,6 @@ internal override void ToRgba64(Configuration configuration, ReadOnlySpan<Argb32
dp.FromArgb32(sp);
}
}

}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ namespace SixLabors.ImageSharp.PixelFormats
/// </summary>
internal class PixelOperations : PixelOperations<Argb32>
{
<#
GenerateAllDefaultConversionMethods("Argb32");
#>

}
}
<# GenerateAllDefaultConversionMethods("Argb32"); #>
}
}
}
Loading

0 comments on commit 8d66303

Please sign in to comment.