From f6555f20957bd67e4b3cc8c79ba68321ae63f770 Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Fri, 15 Jun 2018 12:17:39 +1000 Subject: [PATCH] Rgba48 => Rgb48 --- .../PixelFormats/{Rgba48.cs => Rgb48.cs} | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) rename src/ImageSharp/PixelFormats/{Rgba48.cs => Rgb48.cs} (85%) diff --git a/src/ImageSharp/PixelFormats/Rgba48.cs b/src/ImageSharp/PixelFormats/Rgb48.cs similarity index 85% rename from src/ImageSharp/PixelFormats/Rgba48.cs rename to src/ImageSharp/PixelFormats/Rgb48.cs index 4408415b12..7a8899a101 100644 --- a/src/ImageSharp/PixelFormats/Rgba48.cs +++ b/src/ImageSharp/PixelFormats/Rgb48.cs @@ -15,7 +15,7 @@ namespace SixLabors.ImageSharp.PixelFormats /// /// [StructLayout(LayoutKind.Sequential)] - public struct Rgba48 : IPixel + public struct Rgb48 : IPixel { private const float Max = 65535F; @@ -35,12 +35,12 @@ namespace SixLabors.ImageSharp.PixelFormats public ushort B; /// - /// Initializes a new instance of the struct. + /// Initializes a new instance of the struct. /// /// The red component. /// The green component. /// The blue component. - public Rgba48(ushort r, ushort g, ushort b) + public Rgb48(ushort r, ushort g, ushort b) : this() { this.R = r; @@ -49,12 +49,12 @@ namespace SixLabors.ImageSharp.PixelFormats } /// - /// Initializes a new instance of the struct. + /// Initializes a new instance of the struct. /// /// The red component. /// The green component. /// The blue component. - public Rgba48(float r, float g, float b) + public Rgb48(float r, float g, float b) : this() { this.R = (ushort)MathF.Round(r.Clamp(0, 1) * Max); @@ -63,24 +63,24 @@ namespace SixLabors.ImageSharp.PixelFormats } /// - /// Initializes a new instance of the struct. + /// Initializes a new instance of the struct. /// /// The vector containing the components values. - public Rgba48(Vector3 vector) + public Rgb48(Vector3 vector) : this(vector.X, vector.Y, vector.Z) { } /// - /// Compares two objects for equality. + /// Compares two objects for equality. /// - /// The on the left side of the operand. - /// The on the right side of the operand. + /// The on the left side of the operand. + /// The on the right side of the operand. /// /// True if the parameter is equal to the parameter; otherwise, false. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator ==(Rgba48 left, Rgba48 right) + public static bool operator ==(Rgb48 left, Rgb48 right) { return left.R == right.R && left.G == right.G @@ -88,15 +88,15 @@ namespace SixLabors.ImageSharp.PixelFormats } /// - /// Compares two objects for equality. + /// Compares two objects for equality. /// - /// The on the left side of the operand. - /// The on the right side of the operand. + /// The on the left side of the operand. + /// The on the right side of the operand. /// /// True if the parameter is not equal to the parameter; otherwise, false. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator !=(Rgba48 left, Rgba48 right) + public static bool operator !=(Rgb48 left, Rgb48 right) { return left.R != right.R || left.G != right.G @@ -104,7 +104,7 @@ namespace SixLabors.ImageSharp.PixelFormats } /// - public PixelOperations CreatePixelOperations() => new PixelOperations(); + public PixelOperations CreatePixelOperations() => new PixelOperations(); /// [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -222,12 +222,12 @@ namespace SixLabors.ImageSharp.PixelFormats /// public override bool Equals(object obj) { - return obj is Rgba48 rgba48 && this.Equals(rgba48); + return obj is Rgb48 Rgb48 && this.Equals(Rgb48); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] - public bool Equals(Rgba48 other) + public bool Equals(Rgb48 other) { return this.R == other.R && this.G == other.G