diff --git a/Settings.StyleCop b/Settings.StyleCop
index 28a91bcbe..27579cbaa 100644
--- a/Settings.StyleCop
+++ b/Settings.StyleCop
@@ -14,6 +14,8 @@
Laplacian
Sobel
Scharr
+ rgb
+ rgba
rrggbb
rrggbbaa
scanline
diff --git a/src/ImageProcessorCore/Colors/Color.cs b/src/ImageProcessorCore/Colors/Color.cs
index c365f3672..1eb2d8b1c 100644
--- a/src/ImageProcessorCore/Colors/Color.cs
+++ b/src/ImageProcessorCore/Colors/Color.cs
@@ -214,15 +214,27 @@ namespace ImageProcessorCore
/// The hexadecimal representation of the combined color components arranged
/// in rgb, rgba, rrggbb, or rrggbbaa format to match web syntax.
///
+ ///
+ /// The .
+ ///
public static Color FromHex(string hex)
{
return new Color(hex);
}
///
- public void PackFromBytes(byte r, byte g, byte b, byte a)
+ public void PackFromBytes(byte x, byte y, byte z, byte w)
{
- this.packedValue = Pack(r, g, b, a);
+ this.packedValue = Pack(x, y, z, w);
+ }
+
+ ///
+ /// Converts the value of this instance to a hexadecimal string.
+ ///
+ /// A hexadecimal string representation of the value.
+ public string ToHex()
+ {
+ return this.PackedValue.ToString("X8");
}
///
@@ -253,19 +265,10 @@ namespace ImageProcessorCore
bytes[startIndex + 3] = this.A;
break;
default:
- throw new NotSupportedException();
+ throw new NotSupportedException();
}
}
- ///
- /// Converts the value of this instance to a hexadecimal string.
- ///
- /// A hexadecimal string representation of the value.
- public string ToHex()
- {
- return this.PackedValue.ToString("X8");
- }
-
///
public void PackFromVector4(Vector4 vector)
{
@@ -309,7 +312,7 @@ namespace ImageProcessorCore
/// Packs a into a uint.
///
/// The vector containing the values to pack.
- /// The ulong containing the packed values.
+ /// The containing the packed values.
private static uint Pack(ref Vector4 vector)
{
vector = Vector4.Clamp(vector, Vector4.Zero, Vector4.One);
@@ -318,14 +321,14 @@ namespace ImageProcessorCore
return (uint)(((byte)vector.X << 24)
| ((byte)vector.Y << 16)
| ((byte)vector.Z << 8)
- | (byte)vector.W);
+ | (byte)vector.W);
}
///
/// Packs a into a uint.
///
/// The vector containing the values to pack.
- /// The ulong containing the packed values.
+ /// The containing the packed values.
private static uint Pack(ref Vector3 vector)
{
Vector4 value = new Vector4(vector, 1);
diff --git a/src/ImageProcessorCore/Colors/PackedPixel/IPackedBytes.cs b/src/ImageProcessorCore/Colors/PackedPixel/IPackedBytes.cs
index 6d043308a..215ab23a6 100644
--- a/src/ImageProcessorCore/Colors/PackedPixel/IPackedBytes.cs
+++ b/src/ImageProcessorCore/Colors/PackedPixel/IPackedBytes.cs
@@ -6,7 +6,7 @@
namespace ImageProcessorCore
{
///
- /// An interface that converts packed vector types to and from values,
+ /// An interface that converts packed vector types to and from values,
/// allowing multiple encodings to be manipulated in a generic manner.
///
public interface IPackedBytes
@@ -16,7 +16,7 @@ namespace ImageProcessorCore
///
/// The x-component.
/// The y-component.
- /// The z-omponent.
+ /// The z-component.
/// The w-component.
void PackFromBytes(byte x, byte y, byte z, byte w);