OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 virtual bool InitToFile(const FilePath& metafile_path); | 39 virtual bool InitToFile(const FilePath& metafile_path); |
40 | 40 |
41 // Initializes the Emf with the data in |metafile_path|. | 41 // Initializes the Emf with the data in |metafile_path|. |
42 virtual bool InitFromFile(const FilePath& metafile_path); | 42 virtual bool InitFromFile(const FilePath& metafile_path); |
43 | 43 |
44 // Metafile methods. | 44 // Metafile methods. |
45 virtual bool Init(); | 45 virtual bool Init(); |
46 virtual bool InitFromData(const void* src_buffer, uint32 src_buffer_size); | 46 virtual bool InitFromData(const void* src_buffer, uint32 src_buffer_size); |
47 | 47 |
48 virtual skia::PlatformDevice* StartPageForVectorCanvas( | 48 virtual skia::PlatformDevice* StartPageForVectorCanvas( |
49 const gfx::Size& page_size, const gfx::Point& content_origin, | 49 const gfx::Size& page_size, const gfx::Rect& content_area, |
50 const float& scale_factor); | 50 const float& scale_factor); |
51 // Inserts a custom GDICOMMENT records indicating StartPage/EndPage calls | 51 // Inserts a custom GDICOMMENT records indicating StartPage/EndPage calls |
52 // (since StartPage and EndPage do not work in a metafile DC). Only valid | 52 // (since StartPage and EndPage do not work in a metafile DC). Only valid |
53 // when hdc_ is non-NULL. |page_size|, |content_origin|, and |scale_factor| | 53 // when hdc_ is non-NULL. |page_size|, |content_origin|, and |scale_factor| |
54 // are ignored. | 54 // are ignored. |
55 virtual bool StartPage(const gfx::Size& page_size, | 55 virtual bool StartPage(const gfx::Size& page_size, |
56 const gfx::Point& content_origin, | 56 const gfx::Rect& content_area, |
57 const float& scale_factor); | 57 const float& scale_factor); |
58 virtual bool FinishPage(); | 58 virtual bool FinishPage(); |
59 virtual bool FinishDocument(); | 59 virtual bool FinishDocument(); |
60 | 60 |
61 virtual uint32 GetDataSize() const; | 61 virtual uint32 GetDataSize() const; |
62 virtual bool GetData(void* buffer, uint32 size) const; | 62 virtual bool GetData(void* buffer, uint32 size) const; |
63 | 63 |
64 // Saves the EMF data to a file as-is. It is recommended to use the .emf file | 64 // Saves the EMF data to a file as-is. It is recommended to use the .emf file |
65 // extension but it is not enforced. This function synchronously writes to the | 65 // extension but it is not enforced. This function synchronously writes to the |
66 // file. For testing only. | 66 // file. For testing only. |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 std::vector<Record> items_; | 174 std::vector<Record> items_; |
175 | 175 |
176 EnumerationContext context_; | 176 EnumerationContext context_; |
177 | 177 |
178 DISALLOW_COPY_AND_ASSIGN(Enumerator); | 178 DISALLOW_COPY_AND_ASSIGN(Enumerator); |
179 }; | 179 }; |
180 | 180 |
181 } // namespace printing | 181 } // namespace printing |
182 | 182 |
183 #endif // PRINTING_EMF_WIN_H_ | 183 #endif // PRINTING_EMF_WIN_H_ |
OLD | NEW |