Make transforms records to fix equality

This commit is contained in:
Ben Olden-Cooligan 2024-03-09 13:53:47 -08:00
parent 3bcd97a97a
commit b51822584f
16 changed files with 15 additions and 16 deletions

View File

@ -3,7 +3,6 @@ using NAPS2.Util;
namespace NAPS2.Images;
// TODO: Make sure transform equality works
public record TransformState(ImmutableList<Transform> Transforms)
{
public static readonly TransformState Empty = new(ImmutableList<Transform>.Empty);

View File

@ -3,7 +3,7 @@
namespace NAPS2.Images.Transforms;
public class BlackWhiteTransform : Transform
public record BlackWhiteTransform : Transform
{
public BlackWhiteTransform()
{

View File

@ -3,7 +3,7 @@
namespace NAPS2.Images.Transforms;
public class BrightnessTransform : Transform
public record BrightnessTransform : Transform
{
public BrightnessTransform()
{

View File

@ -1,5 +1,5 @@
namespace NAPS2.Images.Transforms;
public class ColorBitDepthTransform : Transform
public record ColorBitDepthTransform : Transform
{
}

View File

@ -1,6 +1,6 @@
namespace NAPS2.Images.Transforms;
public class CorrectionTransform : Transform
public record CorrectionTransform : Transform
{
public CorrectionTransform()
{

View File

@ -4,7 +4,7 @@
namespace NAPS2.Images.Transforms;
public class CropTransform : Transform
public record CropTransform : Transform
{
public CropTransform()
{

View File

@ -1,5 +1,5 @@
namespace NAPS2.Images.Transforms;
public class GrayscaleTransform : Transform
public record GrayscaleTransform : Transform
{
}

View File

@ -3,7 +3,7 @@
namespace NAPS2.Images.Transforms;
public class HueTransform : Transform
public record HueTransform : Transform
{
public HueTransform()
{

View File

@ -3,7 +3,7 @@
namespace NAPS2.Images.Transforms;
public class ResizeTransform : Transform
public record ResizeTransform : Transform
{
public ResizeTransform()
{

View File

@ -4,7 +4,7 @@
namespace NAPS2.Images.Transforms;
public class RotationTransform : Transform
public record RotationTransform : Transform
{
public const double TOLERANCE = 0.001;

View File

@ -3,7 +3,7 @@
namespace NAPS2.Images.Transforms;
public class SaturationTransform : Transform
public record SaturationTransform : Transform
{
public SaturationTransform()
{

View File

@ -3,7 +3,7 @@
namespace NAPS2.Images.Transforms;
public class ScaleTransform : Transform
public record ScaleTransform : Transform
{
public ScaleTransform()
{

View File

@ -3,7 +3,7 @@
namespace NAPS2.Images.Transforms;
public class SharpenTransform : Transform
public record SharpenTransform : Transform
{
public SharpenTransform()
{

View File

@ -3,7 +3,7 @@
namespace NAPS2.Images.Transforms;
public class ThumbnailTransform : Transform
public record ThumbnailTransform : Transform
{
public const int DEFAULT_SIZE = 256;

View File

@ -4,7 +4,7 @@ using NAPS2.Serialization;
namespace NAPS2.Images.Transforms;
public abstract class Transform
public abstract record Transform
{
static Transform()
{

View File

@ -3,7 +3,7 @@
namespace NAPS2.Images.Transforms;
public class TrueContrastTransform : Transform
public record TrueContrastTransform : Transform
{
public TrueContrastTransform()
{