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

Side by Side Diff: printing/image_mac.cc

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
« no previous file with comments | « no previous file | printing/metafile.h » ('j') | printing/metafile.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "printing/image.h" 5 #include "printing/image.h"
6 6
7 #include <ApplicationServices/ApplicationServices.h> 7 #include <ApplicationServices/ApplicationServices.h>
8 8
9 #include "base/mac/scoped_cftyperef.h" 9 #include "base/mac/scoped_cftyperef.h"
10 #include "printing/metafile.h" 10 #include "printing/metafile.h"
11 #include "ui/gfx/rect.h" 11 #include "ui/gfx/rect.h"
(...skipping 16 matching lines...) Expand all
28 base::mac::ScopedCFTypeRef<CGColorSpaceRef> color_space( 28 base::mac::ScopedCFTypeRef<CGColorSpaceRef> color_space(
29 CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB)); 29 CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB));
30 base::mac::ScopedCFTypeRef<CGContextRef> bitmap_context( 30 base::mac::ScopedCFTypeRef<CGContextRef> bitmap_context(
31 CGBitmapContextCreate(&*data_.begin(), size_.width(), size_.height(), 31 CGBitmapContextCreate(&*data_.begin(), size_.width(), size_.height(),
32 8, row_length_, color_space, 32 8, row_length_, color_space,
33 kCGImageAlphaPremultipliedLast)); 33 kCGImageAlphaPremultipliedLast));
34 DCHECK(bitmap_context.get()); 34 DCHECK(bitmap_context.get());
35 35
36 metafile.RenderPage(page_number, bitmap_context, 36 metafile.RenderPage(page_number, bitmap_context,
37 CGRectMake(0, 0, size_.width(), size_.height()), 37 CGRectMake(0, 0, size_.width(), size_.height()),
38 true, false, false, false); 38 true, false, false, false, false);
39 39
40 return true; 40 return true;
41 } 41 }
42 42
43 } // namespace printing 43 } // namespace printing
OLDNEW
« no previous file with comments | « no previous file | printing/metafile.h » ('j') | printing/metafile.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698