public static SKMatrix44 FromColumnMajor(float [] src)
        {
            var matrix = new SKMatrix44();

            matrix.SetColumnMajor(src);
            return(matrix);
        }
        public static SKMatrix44 CreateRotationDegrees(float x, float y, float z, float degrees)
        {
            var matrix = new SKMatrix44();

            matrix.SetRotationAboutDegrees(x, y, z, degrees);
            return(matrix);
        }
        public static SKMatrix44 CreateRotation(float x, float y, float z, float radians)
        {
            var matrix = new SKMatrix44();

            matrix.SetRotationAbout(x, y, z, radians);
            return(matrix);
        }
Example #4
0
        public static SKMatrix44 CreateTranslate(float x, float y, float z)
        {
            var matrix = new SKMatrix44();

            matrix.SetTranslate(x, y, z);
            return(matrix);
        }
Example #5
0
        public static SKMatrix44 CreateIdentity()
        {
            var matrix = new SKMatrix44();

            matrix.SetIdentity();
            return(matrix);
        }
Example #6
0
 public static SKColorSpace CreateRgb(SKColorSpaceRenderTargetGamma gamma, SKMatrix44 toXyzD50, SKColorSpaceFlags flags = 0)
 {
     if (toXyzD50 == null)
     {
         throw new ArgumentNullException(nameof(toXyzD50));
     }
     return(GetObject <SKColorSpace> (SkiaApi.sk_colorspace_new_rgb_with_gamma(gamma, toXyzD50.Handle, flags)));
 }
Example #7
0
 public static SKColorSpace CreateRgb(SKColorSpaceTransferFn coeffs, SKMatrix44 toXyzD50, SKColorSpaceFlags flags = 0)
 {
     if (toXyzD50 == null)
     {
         throw new ArgumentNullException(nameof(toXyzD50));
     }
     return(GetObject <SKColorSpace> (SkiaApi.sk_colorspace_new_rgb_with_coeffs(ref coeffs, toXyzD50.Handle, flags)));
 }
Example #8
0
 public bool ToXyzD50(SKMatrix44 toXyzD50)
 {
     if (toXyzD50 == null)
     {
         throw new ArgumentNullException(nameof(toXyzD50));
     }
     return(SkiaApi.sk_colorspaceprimaries_to_xyzd50(ref this, toXyzD50.Handle));
 }
Example #9
0
 public static bool ConvertPrimariesToXyzD50(SKColorSpacePrimaries primaries, SKMatrix44 toXyzD50)
 {
     if (toXyzD50 == null)
     {
         throw new ArgumentNullException(nameof(toXyzD50));
     }
     return(SkiaApi.sk_colorspaceprimaries_to_xyzd50(ref primaries, toXyzD50.Handle));
 }
Example #10
0
        public bool Invert(SKMatrix44 inverse)
        {
            if (inverse == null)
            {
                throw new ArgumentNullException(nameof(inverse));
            }

            return(SkiaApi.sk_matrix44_invert(Handle, inverse.Handle));
        }
Example #11
0
        public void PostConcat(SKMatrix44 m)
        {
            if (m == null)
            {
                throw new ArgumentNullException(nameof(m));
            }

            SkiaApi.sk_matrix44_post_concat(Handle, m.Handle);
        }
Example #12
0
 public bool ToXyzD50(SKMatrix44 toXyzD50)
 {
     if (toXyzD50 == null)
     {
         throw new ArgumentNullException(nameof(toXyzD50));
         fixed(SKColorSpacePrimaries *t = &this)
         {
             return(SkiaApi.sk_colorspaceprimaries_to_xyzd50(t, toXyzD50.Handle));
         }
 }
Example #13
0
        public SKMatrix44 ToXyzD50()
        {
            var xyzD50 = new SKMatrix44();

            if (!ToXyzD50(xyzD50))
            {
                xyzD50.Dispose();
                xyzD50 = null;
            }
            return(xyzD50);
        }
Example #14
0
        public static SKMatrix44 ConvertPrimariesToXyzD50(SKColorSpacePrimaries primaries)
        {
            var xyzD50 = new SKMatrix44();

            if (!ConvertPrimariesToXyzD50(primaries, xyzD50))
            {
                xyzD50.Dispose();
                xyzD50 = null;
            }
            return(xyzD50);
        }
Example #15
0
        public void SetConcat(SKMatrix44 a, SKMatrix44 b)
        {
            if (a == null)
            {
                throw new ArgumentNullException(nameof(a));
            }
            if (b == null)
            {
                throw new ArgumentNullException(nameof(b));
            }

            SkiaApi.sk_matrix44_set_concat(Handle, a.Handle, b.Handle);
        }
Example #16
0
        public static bool Equal(SKMatrix44 left, SKMatrix44 right)
        {
            if (left == null)
            {
                throw new ArgumentNullException(nameof(left));
            }
            if (right == null)
            {
                throw new ArgumentNullException(nameof(right));
            }

            return(SkiaApi.sk_matrix44_equals(left.Handle, right.Handle));
        }
Example #17
0
 public SKMatrix44(SKMatrix44 src)
     : this(IntPtr.Zero, true)
 {
     if (src == null)
     {
         throw new ArgumentNullException(nameof(src));
     }
     Handle = SkiaApi.sk_matrix44_new_copy(src.Handle);
     if (Handle == IntPtr.Zero)
     {
         throw new InvalidOperationException("Unable to create a new SKMatrix44 instance.");
     }
 }
Example #18
0
        public SKMatrix44 Invert()
        {
            var inverse = new SKMatrix44();

            if (Invert(inverse))
            {
                return(inverse);
            }
            else
            {
                inverse.Dispose();
                return(null);
            }
        }
Example #19
0
        public SKMatrix44(SKMatrix44 a, SKMatrix44 b)
            : this(IntPtr.Zero, true)
        {
            if (a == null)
            {
                throw new ArgumentNullException(nameof(a));
            }
            if (b == null)
            {
                throw new ArgumentNullException(nameof(b));
            }

            Handle = SkiaApi.sk_matrix44_new_concat(a.Handle, b.Handle);
            if (Handle == IntPtr.Zero)
            {
                throw new InvalidOperationException("Unable to create a new SKMatrix44 instance.");
            }
        }
Example #20
0
 public static bool ConvertPrimariesToXyzD50(SKColorSpacePrimaries primaries, SKMatrix44 toXyzD50)
 {
     return(primaries.ToXyzD50(toXyzD50));
 }
Example #21
0
 public static SKColorSpace CreateRgb(SKColorSpaceRenderTargetGamma gamma, SKMatrix44 toXyzD50, SKColorSpaceFlags flags) =>
 CreateRgb(gamma, toXyzD50);
Example #22
0
 public static SKColorSpace CreateRgb(SKNamedGamma gamma, SKMatrix44 toXyzD50)
 {
     if (toXyzD50 == null)
         throw new ArgumentNullException(nameof(toXyzD50)); }
Example #23
0
 public static SKColorSpace CreateRgb(SKColorSpaceTransferFn coeffs, SKMatrix44 toXyzD50, SKColorSpaceFlags flags) =>
 CreateRgb(coeffs, toXyzD50);
Example #24
0
 public static SKColorSpace CreateRgb(SKColorSpaceTransferFn coeffs, SKMatrix44 toXyzD50)
 {
     if (toXyzD50 == null)
         throw new ArgumentNullException(nameof(toXyzD50)); }