Background
class Background: PDFElement
A PDF background element
Fill a PDFElement with a NSColor background
-
The
NSColorfor the backgroundDeclaration
Swift
let color: NSColor -
The
PDFElementto add on top of the backgroundDeclaration
Swift
let element: PDFElement -
Init the background element
Declaration
Swift
init(color: NSColor, _ element: PDFElement)Parameters
colorThe
NSColorfor the backgroundelementThe
PDFElementto add on top of the background -
Draw the background element
Declaration
Swift
func draw(rect: inout CGRect, calculationOnly: Bool, pageRect: CGRect)Parameters
rectThe available rectangle
calculationOnlyBool if only the Bounding Rect should be calculated
pageRectThe page size of the PDF document
View on GitHub