Inheritance: SKObject
Beispiel #1
0
 public void DrawPicture(SKPicture picture, SKPaint paint = null)
 {
     if (picture == null)
     {
         throw new ArgumentNullException(nameof(picture));
     }
     SkiaApi.sk_canvas_draw_picture(Handle, picture.Handle, IntPtr.Zero, paint == null ? IntPtr.Zero : paint.Handle);
 }
Beispiel #2
0
 public void DrawPicture(SKPicture picture, ref SKMatrix matrix, SKPaint paint = null)
 {
     if (picture == null)
     {
         throw new ArgumentNullException("picture");
     }
     SkiaApi.sk_canvas_draw_picture(Handle, picture.Handle, ref matrix, paint == null ? IntPtr.Zero : paint.Handle);
 }
Beispiel #3
0
 public static SKImageFilter CreatePicture(SKPicture picture)
 {
     if (picture == null)
     {
         throw new ArgumentNullException("picture");
     }
     return(new SKImageFilter(SkiaApi.sk_imagefilter_new_picture(picture.Handle)));
 }
Beispiel #4
0
 public static SKImageFilter CreatePicture(SKPicture picture, SKRect cropRect)
 {
     if (picture == null)
     {
         throw new ArgumentNullException(nameof(picture));
     }
     return(GetObject <SKImageFilter>(SkiaApi.sk_imagefilter_new_picture_with_croprect(picture.Handle, ref cropRect)));
 }
Beispiel #5
0
 public static SKShader CreatePicture(SKPicture src, SKShaderTileMode tmx, SKShaderTileMode tmy, SKMatrix localMatrix, SKRect tile)
 {
     if (src == null)
     {
         throw new ArgumentNullException(nameof(src));
     }
     return(GetObject <SKShader> (SkiaApi.sk_shader_new_picture(src.Handle, tmx, tmy, &localMatrix, &tile)));
 }
 public static SKImageFilter CreatePictureForLocalspace(SKPicture picture, SKRect cropRect, SKFilterQuality filterQuality)
 {
     if (picture == null)
     {
         throw new ArgumentNullException(nameof(picture));
     }
     return(GetObject <SKImageFilter>(SkiaApi.sk_imagefilter_new_picture_for_localspace(picture.Handle, ref cropRect, filterQuality)));
 }
Beispiel #7
0
        public static SKShader CreatePicture(SKPicture src, SKShaderTileMode tmx, SKShaderTileMode tmy, SKMatrix localMatrix, SKRect tile)
        {
            if (src == null)
            {
                throw new ArgumentNullException(nameof(src));
            }

            return(src.ToShader(tmx, tmy, localMatrix, tile));
        }
Beispiel #8
0
        public static SKShader CreatePicture(SKPicture src, SKShaderTileMode tmx, SKShaderTileMode tmy)
        {
            if (src == null)
            {
                throw new ArgumentNullException(nameof(src));
            }

            return(GetObject(SkiaApi.sk_shader_new_picture(src.Handle, tmx, tmy, null, null)));
        }
Beispiel #9
0
        public static SKShader CreatePicture(SKPicture src, SKShaderTileMode tmx, SKShaderTileMode tmy)
        {
            if (src == null)
            {
                throw new ArgumentNullException(nameof(src));
            }

            return(src.ToShader(tmx, tmy));
        }
Beispiel #10
0
 public void DrawPicture(SKPicture picture, ref SKMatrix matrix, SKPaint paint = null)
 {
     if (picture == null)
     {
         throw new ArgumentNullException(nameof(picture));
         fixed(SKMatrix *m = &matrix)
         {
             SkiaApi.sk_canvas_draw_picture(Handle, picture.Handle, m, paint == null ? IntPtr.Zero : paint.Handle);
         }
 }
Beispiel #11
0
        public static SKImage FromPicture(SKPicture picture, SKSizeI dimensions, SKMatrix matrix, SKPaint paint)
        {
            if (picture == null)
            {
                throw new ArgumentNullException(nameof(picture));
            }

            var p = (paint == null ? IntPtr.Zero : paint.Handle);

            return(GetObject <SKImage> (SkiaApi.sk_image_new_from_picture(picture.Handle, &dimensions, &matrix, p)));
        }
Beispiel #12
0
        private static SKImage FromPicture(SKPicture picture, SKSizeI dimensions, SKMatrix *matrix, SKPaint paint)
        {
            if (picture == null)
            {
                throw new ArgumentNullException(nameof(picture));
            }

            var p = paint?.Handle ?? IntPtr.Zero;

            return(GetObject(SkiaApi.sk_image_new_from_picture(picture.Handle, &dimensions, matrix, p)));
        }
Beispiel #13
0
        // create a new image from a picture

        public static SKImage FromPicture(SKPicture picture, SKSizeI dimensions)
        {
            return(FromPicture(picture, dimensions, null));
        }
Beispiel #14
0
 public void DrawPicture(SKPicture picture, SKPoint p, SKPaint paint = null)
 {
     DrawPicture(picture, p.X, p.Y, paint);
 }
Beispiel #15
0
        public void DrawPicture(SKPicture picture, float x, float y, SKPaint paint = null)
        {
            var matrix = SKMatrix.MakeTranslation(x, y);

            DrawPicture(picture, ref matrix, paint);
        }
Beispiel #16
0
 // do not unref as this is a plain pointer return, not a reference counted pointer
 public SKPicture Snapshot() =>
 SKPicture.GetObject(SkiaApi.sk_drawable_new_picture_snapshot(Handle), unrefExisting: false);
Beispiel #17
0
 public void DrawPicture(SKPicture picture, SKPaint paint = null)
 {
     if (picture == null)
         throw new ArgumentNullException ("picture");
     SkiaApi.sk_canvas_draw_picture (Handle, picture.Handle, IntPtr.Zero, paint == null ? IntPtr.Zero : paint.Handle);
 }
Beispiel #18
0
		// CreatePicture

		public static SKImageFilter CreatePicture(SKPicture picture)
		{
			if (picture == null)
				throw new ArgumentNullException(nameof(picture));
			return GetObject<SKImageFilter>(SkiaApi.sk_imagefilter_new_picture(picture.Handle));
		}
Beispiel #19
0
		public static SKImageFilter CreatePicture(SKPicture picture)
		{
			if (picture == null)
				throw new ArgumentNullException(nameof(picture));
			return GetObject<SKImageFilter>(SkiaApi.sk_imagefilter_new_picture(picture.Handle));
		}
Beispiel #20
0
		public static SKImageFilter CreatePicture(SKPicture picture, SKRect cropRect)
		{
			if (picture == null)
				throw new ArgumentNullException(nameof(picture));
			return GetObject<SKImageFilter>(SkiaApi.sk_imagefilter_new_picture_with_croprect(picture.Handle, ref cropRect));
		}
Beispiel #21
0
 public SKPicture EndRecording()
 {
     return(SKPicture.GetObject(SkiaApi.sk_picture_recorder_end_recording(Handle)));
 }
Beispiel #22
0
		public void DrawPicture (SKPicture picture, ref SKMatrix matrix, SKPaint paint = null)
		{
			if (picture == null)
				throw new ArgumentNullException (nameof (picture));
			SkiaApi.sk_canvas_draw_picture (Handle, picture.Handle, ref matrix, paint == null ? IntPtr.Zero : paint.Handle);
		}
Beispiel #23
0
        // create a new image from a picture

        public static SKImage FromPicture(SKPicture picture, SKSizeI dimensions) =>
        FromPicture(picture, dimensions, null, null);
Beispiel #24
0
 public static SKImage FromPicture(SKPicture picture, SKSizeI dimensions, SKMatrix matrix) =>
 FromPicture(picture, dimensions, &matrix, null);
Beispiel #25
0
 public static SKImage FromPicture(SKPicture picture, SKSizeI dimensions, SKPaint paint) =>
 FromPicture(picture, dimensions, null, paint);
Beispiel #26
0
 public static SKImage FromPicture(SKPicture picture, SKSizeI dimensions, SKMatrix matrix)
 {
     return(FromPicture(picture, dimensions, matrix, null));
 }
Beispiel #27
0
		public static SKImageFilter CreatePictureForLocalspace(SKPicture picture, SKRect cropRect, SKFilterQuality filterQuality)
		{
			if (picture == null)
				throw new ArgumentNullException(nameof(picture));
			return GetObject<SKImageFilter>(SkiaApi.sk_imagefilter_new_picture_for_localspace(picture.Handle, ref cropRect, filterQuality));
		}
Beispiel #28
0
		// CreatePicture

		public static SKShader CreatePicture (SKPicture src) =>
			CreatePicture (src, SKShaderTileMode.Clamp, SKShaderTileMode.Clamp);
Beispiel #29
0
 public static SKImage FromPicture(SKPicture picture, SKSizeI dimensions, SKMatrix matrix, SKPaint paint) =>
 FromPicture(picture, dimensions, &matrix, paint);