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_PDF_METAFILE_SKIA_H_ | 5 #ifndef PRINTING_PDF_METAFILE_SKIA_H_ |
6 #define PRINTING_PDF_METAFILE_SKIA_H_ | 6 #define PRINTING_PDF_METAFILE_SKIA_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 20 matching lines...) Expand all Loading... |
31 struct PdfMetafileSkiaData; | 31 struct PdfMetafileSkiaData; |
32 | 32 |
33 // This class uses Skia graphics library to generate a PDF document. | 33 // This class uses Skia graphics library to generate a PDF document. |
34 class PRINTING_EXPORT PdfMetafileSkia : public Metafile { | 34 class PRINTING_EXPORT PdfMetafileSkia : public Metafile { |
35 public: | 35 public: |
36 explicit PdfMetafileSkia(SkiaDocumentType type); | 36 explicit PdfMetafileSkia(SkiaDocumentType type); |
37 ~PdfMetafileSkia() override; | 37 ~PdfMetafileSkia() override; |
38 | 38 |
39 // Metafile methods. | 39 // Metafile methods. |
40 bool Init() override; | 40 bool Init() override; |
41 bool InitFromData(const void* src_buffer, uint32_t src_buffer_size) override; | 41 bool InitFromData(const void* src_buffer, size_t src_buffer_size) override; |
42 | 42 |
43 void StartPage(const gfx::Size& page_size, | 43 void StartPage(const gfx::Size& page_size, |
44 const gfx::Rect& content_area, | 44 const gfx::Rect& content_area, |
45 const float& scale_factor) override; | 45 const float& scale_factor) override; |
46 bool FinishPage() override; | 46 bool FinishPage() override; |
47 bool FinishDocument() override; | 47 bool FinishDocument() override; |
48 | 48 |
49 uint32_t GetDataSize() const override; | 49 uint32_t GetDataSize() const override; |
50 bool GetData(void* dst_buffer, uint32_t dst_buffer_size) const override; | 50 bool GetData(void* dst_buffer, uint32_t dst_buffer_size) const override; |
51 | 51 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 83 |
84 private: | 84 private: |
85 std::unique_ptr<PdfMetafileSkiaData> data_; | 85 std::unique_ptr<PdfMetafileSkiaData> data_; |
86 | 86 |
87 DISALLOW_COPY_AND_ASSIGN(PdfMetafileSkia); | 87 DISALLOW_COPY_AND_ASSIGN(PdfMetafileSkia); |
88 }; | 88 }; |
89 | 89 |
90 } // namespace printing | 90 } // namespace printing |
91 | 91 |
92 #endif // PRINTING_PDF_METAFILE_SKIA_H_ | 92 #endif // PRINTING_PDF_METAFILE_SKIA_H_ |
OLD | NEW |