Browse Source

Fixing more documentation warnings. Fixing generic type style warnings.

af/merge-core
Olivia 9 years ago
parent
commit
bb079906ea
  1. 2
      src/ImageSharp/Drawing/DrawImage.cs
  2. 13
      src/ImageSharp/Formats/Gif/GifEncoderCore.cs
  3. 9
      src/ImageSharp/Formats/Jpg/Components/Bits.cs
  4. 5
      src/ImageSharp/Formats/Jpg/Components/Block8x8F.cs
  5. 1
      src/ImageSharp/Formats/Jpg/Components/Bytes.cs
  6. 2
      src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs

2
src/ImageSharp/Drawing/DrawImage.cs

@ -1,4 +1,4 @@
// <copyright file="ImageExtensions.cs" company="James Jackson-South">
// <copyright file="DrawImage.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>

13
src/ImageSharp/Formats/Gif/GifEncoderCore.cs

@ -53,7 +53,8 @@ namespace ImageSharp.Formats
/// <param name="image">The <see cref="Image{TColor, TPacked}"/> to encode from.</param>
/// <param name="stream">The <see cref="Stream"/> to encode the image data to.</param>
public void Encode<TColor, TPacked>(Image<TColor, TPacked> image, Stream stream)
where TColor : struct, IPackedPixel<TPacked> where TPacked : struct, IEquatable<TPacked>
where TColor : struct, IPackedPixel<TPacked>
where TPacked : struct, IEquatable<TPacked>
{
Guard.NotNull(image, nameof(image));
Guard.NotNull(stream, nameof(stream));
@ -121,7 +122,8 @@ namespace ImageSharp.Formats
/// The <see cref="int"/>.
/// </returns>
private static int GetTransparentIndex<TColor, TPacked>(QuantizedImage<TColor, TPacked> quantized)
where TColor : struct, IPackedPixel<TPacked> where TPacked : struct, IEquatable<TPacked>
where TColor : struct, IPackedPixel<TPacked>
where TPacked : struct, IEquatable<TPacked>
{
// Find the lowest alpha value and make it the transparent index.
int index = -1;
@ -236,7 +238,9 @@ namespace ImageSharp.Formats
private void WriteGraphicalControlExtension<TColor, TPacked>(
ImageBase<TColor, TPacked> image,
EndianBinaryWriter writer,
int transparencyIndex) where TColor : struct, IPackedPixel<TPacked> where TPacked : struct, IEquatable<TPacked>
int transparencyIndex)
where TColor : struct, IPackedPixel<TPacked>
where TPacked : struct, IEquatable<TPacked>
{
// TODO: Check transparency logic.
bool hasTransparent = transparencyIndex > -1;
@ -281,7 +285,8 @@ namespace ImageSharp.Formats
/// <param name="image">The <see cref="ImageBase{TColor, TPacked}"/> to be encoded.</param>
/// <param name="writer">The stream to write to.</param>
private void WriteImageDescriptor<TColor, TPacked>(ImageBase<TColor, TPacked> image, EndianBinaryWriter writer)
where TColor : struct, IPackedPixel<TPacked> where TPacked : struct, IEquatable<TPacked>
where TColor : struct, IPackedPixel<TPacked>
where TPacked : struct, IEquatable<TPacked>
{
writer.Write(GifConstants.ImageDescriptorLabel); // 2c
// TODO: Can we capture this?

9
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 &lt; n.
/// </summary>
/// <param name="n">The number of bits to ensure.</param>
/// <param name="decoder"></param>
/// <param name="decoder">Jpeg decoder</param>
/// <returns>Error code</returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal JpegDecoderCore.ErrorCodes EnsureNBits(int n, JpegDecoderCore decoder)
{
@ -69,6 +70,12 @@ namespace ImageSharp.Formats
}
}
/// <summary>
/// Receive extend
/// </summary>
/// <param name="t">byte</param>
/// <param name="decoder">Jpeg decoder</param>
/// <returns>Read bits value</returns>
internal int ReceiveExtend(byte t, JpegDecoderCore decoder)
{
if (this.UnreadBits < t)

5
src/ImageSharp/Formats/Jpg/Components/Block8x8F.cs

@ -188,6 +188,7 @@ namespace ImageSharp.Formats
/// </summary>
/// <param name="blockPtr">block pointer</param>
/// <param name="idx">index</param>
/// <returns>the scalar value at the specified index</returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static unsafe float GetScalarAt(Block8x8F* blockPtr, int idx)
{
@ -386,7 +387,7 @@ namespace ImageSharp.Formats
/// <summary>
/// TODO: Should be removed when BlockF goes away
/// </summary>
/// <param name="legacyBlock"></param>
/// <param name="legacyBlock">legacy block</param>
internal void LoadFrom(ref BlockF legacyBlock)
{
this.LoadFrom(legacyBlock.Data);
@ -395,7 +396,7 @@ namespace ImageSharp.Formats
/// <summary>
/// TODO: Should be removed when BlockF goes away
/// </summary>
/// <param name="legacyBlock"></param>
/// <param name="legacyBlock">legacy block</param>
internal void CopyTo(ref BlockF legacyBlock)
{
this.CopyTo(legacyBlock.Data);

1
src/ImageSharp/Formats/Jpg/Components/Bytes.cs

@ -38,6 +38,7 @@ namespace ImageSharp.Formats
/// <summary>
/// Creates a new instance of the <see cref="Bytes"/>, and initializes it's buffer.
/// </summary>
/// <returns>the bytes created</returns>
public static Bytes Create()
{
return new Bytes { Buffer = ArrayPool.Rent(4096) };

2
src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs

@ -1874,7 +1874,7 @@ namespace ImageSharp.Formats
/// </summary>
/// <param name="b">The block of coefficients</param>
/// <param name="h">The Huffman tree</param>
/// <param name="unzigPtr"></param>
/// <param name="unzigPtr">Unzig ptr</param>
/// <param name="zigStart">The zig-zag start index</param>
/// <param name="zigEnd">The zig-zag end index</param>
/// <param name="delta">The low transform offset</param>

Loading…
Cancel
Save