| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 PPAPI_CPP_DEV_FONT_DEV_H_ | 5 #ifndef PPAPI_CPP_DEV_FONT_DEV_H_ |
| 6 #define PPAPI_CPP_DEV_FONT_DEV_H_ | 6 #define PPAPI_CPP_DEV_FONT_DEV_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "ppapi/c/dev/ppb_font_dev.h" | 10 #include "ppapi/c/dev/ppb_font_dev.h" |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 97 |
| 98 // Font ------------------------------------------------------------------------ | 98 // Font ------------------------------------------------------------------------ |
| 99 | 99 |
| 100 // Provides access to system fonts. | 100 // Provides access to system fonts. |
| 101 class Font_Dev : public Resource { | 101 class Font_Dev : public Resource { |
| 102 public: | 102 public: |
| 103 // Creates an is_null() Font object. | 103 // Creates an is_null() Font object. |
| 104 Font_Dev(); | 104 Font_Dev(); |
| 105 | 105 |
| 106 explicit Font_Dev(PP_Resource resource); | 106 explicit Font_Dev(PP_Resource resource); |
| 107 explicit Font_Dev(Instance* instance, const FontDescription_Dev& description); | 107 Font_Dev(Instance* instance, const FontDescription_Dev& description); |
| 108 Font_Dev(const Font_Dev& other); | 108 Font_Dev(const Font_Dev& other); |
| 109 | 109 |
| 110 Font_Dev& operator=(const Font_Dev& other); | 110 Font_Dev& operator=(const Font_Dev& other); |
| 111 | 111 |
| 112 // PPB_Font methods: | 112 // PPB_Font methods: |
| 113 static Var GetFontFamilies(Instance* instance); | 113 static Var GetFontFamilies(Instance* instance); |
| 114 bool Describe(FontDescription_Dev* description, | 114 bool Describe(FontDescription_Dev* description, |
| 115 PP_FontMetrics_Dev* metrics) const; | 115 PP_FontMetrics_Dev* metrics) const; |
| 116 bool DrawTextAt(ImageData* dest, | 116 bool DrawTextAt(ImageData* dest, |
| 117 const TextRun_Dev& text, | 117 const TextRun_Dev& text, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 132 uint32_t color, | 132 uint32_t color, |
| 133 bool image_data_is_opaque = false) const; | 133 bool image_data_is_opaque = false) const; |
| 134 | 134 |
| 135 // Convenience function that assumes a left-to-right string. | 135 // Convenience function that assumes a left-to-right string. |
| 136 int32_t MeasureSimpleText(const std::string& text) const; | 136 int32_t MeasureSimpleText(const std::string& text) const; |
| 137 }; | 137 }; |
| 138 | 138 |
| 139 } // namespace pp | 139 } // namespace pp |
| 140 | 140 |
| 141 #endif // PPAPI_CPP_DEV_FONT_DEV_H_ | 141 #endif // PPAPI_CPP_DEV_FONT_DEV_H_ |
| OLD | NEW |