OLD | NEW |
1 // Copyright (c) 2012 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_EMF_WIN_H_ | 5 #ifndef PRINTING_EMF_WIN_H_ |
6 #define PRINTING_EMF_WIN_H_ | 6 #define PRINTING_EMF_WIN_H_ |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 bool InitToFile(const base::FilePath& metafile_path); | 51 bool InitToFile(const base::FilePath& metafile_path); |
52 | 52 |
53 // Initializes the Emf with the data in |metafile_path|. | 53 // Initializes the Emf with the data in |metafile_path|. |
54 bool InitFromFile(const base::FilePath& metafile_path); | 54 bool InitFromFile(const base::FilePath& metafile_path); |
55 | 55 |
56 // Metafile methods. | 56 // Metafile methods. |
57 virtual bool Init() override; | 57 virtual bool Init() override; |
58 virtual bool InitFromData(const void* src_buffer, | 58 virtual bool InitFromData(const void* src_buffer, |
59 uint32 src_buffer_size) override; | 59 uint32 src_buffer_size) override; |
60 | 60 |
61 virtual SkBaseDevice* StartPageForVectorCanvas( | |
62 const gfx::Size& page_size, const gfx::Rect& content_area, | |
63 const float& scale_factor) override; | |
64 // Inserts a custom GDICOMMENT records indicating StartPage/EndPage calls | 61 // Inserts a custom GDICOMMENT records indicating StartPage/EndPage calls |
65 // (since StartPage and EndPage do not work in a metafile DC). Only valid | 62 // (since StartPage and EndPage do not work in a metafile DC). Only valid |
66 // when hdc_ is non-NULL. |page_size|, |content_area|, and |scale_factor| are | 63 // when hdc_ is non-NULL. |page_size|, |content_area|, and |scale_factor| are |
67 // ignored. | 64 // ignored. |
68 virtual bool StartPage(const gfx::Size& page_size, | 65 virtual bool StartPage(const gfx::Size& page_size, |
69 const gfx::Rect& content_area, | 66 const gfx::Rect& content_area, |
70 const float& scale_factor) override; | 67 const float& scale_factor) override; |
71 virtual bool FinishPage() override; | 68 virtual bool FinishPage() override; |
72 virtual bool FinishDocument() override; | 69 virtual bool FinishDocument() override; |
73 | 70 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 std::vector<Record> items_; | 185 std::vector<Record> items_; |
189 | 186 |
190 EnumerationContext context_; | 187 EnumerationContext context_; |
191 | 188 |
192 DISALLOW_COPY_AND_ASSIGN(Enumerator); | 189 DISALLOW_COPY_AND_ASSIGN(Enumerator); |
193 }; | 190 }; |
194 | 191 |
195 } // namespace printing | 192 } // namespace printing |
196 | 193 |
197 #endif // PRINTING_EMF_WIN_H_ | 194 #endif // PRINTING_EMF_WIN_H_ |
OLD | NEW |