Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: printing/metafile.h

Issue 10560021: Mac printing: Autorotate printed pages so their orientation is the same as the destination page. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PRINTING_METAFILE_H_ 5 #ifndef PRINTING_METAFILE_H_
6 #define PRINTING_METAFILE_H_ 6 #define PRINTING_METAFILE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "printing/printing_export.h" 10 #include "printing/printing_export.h"
11 #include "ui/gfx/native_widget_types.h" 11 #include "ui/gfx/native_widget_types.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 // If this is false, parts of the PDF page that lie outside the bounds will be 123 // If this is false, parts of the PDF page that lie outside the bounds will be
124 // clipped. 124 // clipped.
125 // |stretch_to_fit| specifies whether the output should be stretched to fit 125 // |stretch_to_fit| specifies whether the output should be stretched to fit
126 // the supplied bounds if the page size is smaller than |rect| in all 126 // the supplied bounds if the page size is smaller than |rect| in all
127 // dimensions. 127 // dimensions.
128 // |center_horizontally| specifies whether the final image (after any scaling 128 // |center_horizontally| specifies whether the final image (after any scaling
129 // is done) should be centered horizontally within the given |rect|. 129 // is done) should be centered horizontally within the given |rect|.
130 // |center_vertically| specifies whether the final image (after any scaling 130 // |center_vertically| specifies whether the final image (after any scaling
131 // is done) should be centered vertically within the given |rect|. 131 // is done) should be centered vertically within the given |rect|.
132 // Note that all scaling preserves the original aspect ratio of the page. 132 // Note that all scaling preserves the original aspect ratio of the page.
133 // |autorotate| specifies whether the final image should be autorotated to
134 // fit on |rect|.
133 virtual bool RenderPage(unsigned int page_number, 135 virtual bool RenderPage(unsigned int page_number,
134 gfx::NativeDrawingContext context, 136 gfx::NativeDrawingContext context,
135 const CGRect rect, 137 const CGRect rect,
136 bool shrink_to_fit, 138 bool shrink_to_fit,
137 bool stretch_to_fit, 139 bool stretch_to_fit,
138 bool center_horizontally, 140 bool center_horizontally,
139 bool center_vertically) const = 0; 141 bool center_vertically,
142 bool autorotate) const = 0;
kmadhusu 2012/06/16 00:44:11 Looks like we are adding more fit to page params t
Lei Zhang 2012/06/16 01:47:20 Done.
140 #elif defined(OS_CHROMEOS) 143 #elif defined(OS_CHROMEOS)
141 // Saves the underlying data to the file associated with fd. This function 144 // Saves the underlying data to the file associated with fd. This function
142 // should ONLY be called after the metafile is closed. 145 // should ONLY be called after the metafile is closed.
143 // Returns true if writing succeeded. 146 // Returns true if writing succeeded.
144 virtual bool SaveToFD(const base::FileDescriptor& fd) const = 0; 147 virtual bool SaveToFD(const base::FileDescriptor& fd) const = 0;
145 #endif // if defined(OS_CHROMEOS) 148 #endif // if defined(OS_CHROMEOS)
146 }; 149 };
147 150
148 } // namespace printing 151 } // namespace printing
149 152
150 #endif // PRINTING_METAFILE_H_ 153 #endif // PRINTING_METAFILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698