| 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_METAFILE_CAIRO_LINUX_H_ | 5 #ifndef PRINTING_PDF_METAFILE_CAIRO_LINUX_H_ |
| 6 #define PRINTING_PDF_METAFILE_CAIRO_LINUX_H_ | 6 #define PRINTING_PDF_METAFILE_CAIRO_LINUX_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
| 12 #include "printing/metafile.h" | 12 #include "printing/metafile.h" |
| 13 | 13 |
| 14 namespace gfx { | 14 namespace gfx { |
| 15 class Point; | 15 class Point; |
| 16 class Rect; | 16 class Rect; |
| 17 class Size; | 17 class Size; |
| 18 } | 18 } |
| 19 | 19 |
| 20 typedef struct _cairo_surface cairo_surface_t; | 20 typedef struct _cairo_surface cairo_surface_t; |
| 21 | 21 |
| 22 namespace printing { | 22 namespace printing { |
| 23 | 23 |
| 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 PdfMetafileCairo : public Metafile { | 26 class PRINTING_EXPORT PdfMetafileCairo : public Metafile { |
| 27 public: | 27 public: |
| 28 PdfMetafileCairo(); | 28 PdfMetafileCairo(); |
| 29 virtual ~PdfMetafileCairo(); | 29 virtual ~PdfMetafileCairo(); |
| 30 | 30 |
| 31 // Metafile methods. | 31 // Metafile methods. |
| 32 virtual bool Init(); | 32 virtual bool Init(); |
| 33 | 33 |
| 34 // Calling InitFromData() sets the data for this metafile and masks data | 34 // Calling InitFromData() sets the data for this metafile and masks data |
| 35 // induced by previous calls to Init() or InitFromData(), even if drawing | 35 // induced by previous calls to Init() or InitFromData(), even if drawing |
| 36 // continues on the surface returned by a previous call to Init(). | 36 // continues on the surface returned by a previous call to Init(). |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 // Points to the appropriate buffer depending on the way the object was | 79 // Points to the appropriate buffer depending on the way the object was |
| 80 // initialized (Init() vs InitFromData()). | 80 // initialized (Init() vs InitFromData()). |
| 81 std::string* current_data_; | 81 std::string* current_data_; |
| 82 | 82 |
| 83 DISALLOW_COPY_AND_ASSIGN(PdfMetafileCairo); | 83 DISALLOW_COPY_AND_ASSIGN(PdfMetafileCairo); |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 } // namespace printing | 86 } // namespace printing |
| 87 | 87 |
| 88 #endif // PRINTING_PDF_METAFILE_CAIRO_LINUX_H_ | 88 #endif // PRINTING_PDF_METAFILE_CAIRO_LINUX_H_ |
| OLD | NEW |