mirror of https://github.com/SixLabors/ImageSharp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
781 B
37 lines
781 B
namespace GenericImage.PackedVectors
|
|
{
|
|
using System.Numerics;
|
|
|
|
public interface IColor4<T> : IColor<T>
|
|
where T : struct
|
|
{
|
|
T X { get; set; }
|
|
|
|
T Y { get; set; }
|
|
|
|
T Z { get; set; }
|
|
|
|
T W { get; set; }
|
|
}
|
|
|
|
public interface IColor<TDepth> : IColor
|
|
where TDepth : struct
|
|
{
|
|
void Add<TColor>(TColor value) where TColor : IColor<TDepth>;
|
|
|
|
void Multiply<TColor>(TColor value) where TColor : IColor<TDepth>;
|
|
|
|
void Multiply<TColor>(float value) where TColor : IColor<TDepth>;
|
|
|
|
void Divide<TColor>(TColor value) where TColor : IColor<TDepth>;
|
|
}
|
|
|
|
public interface IColor
|
|
{
|
|
void PackVector(Vector4 vector);
|
|
|
|
Vector4 ToVector();
|
|
|
|
byte[] ToBytes();
|
|
}
|
|
}
|
|
|