Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Side by Side Diff: ppapi/cpp/dev/font_dev.h

Issue 7044012: Support getting the font list in Pepper. This currently only works out of (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/c/dev/ppb_font_dev.h ('k') | ppapi/cpp/dev/font_dev.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // Creates an is_null() Font object. 104 // Creates an is_null() Font object.
105 Font_Dev(); 105 Font_Dev();
106 106
107 explicit Font_Dev(PP_Resource resource); 107 explicit Font_Dev(PP_Resource resource);
108 explicit Font_Dev(Instance* instance, const FontDescription_Dev& description); 108 explicit Font_Dev(Instance* instance, const FontDescription_Dev& description);
109 Font_Dev(const Font_Dev& other); 109 Font_Dev(const Font_Dev& other);
110 110
111 Font_Dev& operator=(const Font_Dev& other); 111 Font_Dev& operator=(const Font_Dev& other);
112 112
113 // PPB_Font methods: 113 // PPB_Font methods:
114 static Var GetFontFamilies(Instance* instance);
114 bool Describe(FontDescription_Dev* description, 115 bool Describe(FontDescription_Dev* description,
115 PP_FontMetrics_Dev* metrics) const; 116 PP_FontMetrics_Dev* metrics) const;
116 bool DrawTextAt(ImageData* dest, 117 bool DrawTextAt(ImageData* dest,
117 const TextRun_Dev& text, 118 const TextRun_Dev& text,
118 const Point& position, 119 const Point& position,
119 uint32_t color, 120 uint32_t color,
120 const Rect& clip, 121 const Rect& clip,
121 bool image_data_is_opaque) const; 122 bool image_data_is_opaque) const;
122 int32_t MeasureText(const TextRun_Dev& text) const; 123 int32_t MeasureText(const TextRun_Dev& text) const;
123 uint32_t CharacterOffsetForPixel(const TextRun_Dev& text, 124 uint32_t CharacterOffsetForPixel(const TextRun_Dev& text,
124 int32_t pixel_position) const; 125 int32_t pixel_position) const;
125 int32_t PixelOffsetForCharacter(const TextRun_Dev& text, 126 int32_t PixelOffsetForCharacter(const TextRun_Dev& text,
126 uint32_t char_offset) const; 127 uint32_t char_offset) const;
127 128
128 // Convenience function that assumes a left-to-right string with no clipping. 129 // Convenience function that assumes a left-to-right string with no clipping.
129 bool DrawSimpleText(ImageData* dest, 130 bool DrawSimpleText(ImageData* dest,
130 const std::string& text, 131 const std::string& text,
131 const Point& position, 132 const Point& position,
132 uint32_t color, 133 uint32_t color,
133 bool image_data_is_opaque = false) const; 134 bool image_data_is_opaque = false) const;
134 135
135 // Convenience function that assumes a left-to-right string. 136 // Convenience function that assumes a left-to-right string.
136 int32_t MeasureSimpleText(const std::string& text) const; 137 int32_t MeasureSimpleText(const std::string& text) const;
137 }; 138 };
138 139
139 } // namespace pp 140 } // namespace pp
140 141
141 #endif // PPAPI_CPP_DEV_FONT_DEV_H_ 142 #endif // PPAPI_CPP_DEV_FONT_DEV_H_
OLDNEW
« no previous file with comments | « ppapi/c/dev/ppb_font_dev.h ('k') | ppapi/cpp/dev/font_dev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698