| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef sk_tool_utils_DEFINED | 8 #ifndef sk_tool_utils_DEFINED |
| 9 #define sk_tool_utils_DEFINED | 9 #define sk_tool_utils_DEFINED |
| 10 | 10 |
| 11 #include "SkColor.h" | 11 #include "SkColor.h" |
| 12 #include "SkImageEncoder.h" | 12 #include "SkImageEncoder.h" |
| 13 #include "SkImageInfo.h" | 13 #include "SkImageInfo.h" |
| 14 #include "SkPixelSerializer.h" | 14 #include "SkPixelSerializer.h" |
| 15 #include "SkTypeface.h" | 15 #include "SkTypeface.h" |
| 16 | 16 |
| 17 class SkBitmap; | 17 class SkBitmap; |
| 18 class SkCanvas; | 18 class SkCanvas; |
| 19 class SkPaint; | 19 class SkPaint; |
| 20 class SkShader; | 20 class SkShader; |
| 21 class SkTestFont; | 21 class SkTestFont; |
| 22 class SkTextBlobBuilder; | 22 class SkTextBlobBuilder; |
| 23 | 23 |
| 24 namespace sk_tool_utils { | 24 namespace sk_tool_utils { |
| 25 | 25 |
| 26 const char* colortype_name(SkColorType); | 26 const char* colortype_name(SkColorType); |
| 27 SkColor color_to_565(SkColor color); | 27 SkColor color_to_565(SkColor color); |
| 28 SkTypeface* emoji_typeface(); | 28 void emoji_typeface(SkAutoTUnref<SkTypeface>* ); |
| 29 const char* emoji_sample_text(); | 29 const char* emoji_sample_text(); |
| 30 const char* platform_os_emoji(); | 30 const char* platform_os_emoji(); |
| 31 const char* platform_os_name(); | 31 const char* platform_os_name(); |
| 32 const char* platform_extra_config(const char* config); | 32 const char* platform_extra_config(const char* config); |
| 33 | 33 |
| 34 /** | 34 /** |
| 35 * Sets the paint to use a platform-independent text renderer if FLAGS_porta
bleFonts is set. | 35 * Sets the paint to use a platform-independent text renderer if FLAGS_porta
bleFonts is set. |
| 36 * FIXME: will become obsolete as GMs migrate to set portable typeface alway
s. | 36 * FIXME: will become obsolete as GMs migrate to set portable typeface alway
s. |
| 37 */ | 37 */ |
| 38 void set_portable_typeface(SkPaint* paint, const char* name = NULL, | 38 void set_portable_typeface(SkPaint* paint, const char* name = NULL, |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 } | 82 } |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 // A helper for inserting a drawtext call into a SkTextBlobBuilder | 85 // A helper for inserting a drawtext call into a SkTextBlobBuilder |
| 86 void add_to_text_blob(SkTextBlobBuilder* builder, const char* text, const Sk
Paint& origPaint, | 86 void add_to_text_blob(SkTextBlobBuilder* builder, const char* text, const Sk
Paint& origPaint, |
| 87 SkScalar x, SkScalar y); | 87 SkScalar x, SkScalar y); |
| 88 | 88 |
| 89 } // namespace sk_tool_utils | 89 } // namespace sk_tool_utils |
| 90 | 90 |
| 91 #endif // sk_tool_utils_DEFINED | 91 #endif // sk_tool_utils_DEFINED |
| OLD | NEW |