Exemple #1
0
        /// <summary>
        /// Generates the pdf contents.
        /// </summary>
        /// <returns>The pdf in NSMutable data format.</returns>
        public NSMutableData GeneratePDF()
        {
            // data buffer to hold the PDF
            var data = new NSMutableData();

            // create a PDF with empty rectangle, which will configure it for 8.5x11 inches
            UIGraphics.BeginPDFContext(data, CGRect.Empty, null);

            // configure the image size according to page size of PDF file
            DrawImageWithBoundingBox(_resultImage.ToCGImage());

            // draw table table grids for categories in observation
            DrawCategorySummary();

            // draw table table grids for all observations
            DrawObservationTable();

            // complete a PDF page
            UIGraphics.EndPDFContent();

            return(data);
        }
Exemple #2
0
        public static NSImage ToNSImage(this SKImage skiaImage)
        {
            var cgImage = skiaImage.ToCGImage();

            return(new NSImage(cgImage, CGSize.Empty));
        }
Exemple #3
0
 public static CIImage ToCIImage(this SKImage skiaImage)
 {
     return(skiaImage.ToCGImage());
 }
Exemple #4
0
        public static UIImage ToUIImage(this SKImage skiaImage)
        {
            var cgImage = skiaImage.ToCGImage();

            return(new UIImage(cgImage));
        }