Browse Source

Update copyright and namespace on TT

pull/299/head
JimBobSquarePants 9 years ago
parent
commit
76c07e616b
  1. 8
      src/ImageSharp/Formats/Jpeg/Common/Block8x8F.Generated.cs
  2. 19
      src/ImageSharp/Formats/Jpeg/Common/Block8x8F.Generated.tt
  3. 98
      src/ImageSharp/PixelFormats/Generated/PixelOperations{TPixel}.Generated.cs
  4. 12
      src/ImageSharp/PixelFormats/Generated/PixelOperations{TPixel}.Generated.tt
  5. 14
      src/ImageSharp/PixelFormats/Generated/Rgba32.PixelOperations.Generated.cs
  6. 18
      src/ImageSharp/PixelFormats/Generated/Rgba32.PixelOperations.Generated.tt
  7. 6
      src/ImageSharp/PixelFormats/PixelBlenders/DefaultPixelBlenders.Generated.cs
  8. 10
      src/ImageSharp/PixelFormats/PixelBlenders/DefaultPixelBlenders.Generated.tt
  9. 6
      src/ImageSharp/PixelFormats/PixelBlenders/PorterDuffFunctions.Generated.cs
  10. 11
      src/ImageSharp/PixelFormats/PixelBlenders/PorterDuffFunctions.Generated.tt

8
src/ImageSharp/Formats/Jpeg/Common/Block8x8F.Generated.cs

@ -1,14 +1,12 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// ReSharper disable InconsistentNaming
using System.Numerics;
using System.Runtime.CompilerServices;
// <auto-generated />
#pragma warning disable
namespace SixLabors.ImageSharp.Formats.Jpeg.Common
{
using System.Numerics;
using System.Runtime.CompilerServices;
internal partial struct Block8x8F
{
private static readonly Vector4 CMin4 = new Vector4(0F);

19
src/ImageSharp/Formats/Jpeg/Common/Block8x8F.Generated.tt

@ -1,24 +1,25 @@
// <copyright file="Block8x8F.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
<#
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
// ReSharper disable InconsistentNaming
#>
<#@ template debug="false" hostspecific="false" language="C#" #>
<#@ assembly name="System.Core" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Text" #>
<#@ import namespace="System.Collections.Generic" #>
<#@ output extension=".cs" #>
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
using System.Numerics;
using System.Runtime.CompilerServices;
// <auto-generated />
#pragma warning disable
<#
char[] coordz = {'X', 'Y', 'Z', 'W'};
#>
namespace ImageSharp.Formats.Jpeg.Common
namespace SixLabors.ImageSharp.Formats.Jpeg.Common
{
using System.Numerics;
using System.Runtime.CompilerServices;
internal partial struct Block8x8F
{
private static readonly Vector4 CMin4 = new Vector4(0F);

98
src/ImageSharp/PixelFormats/Generated/PixelOperations{TPixel}.Generated.cs

@ -1,16 +1,16 @@
// <auto-generated />
// Copyright (c) Six Labors and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// <auto-generated />
namespace SixLabors.ImageSharp.PixelFormats
{
using System;
using System.Runtime.CompilerServices;
public partial class PixelOperations<TPixel>
{
/// <summary>
/// <summary>
/// Converts 'count' elements in 'source` span of <see cref="Rgba32"/> data to a span of <typeparamref name="TPixel"/>-s.
/// </summary>
/// <param name="source">The source <see cref="Span{T}"/> of <see cref="Rgba32"/> data.</param>
@ -18,8 +18,8 @@ namespace SixLabors.ImageSharp.PixelFormats
/// <param name="count">The number of pixels to convert.</param>
internal virtual void PackFromRgba32(Span<Rgba32> source, Span<TPixel> destPixels, int count)
{
GuardSpans(source, nameof(source), destPixels, nameof(destPixels), count);
GuardSpans(source, nameof(source), destPixels, nameof(destPixels), count);
ref Rgba32 sourceRef = ref source.DangerousGetPinnableReference();
ref TPixel destRef = ref destPixels.DangerousGetPinnableReference();
@ -29,11 +29,11 @@ namespace SixLabors.ImageSharp.PixelFormats
{
ref TPixel dp = ref Unsafe.Add(ref destRef, i);
rgba = Unsafe.Add(ref sourceRef, i);
dp.PackFromRgba32(rgba);
dp.PackFromRgba32(rgba);
}
}
/// <summary>
/// <summary>
/// A helper for <see cref="PackFromRgba32(Span{Rgba32}, Span{TPixel}, int)"/> that expects a byte span.
/// The layout of the data in 'sourceBytes' must be compatible with <see cref="Rgba32"/> layout.
/// </summary>
@ -45,8 +45,8 @@ namespace SixLabors.ImageSharp.PixelFormats
{
this.PackFromRgba32(sourceBytes.NonPortableCast<byte, Rgba32>(), destPixels, count);
}
/// <summary>
/// <summary>
/// Converts 'count' pixels in 'sourcePixels` span to a span of <see cref="Rgba32"/>-s.
/// Bulk version of <see cref="IPixel.ToRgba32(ref Rgba32)"/>.
/// </summary>
@ -68,20 +68,20 @@ namespace SixLabors.ImageSharp.PixelFormats
}
}
/// <summary>
/// <summary>
/// A helper for <see cref="ToRgba32(Span{TPixel}, Span{Rgba32}, int)"/> that expects a byte span as destination.
/// The layout of the data in 'destBytes' must be compatible with <see cref="Rgba32"/> layout.
/// </summary>
/// <param name="sourceColors">The <see cref="Span{T}"/> to the source colors.</param>
/// <param name="destBytes">The <see cref="Span{T}"/> to the destination bytes.</param>
/// <param name="count">The number of pixels to convert.</param>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal void ToRgba32Bytes(Span<TPixel> sourceColors, Span<byte> destBytes, int count)
{
this.ToRgba32(sourceColors, destBytes.NonPortableCast<byte, Rgba32>(), count);
}
/// <summary>
/// <summary>
/// Converts 'count' elements in 'source` span of <see cref="Bgra32"/> data to a span of <typeparamref name="TPixel"/>-s.
/// </summary>
/// <param name="source">The source <see cref="Span{T}"/> of <see cref="Bgra32"/> data.</param>
@ -89,8 +89,8 @@ namespace SixLabors.ImageSharp.PixelFormats
/// <param name="count">The number of pixels to convert.</param>
internal virtual void PackFromBgra32(Span<Bgra32> source, Span<TPixel> destPixels, int count)
{
GuardSpans(source, nameof(source), destPixels, nameof(destPixels), count);
GuardSpans(source, nameof(source), destPixels, nameof(destPixels), count);
ref Bgra32 sourceRef = ref source.DangerousGetPinnableReference();
ref TPixel destRef = ref destPixels.DangerousGetPinnableReference();
@ -100,11 +100,11 @@ namespace SixLabors.ImageSharp.PixelFormats
{
ref TPixel dp = ref Unsafe.Add(ref destRef, i);
rgba = Unsafe.Add(ref sourceRef, i).ToRgba32();
dp.PackFromRgba32(rgba);
dp.PackFromRgba32(rgba);
}
}
/// <summary>
/// <summary>
/// A helper for <see cref="PackFromBgra32(Span{Bgra32}, Span{TPixel}, int)"/> that expects a byte span.
/// The layout of the data in 'sourceBytes' must be compatible with <see cref="Bgra32"/> layout.
/// </summary>
@ -116,8 +116,8 @@ namespace SixLabors.ImageSharp.PixelFormats
{
this.PackFromBgra32(sourceBytes.NonPortableCast<byte, Bgra32>(), destPixels, count);
}
/// <summary>
/// <summary>
/// Converts 'count' pixels in 'sourcePixels` span to a span of <see cref="Bgra32"/>-s.
/// Bulk version of <see cref="IPixel.ToBgra32(ref Bgra32)"/>.
/// </summary>
@ -139,20 +139,20 @@ namespace SixLabors.ImageSharp.PixelFormats
}
}
/// <summary>
/// <summary>
/// A helper for <see cref="ToBgra32(Span{TPixel}, Span{Bgra32}, int)"/> that expects a byte span as destination.
/// The layout of the data in 'destBytes' must be compatible with <see cref="Bgra32"/> layout.
/// </summary>
/// <param name="sourceColors">The <see cref="Span{T}"/> to the source colors.</param>
/// <param name="destBytes">The <see cref="Span{T}"/> to the destination bytes.</param>
/// <param name="count">The number of pixels to convert.</param>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal void ToBgra32Bytes(Span<TPixel> sourceColors, Span<byte> destBytes, int count)
{
this.ToBgra32(sourceColors, destBytes.NonPortableCast<byte, Bgra32>(), count);
}
/// <summary>
/// <summary>
/// Converts 'count' elements in 'source` span of <see cref="Rgb24"/> data to a span of <typeparamref name="TPixel"/>-s.
/// </summary>
/// <param name="source">The source <see cref="Span{T}"/> of <see cref="Rgb24"/> data.</param>
@ -160,8 +160,8 @@ namespace SixLabors.ImageSharp.PixelFormats
/// <param name="count">The number of pixels to convert.</param>
internal virtual void PackFromRgb24(Span<Rgb24> source, Span<TPixel> destPixels, int count)
{
GuardSpans(source, nameof(source), destPixels, nameof(destPixels), count);
GuardSpans(source, nameof(source), destPixels, nameof(destPixels), count);
ref Rgb24 sourceRef = ref source.DangerousGetPinnableReference();
ref TPixel destRef = ref destPixels.DangerousGetPinnableReference();
@ -171,11 +171,11 @@ namespace SixLabors.ImageSharp.PixelFormats
{
ref TPixel dp = ref Unsafe.Add(ref destRef, i);
rgba.Rgb = Unsafe.Add(ref sourceRef, i);
dp.PackFromRgba32(rgba);
dp.PackFromRgba32(rgba);
}
}
/// <summary>
/// <summary>
/// A helper for <see cref="PackFromRgb24(Span{Rgb24}, Span{TPixel}, int)"/> that expects a byte span.
/// The layout of the data in 'sourceBytes' must be compatible with <see cref="Rgb24"/> layout.
/// </summary>
@ -187,8 +187,8 @@ namespace SixLabors.ImageSharp.PixelFormats
{
this.PackFromRgb24(sourceBytes.NonPortableCast<byte, Rgb24>(), destPixels, count);
}
/// <summary>
/// <summary>
/// Converts 'count' pixels in 'sourcePixels` span to a span of <see cref="Rgb24"/>-s.
/// Bulk version of <see cref="IPixel.ToRgb24(ref Rgb24)"/>.
/// </summary>
@ -210,20 +210,20 @@ namespace SixLabors.ImageSharp.PixelFormats
}
}
/// <summary>
/// <summary>
/// A helper for <see cref="ToRgb24(Span{TPixel}, Span{Rgb24}, int)"/> that expects a byte span as destination.
/// The layout of the data in 'destBytes' must be compatible with <see cref="Rgb24"/> layout.
/// </summary>
/// <param name="sourceColors">The <see cref="Span{T}"/> to the source colors.</param>
/// <param name="destBytes">The <see cref="Span{T}"/> to the destination bytes.</param>
/// <param name="count">The number of pixels to convert.</param>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal void ToRgb24Bytes(Span<TPixel> sourceColors, Span<byte> destBytes, int count)
{
this.ToRgb24(sourceColors, destBytes.NonPortableCast<byte, Rgb24>(), count);
}
/// <summary>
/// <summary>
/// Converts 'count' elements in 'source` span of <see cref="Bgr24"/> data to a span of <typeparamref name="TPixel"/>-s.
/// </summary>
/// <param name="source">The source <see cref="Span{T}"/> of <see cref="Bgr24"/> data.</param>
@ -231,8 +231,8 @@ namespace SixLabors.ImageSharp.PixelFormats
/// <param name="count">The number of pixels to convert.</param>
internal virtual void PackFromBgr24(Span<Bgr24> source, Span<TPixel> destPixels, int count)
{
GuardSpans(source, nameof(source), destPixels, nameof(destPixels), count);
GuardSpans(source, nameof(source), destPixels, nameof(destPixels), count);
ref Bgr24 sourceRef = ref source.DangerousGetPinnableReference();
ref TPixel destRef = ref destPixels.DangerousGetPinnableReference();
@ -242,11 +242,11 @@ namespace SixLabors.ImageSharp.PixelFormats
{
ref TPixel dp = ref Unsafe.Add(ref destRef, i);
rgba.Bgr = Unsafe.Add(ref sourceRef, i);
dp.PackFromRgba32(rgba);
dp.PackFromRgba32(rgba);
}
}
/// <summary>
/// <summary>
/// A helper for <see cref="PackFromBgr24(Span{Bgr24}, Span{TPixel}, int)"/> that expects a byte span.
/// The layout of the data in 'sourceBytes' must be compatible with <see cref="Bgr24"/> layout.
/// </summary>
@ -258,8 +258,8 @@ namespace SixLabors.ImageSharp.PixelFormats
{
this.PackFromBgr24(sourceBytes.NonPortableCast<byte, Bgr24>(), destPixels, count);
}
/// <summary>
/// <summary>
/// Converts 'count' pixels in 'sourcePixels` span to a span of <see cref="Bgr24"/>-s.
/// Bulk version of <see cref="IPixel.ToBgr24(ref Bgr24)"/>.
/// </summary>
@ -281,18 +281,18 @@ namespace SixLabors.ImageSharp.PixelFormats
}
}
/// <summary>
/// <summary>
/// A helper for <see cref="ToBgr24(Span{TPixel}, Span{Bgr24}, int)"/> that expects a byte span as destination.
/// The layout of the data in 'destBytes' must be compatible with <see cref="Bgr24"/> layout.
/// </summary>
/// <param name="sourceColors">The <see cref="Span{T}"/> to the source colors.</param>
/// <param name="destBytes">The <see cref="Span{T}"/> to the destination bytes.</param>
/// <param name="count">The number of pixels to convert.</param>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal void ToBgr24Bytes(Span<TPixel> sourceColors, Span<byte> destBytes, int count)
{
this.ToBgr24(sourceColors, destBytes.NonPortableCast<byte, Bgr24>(), count);
}
}
}
}

12
src/ImageSharp/PixelFormats/Generated/PixelOperations{TPixel}.Generated.tt

@ -1,8 +1,6 @@
<#
// <copyright file="PixelOperations{TPixel}.Generated.tt" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
#>
<#@ template debug="false" hostspecific="false" language="C#" #>
<#@ assembly name="System.Core" #>
@ -95,17 +93,13 @@
}
#>
// <auto-generated />
// <copyright file="PixelOperations{TPixel}.Generated.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
// <auto-generated />
namespace SixLabors.ImageSharp.PixelFormats
{
using System;
using System.Numerics;
using System.Runtime.CompilerServices;
public partial class PixelOperations<TPixel>

14
src/ImageSharp/PixelFormats/Generated/Rgba32.PixelOperations.Generated.cs

@ -1,14 +1,14 @@
// <auto-generated />
// Copyright (c) Six Labors and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// <auto-generated />
namespace SixLabors.ImageSharp
{
using System;
using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.PixelFormats;
/// <content>
/// Provides optimized overrides for bulk operations.
/// </content>
@ -32,7 +32,6 @@ namespace SixLabors.ImageSharp
Unsafe.As<Rgba32, Rgb24>(ref dp) = sp; dp.A = 255;
}
}
/// <inheritdoc />
internal override void ToRgb24(Span<Rgba32> sourcePixels, Span<Rgb24> dest, int count)
@ -49,7 +48,6 @@ namespace SixLabors.ImageSharp
dp = Unsafe.As<Rgba32, Rgb24>(ref sp);
}
}
/// <inheritdoc />
internal override void PackFromBgr24(Span<Bgr24> source, Span<Rgba32> destPixels, int count)
@ -66,7 +64,6 @@ namespace SixLabors.ImageSharp
dp.Bgr = sp; dp.A = 255;
}
}
/// <inheritdoc />
internal override void ToBgr24(Span<Rgba32> sourcePixels, Span<Bgr24> dest, int count)
@ -83,7 +80,6 @@ namespace SixLabors.ImageSharp
dp = sp.Bgr;
}
}
/// <inheritdoc />
internal override void PackFromBgra32(Span<Bgra32> source, Span<Rgba32> destPixels, int count)
@ -100,7 +96,6 @@ namespace SixLabors.ImageSharp
dp = sp.ToRgba32();
}
}
/// <inheritdoc />
internal override void ToBgra32(Span<Rgba32> sourcePixels, Span<Bgra32> dest, int count)
@ -117,7 +112,6 @@ namespace SixLabors.ImageSharp
dp = sp.ToBgra32();
}
}
}
}

18
src/ImageSharp/PixelFormats/Generated/Rgba32.PixelOperations.Generated.tt

@ -1,8 +1,6 @@
<#
// <copyright file="Rgba32.PixelOperations.Generated.tt" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
#>
<#@ template debug="false" hostspecific="false" language="C#" #>
<#@ assembly name="System.Core" #>
@ -11,7 +9,6 @@
<#@ import namespace="System.Collections.Generic" #>
<#@ output extension=".cs" #>
<#
void GeneratePackFromMethod(string pixelType, string converterCode)
{
#>
@ -31,7 +28,6 @@
<#=converterCode#>
}
}
<#
}
@ -54,26 +50,18 @@
<#=converterCode#>
}
}
<#
}
#>
// <auto-generated />
// <copyright file="PixelOperations{TPixel}.Generated.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
// <auto-generated />
namespace SixLabors.ImageSharp
{
using System;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
/// <content>

6
src/ImageSharp/PixelFormats/PixelBlenders/DefaultPixelBlenders.Generated.cs

@ -1,8 +1,7 @@
// <autogenerated />
// Copyright (c) Six Labors and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// <auto-generated />
namespace SixLabors.ImageSharp.PixelFormats.PixelBlenders
{
using System;
@ -24,6 +23,7 @@ namespace SixLabors.ImageSharp.PixelFormats.PixelBlenders
internal static class DefaultPixelBlenders<TPixel>
where TPixel : struct, IPixel<TPixel>
{
internal class Normal : PixelBlender<TPixel>
{

10
src/ImageSharp/PixelFormats/PixelBlenders/DefaultPixelBlenders.Generated.tt

@ -1,8 +1,6 @@
<#
// <copyright file="DefaultPixelBlenders.Generated.tt" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
#>
<#@ template debug="false" hostspecific="false" language="C#" #>
<#@ assembly name="System.Core" #>
@ -10,12 +8,10 @@
<#@ import namespace="System.Text" #>
<#@ import namespace="System.Collections.Generic" #>
<#@ output extension=".cs" #>
// <autogenerated />
// <copyright file="PorterDuffFunctions.Generated.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
// <auto-generated />
namespace SixLabors.ImageSharp.PixelFormats.PixelBlenders
{
using System;

6
src/ImageSharp/PixelFormats/PixelBlenders/PorterDuffFunctions.Generated.cs

@ -1,14 +1,12 @@
// <autogenerated />
// Copyright (c) Six Labors and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// <auto-generated />
namespace SixLabors.ImageSharp.PixelFormats.PixelBlenders
{
using System.Numerics;
using System.Runtime.CompilerServices;
internal static partial class PorterDuffFunctions
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]

11
src/ImageSharp/PixelFormats/PixelBlenders/PorterDuffFunctions.Generated.tt

@ -1,8 +1,6 @@
<#
// <copyright file="PorterDuffFunctions.Generated.tt" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
#>
<#@ template debug="false" hostspecific="false" language="C#" #>
<#@ assembly name="System.Core" #>
@ -10,18 +8,15 @@
<#@ import namespace="System.Text" #>
<#@ import namespace="System.Collections.Generic" #>
<#@ output extension=".cs" #>
// <autogenerated />
// <copyright file="PorterDuffFunctions.Generated.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
// <auto-generated />
namespace SixLabors.ImageSharp.PixelFormats.PixelBlenders
{
using System.Numerics;
using System.Runtime.CompilerServices;
internal static partial class PorterDuffFunctions
{
<#

Loading…
Cancel
Save