Image

class Image: PDFElement

A PDF image element

  • The image to draw

    Declaration

    Swift

    let image: NSImage
  • The optional fixed size of the image

    Declaration

    Swift

    let fixedSize: CGSize?
  • Init the image element

    Declaration

    Swift

    init(_ image: NSImage, size: CGSize? = nil)

    Parameters

    image

    The NSImage to draw

    size

    the optional size of the image

  • Draw the image

    Declaration

    Swift

    func draw(rect: inout CGRect, calculationOnly: Bool, pageRect: CGRect)

    Parameters

    rect

    The available rectangle

    calculationOnly

    Bool if only the size should be calculated

    pageRect

    The page size of the PDF document