| 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_PDF_PS_METAFILE_CAIRO_H_ | 5 #ifndef PRINTING_PDF_PS_METAFILE_CAIRO_H_ |
| 6 #define PRINTING_PDF_PS_METAFILE_CAIRO_H_ | 6 #define PRINTING_PDF_PS_METAFILE_CAIRO_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 // This class uses Cairo graphics library to generate PDF stream and stores | 24 // This class uses Cairo graphics library to generate PDF stream and stores |
| 25 // rendering results in a string buffer. | 25 // rendering results in a string buffer. |
| 26 class PdfPsMetafile : public NativeMetafile { | 26 class PdfPsMetafile : public NativeMetafile { |
| 27 public: | 27 public: |
| 28 virtual ~PdfPsMetafile(); | 28 virtual ~PdfPsMetafile(); |
| 29 | 29 |
| 30 // NativeMetafile methods. | 30 // NativeMetafile methods. |
| 31 virtual bool Init(); | 31 virtual bool Init(); |
| 32 virtual bool InitFromData(const void* src_buffer, uint32 src_buffer_size); | 32 virtual bool InitFromData(const void* src_buffer, uint32 src_buffer_size); |
| 33 | 33 |
| 34 virtual skia::PlatformDevice* StartPageForVectorCanvas( | |
| 35 const gfx::Size& page_size, const gfx::Point& content_origin, | |
| 36 const float& scale_factor); | |
| 37 virtual bool StartPage(const gfx::Size& page_size, | 34 virtual bool StartPage(const gfx::Size& page_size, |
| 38 const gfx::Point& content_origin, | 35 const gfx::Point& content_origin, |
| 39 const float& scale_factor); | 36 const float& scale_factor); |
| 40 virtual bool FinishPage(); | 37 virtual bool FinishPage(); |
| 41 virtual bool FinishDocument(); | 38 virtual bool FinishDocument(); |
| 42 | 39 |
| 43 virtual uint32 GetDataSize() const; | 40 virtual uint32 GetDataSize() const; |
| 44 virtual bool GetData(void* dst_buffer, uint32 dst_buffer_size) const; | 41 virtual bool GetData(void* dst_buffer, uint32 dst_buffer_size) const; |
| 45 | 42 |
| 46 virtual bool SaveTo(const FilePath& file_path) const; | 43 virtual bool SaveTo(const FilePath& file_path) const; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 std::string data_; | 75 std::string data_; |
| 79 // Buffer stores raw PDF contents set by SetRawPageData. | 76 // Buffer stores raw PDF contents set by SetRawPageData. |
| 80 std::string raw_override_data_; | 77 std::string raw_override_data_; |
| 81 | 78 |
| 82 DISALLOW_COPY_AND_ASSIGN(PdfPsMetafile); | 79 DISALLOW_COPY_AND_ASSIGN(PdfPsMetafile); |
| 83 }; | 80 }; |
| 84 | 81 |
| 85 } // namespace printing | 82 } // namespace printing |
| 86 | 83 |
| 87 #endif // PRINTING_PDF_PS_METAFILE_CAIRO_H_ | 84 #endif // PRINTING_PDF_PS_METAFILE_CAIRO_H_ |
| OLD | NEW |