#include "SkDocument.h"
#include "SkPDFDocument.h"
-#include "SkPDFDeviceFlattener.h"
+#include "SkPDFDevice.h"
class SkDocument_PDF : public SkDocument {
public:
SkASSERT(NULL == fCanvas);
SkASSERT(NULL == fDevice);
- SkSize mediaBoxSize;
- mediaBoxSize.set(width, height);
+ SkISize mediaBoxSize;
+ mediaBoxSize.set(SkScalarRoundToInt(width), SkScalarRoundToInt(height));
- fDevice = SkNEW_ARGS(SkPDFDeviceFlattener, (mediaBoxSize, &trimBox));
+ fDevice = SkNEW_ARGS(SkPDFDevice, (mediaBoxSize, mediaBoxSize, SkMatrix::I()));
if (fEncoder) {
fDevice->setDCTEncoder(fEncoder);
}
private:
SkPDFDocument* fDoc;
- SkPDFDeviceFlattener* fDevice;
+ SkPDFDevice* fDevice;
SkCanvas* fCanvas;
SkPicture::EncodeBitmap fEncoder;
SkScalar fRasterDpi;