summaryrefslogtreecommitdiffstats
path: root/printing/pdf_metafile_mac.h
diff options
context:
space:
mode:
authorkmadhusu@chromium.org <kmadhusu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-21 22:30:10 +0000
committerkmadhusu@chromium.org <kmadhusu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-21 22:30:10 +0000
commit15c2bb32e4b2a436e404695ee7b5ea564cc9c60b (patch)
tree3b5208034639c45ba114eb2d8b7c729ee38eeeef /printing/pdf_metafile_mac.h
parent6e74a3bcc45e25f4a249649953b5120324facf16 (diff)
downloadchromium_src-15c2bb32e4b2a436e404695ee7b5ea564cc9c60b.zip
chromium_src-15c2bb32e4b2a436e404695ee7b5ea564cc9c60b.tar.gz
chromium_src-15c2bb32e4b2a436e404695ee7b5ea564cc9c60b.tar.bz2
Refactor mac printing workflow.
To support print preview, made code changes to create a single metafile for the entire printing document. BUG=64121 TEST=printing works after code changes. Review URL: http://codereview.chromium.org/5892002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69885 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing/pdf_metafile_mac.h')
-rw-r--r--printing/pdf_metafile_mac.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/printing/pdf_metafile_mac.h b/printing/pdf_metafile_mac.h
index 8872d99..38be634 100644
--- a/printing/pdf_metafile_mac.h
+++ b/printing/pdf_metafile_mac.h
@@ -13,6 +13,8 @@
namespace gfx {
class Rect;
+class Size;
+class Point;
}
class FilePath;
@@ -38,9 +40,11 @@ class PdfMetafile {
// Initializes a copy of metafile from PDF data. Returns true on success.
bool Init(const void* src_buffer, uint32 src_buffer_size);
- // Prepares a new pdf page with the given width and height and a scale
- // factor to use for the drawing.
- void StartPage(double width, double height, double scale_factor);
+ // Prepares a new pdf page at specified |content_origin| with the given
+ // |page_size| and a |scale_factor| to use for the drawing.
+ CGContextRef StartPage(const gfx::Size& page_size,
+ const gfx::Point& content_origin,
+ const float& scale_factor);
// Closes the current page.
void FinishPage();