Quartz 2D Overview
The Quartz 2D is a 2D drawing engine under the core grapgics for iOS and Mac OS x. It has powerful drawing function, provides visual angle effect rendering, anti-aliasing rendering, color Management, drawing PDF and so on.
Developers do not have to consider the display of different device rates, because all of these adaptation operations Quartz are all packed.
Specific quartz can do something, the following figure gives the best answer:
Tool class for pictures to PDF
Using quartz 2D to convert picture data into a PDF without distortion, I've encapsulated:
(The PDF part attribute is not listed, if there is extra need, additional assignment is required)
// WQPDFManager.h
// wqphototopdf////
Created by Wu Qian on 12-10-22.
//
#import <Foundation/Foundation.h>
@interface wqpdfmanager:nsobject
/**
* @brief Create pdf file
*
* @param imgdata nsdata photo Data
* @param destFileName NSString-generated PDF filename
* @param pw nsstring The password to be set *
/+ (void) wqcreatepdffilewithsrc :(NSData *) imgdata
todestfile: (NSString *) destFileName Withpassword
: (NSString *) pw;
/**
* @brief throw a PDF file to store the address
*
* @param filename nsstring
* * @return NSString Address * * (
NSString *) Pdfdestpath: (NSString *) filename;
@end