Add a way to save to PDF in SampleApp on Android and elsewhere.
In Android, add the PDF file to downloads, so it can be opened.
Reviewed at http://codereview.appspot.com/4638052/
git-svn-id: http://skia.googlecode.com/svn/trunk@1659 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/samplecode/SampleApp.h b/samplecode/SampleApp.h
index 25e3964..a58c688 100644
--- a/samplecode/SampleApp.h
+++ b/samplecode/SampleApp.h
@@ -60,6 +60,7 @@
bool previousSample();
bool handleTouch(int ownerId, float x, float y,
SkView::Click::State state);
+ void saveToPdf();
protected:
virtual void onDraw(SkCanvas* canvas);
@@ -98,6 +99,9 @@
};
CanvasType fCanvasType;
+ bool fSaveToPdf;
+ SkCanvas* fPdfCanvas;
+
bool fUseClip;
bool fNClip;
bool fRepeatDrawing;