/// <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); }
public static NSImage ToNSImage(this SKImage skiaImage) { var cgImage = skiaImage.ToCGImage(); return(new NSImage(cgImage, CGSize.Empty)); }
public static CIImage ToCIImage(this SKImage skiaImage) { return(skiaImage.ToCGImage()); }
public static UIImage ToUIImage(this SKImage skiaImage) { var cgImage = skiaImage.ToCGImage(); return(new UIImage(cgImage)); }