mirror of
https://github.com/cyanfish/naps2.git
synced 2024-09-11 15:26:55 +03:00
Make transforms records to fix equality
This commit is contained in:
parent
3bcd97a97a
commit
b51822584f
@ -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);
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
namespace NAPS2.Images.Transforms;
|
||||
|
||||
public class BlackWhiteTransform : Transform
|
||||
public record BlackWhiteTransform : Transform
|
||||
{
|
||||
public BlackWhiteTransform()
|
||||
{
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
namespace NAPS2.Images.Transforms;
|
||||
|
||||
public class BrightnessTransform : Transform
|
||||
public record BrightnessTransform : Transform
|
||||
{
|
||||
public BrightnessTransform()
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
namespace NAPS2.Images.Transforms;
|
||||
|
||||
public class ColorBitDepthTransform : Transform
|
||||
public record ColorBitDepthTransform : Transform
|
||||
{
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
namespace NAPS2.Images.Transforms;
|
||||
|
||||
public class CorrectionTransform : Transform
|
||||
public record CorrectionTransform : Transform
|
||||
{
|
||||
public CorrectionTransform()
|
||||
{
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
namespace NAPS2.Images.Transforms;
|
||||
|
||||
public class CropTransform : Transform
|
||||
public record CropTransform : Transform
|
||||
{
|
||||
public CropTransform()
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
namespace NAPS2.Images.Transforms;
|
||||
|
||||
public class GrayscaleTransform : Transform
|
||||
public record GrayscaleTransform : Transform
|
||||
{
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
|
||||
namespace NAPS2.Images.Transforms;
|
||||
|
||||
public class HueTransform : Transform
|
||||
public record HueTransform : Transform
|
||||
{
|
||||
public HueTransform()
|
||||
{
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
namespace NAPS2.Images.Transforms;
|
||||
|
||||
public class ResizeTransform : Transform
|
||||
public record ResizeTransform : Transform
|
||||
{
|
||||
public ResizeTransform()
|
||||
{
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
namespace NAPS2.Images.Transforms;
|
||||
|
||||
public class RotationTransform : Transform
|
||||
public record RotationTransform : Transform
|
||||
{
|
||||
public const double TOLERANCE = 0.001;
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
namespace NAPS2.Images.Transforms;
|
||||
|
||||
public class SaturationTransform : Transform
|
||||
public record SaturationTransform : Transform
|
||||
{
|
||||
public SaturationTransform()
|
||||
{
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
namespace NAPS2.Images.Transforms;
|
||||
|
||||
public class ScaleTransform : Transform
|
||||
public record ScaleTransform : Transform
|
||||
{
|
||||
public ScaleTransform()
|
||||
{
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
namespace NAPS2.Images.Transforms;
|
||||
|
||||
public class SharpenTransform : Transform
|
||||
public record SharpenTransform : Transform
|
||||
{
|
||||
public SharpenTransform()
|
||||
{
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
namespace NAPS2.Images.Transforms;
|
||||
|
||||
public class ThumbnailTransform : Transform
|
||||
public record ThumbnailTransform : Transform
|
||||
{
|
||||
public const int DEFAULT_SIZE = 256;
|
||||
|
||||
|
@ -4,7 +4,7 @@ using NAPS2.Serialization;
|
||||
|
||||
namespace NAPS2.Images.Transforms;
|
||||
|
||||
public abstract class Transform
|
||||
public abstract record Transform
|
||||
{
|
||||
static Transform()
|
||||
{
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
namespace NAPS2.Images.Transforms;
|
||||
|
||||
public class TrueContrastTransform : Transform
|
||||
public record TrueContrastTransform : Transform
|
||||
{
|
||||
public TrueContrastTransform()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user