From bb079906ea110536198140caf2e50bc39548d810 Mon Sep 17 00:00:00 2001 From: Olivia Date: Sat, 17 Dec 2016 20:41:19 +0100 Subject: [PATCH] Fixing more documentation warnings. Fixing generic type style warnings. --- src/ImageSharp/Drawing/DrawImage.cs | 2 +- src/ImageSharp/Formats/Gif/GifEncoderCore.cs | 13 +++++++++---- src/ImageSharp/Formats/Jpg/Components/Bits.cs | 9 ++++++++- src/ImageSharp/Formats/Jpg/Components/Block8x8F.cs | 5 +++-- src/ImageSharp/Formats/Jpg/Components/Bytes.cs | 1 + src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs | 2 +- 6 files changed, 23 insertions(+), 9 deletions(-) diff --git a/src/ImageSharp/Drawing/DrawImage.cs b/src/ImageSharp/Drawing/DrawImage.cs index a192ea7b5..b7e672e0a 100644 --- a/src/ImageSharp/Drawing/DrawImage.cs +++ b/src/ImageSharp/Drawing/DrawImage.cs @@ -1,4 +1,4 @@ -// +// // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // diff --git a/src/ImageSharp/Formats/Gif/GifEncoderCore.cs b/src/ImageSharp/Formats/Gif/GifEncoderCore.cs index 4cbae6e77..b729f30e9 100644 --- a/src/ImageSharp/Formats/Gif/GifEncoderCore.cs +++ b/src/ImageSharp/Formats/Gif/GifEncoderCore.cs @@ -53,7 +53,8 @@ namespace ImageSharp.Formats /// The to encode from. /// The to encode the image data to. public void Encode(Image image, Stream stream) - where TColor : struct, IPackedPixel where TPacked : struct, IEquatable + where TColor : struct, IPackedPixel + where TPacked : struct, IEquatable { Guard.NotNull(image, nameof(image)); Guard.NotNull(stream, nameof(stream)); @@ -121,7 +122,8 @@ namespace ImageSharp.Formats /// The . /// private static int GetTransparentIndex(QuantizedImage quantized) - where TColor : struct, IPackedPixel where TPacked : struct, IEquatable + where TColor : struct, IPackedPixel + where TPacked : struct, IEquatable { // Find the lowest alpha value and make it the transparent index. int index = -1; @@ -236,7 +238,9 @@ namespace ImageSharp.Formats private void WriteGraphicalControlExtension( ImageBase image, EndianBinaryWriter writer, - int transparencyIndex) where TColor : struct, IPackedPixel where TPacked : struct, IEquatable + int transparencyIndex) + where TColor : struct, IPackedPixel + where TPacked : struct, IEquatable { // TODO: Check transparency logic. bool hasTransparent = transparencyIndex > -1; @@ -281,7 +285,8 @@ namespace ImageSharp.Formats /// The to be encoded. /// The stream to write to. private void WriteImageDescriptor(ImageBase image, EndianBinaryWriter writer) - where TColor : struct, IPackedPixel where TPacked : struct, IEquatable + where TColor : struct, IPackedPixel + where TPacked : struct, IEquatable { writer.Write(GifConstants.ImageDescriptorLabel); // 2c // TODO: Can we capture this? diff --git a/src/ImageSharp/Formats/Jpg/Components/Bits.cs b/src/ImageSharp/Formats/Jpg/Components/Bits.cs index b273b2702..c2cad1794 100644 --- a/src/ImageSharp/Formats/Jpg/Components/Bits.cs +++ b/src/ImageSharp/Formats/Jpg/Components/Bits.cs @@ -36,7 +36,8 @@ namespace ImageSharp.Formats /// the caller is the one responsible for first checking that bits.UnreadBits < n. /// /// The number of bits to ensure. - /// + /// Jpeg decoder + /// Error code [MethodImpl(MethodImplOptions.AggressiveInlining)] internal JpegDecoderCore.ErrorCodes EnsureNBits(int n, JpegDecoderCore decoder) { @@ -69,6 +70,12 @@ namespace ImageSharp.Formats } } + /// + /// Receive extend + /// + /// byte + /// Jpeg decoder + /// Read bits value internal int ReceiveExtend(byte t, JpegDecoderCore decoder) { if (this.UnreadBits < t) diff --git a/src/ImageSharp/Formats/Jpg/Components/Block8x8F.cs b/src/ImageSharp/Formats/Jpg/Components/Block8x8F.cs index 9c982e88b..d6ca7f38c 100644 --- a/src/ImageSharp/Formats/Jpg/Components/Block8x8F.cs +++ b/src/ImageSharp/Formats/Jpg/Components/Block8x8F.cs @@ -188,6 +188,7 @@ namespace ImageSharp.Formats /// /// block pointer /// index + /// the scalar value at the specified index [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static unsafe float GetScalarAt(Block8x8F* blockPtr, int idx) { @@ -386,7 +387,7 @@ namespace ImageSharp.Formats /// /// TODO: Should be removed when BlockF goes away /// - /// + /// legacy block internal void LoadFrom(ref BlockF legacyBlock) { this.LoadFrom(legacyBlock.Data); @@ -395,7 +396,7 @@ namespace ImageSharp.Formats /// /// TODO: Should be removed when BlockF goes away /// - /// + /// legacy block internal void CopyTo(ref BlockF legacyBlock) { this.CopyTo(legacyBlock.Data); diff --git a/src/ImageSharp/Formats/Jpg/Components/Bytes.cs b/src/ImageSharp/Formats/Jpg/Components/Bytes.cs index 312e690be..efb9660e3 100644 --- a/src/ImageSharp/Formats/Jpg/Components/Bytes.cs +++ b/src/ImageSharp/Formats/Jpg/Components/Bytes.cs @@ -38,6 +38,7 @@ namespace ImageSharp.Formats /// /// Creates a new instance of the , and initializes it's buffer. /// + /// the bytes created public static Bytes Create() { return new Bytes { Buffer = ArrayPool.Rent(4096) }; diff --git a/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs b/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs index 313360d1c..b9cdad39d 100644 --- a/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs +++ b/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs @@ -1874,7 +1874,7 @@ namespace ImageSharp.Formats /// /// The block of coefficients /// The Huffman tree - /// + /// Unzig ptr /// The zig-zag start index /// The zig-zag end index /// The low transform offset