OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 | 8 |
9 #ifndef SkPDFUtils_DEFINED | 9 #ifndef SkPDFUtils_DEFINED |
10 #define SkPDFUtils_DEFINED | 10 #define SkPDFUtils_DEFINED |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 static void ApplyPattern(int objectIndex, SkWStream* content); | 59 static void ApplyPattern(int objectIndex, SkWStream* content); |
60 | 60 |
61 // 3 = '-', '.', and '\0' characters. | 61 // 3 = '-', '.', and '\0' characters. |
62 // 9 = number of significant digits | 62 // 9 = number of significant digits |
63 // abs(FLT_MIN_10_EXP) = number of zeros in FLT_MIN | 63 // abs(FLT_MIN_10_EXP) = number of zeros in FLT_MIN |
64 static const size_t kMaximumFloatDecimalLength = 3 + 9 - FLT_MIN_10_EXP; | 64 static const size_t kMaximumFloatDecimalLength = 3 + 9 - FLT_MIN_10_EXP; |
65 // FloatToDecimal is exposed for unit tests. | 65 // FloatToDecimal is exposed for unit tests. |
66 static size_t FloatToDecimal(float value, | 66 static size_t FloatToDecimal(float value, |
67 char output[kMaximumFloatDecimalLength]); | 67 char output[kMaximumFloatDecimalLength]); |
68 static void AppendScalar(SkScalar value, SkWStream* stream); | 68 static void AppendScalar(SkScalar value, SkWStream* stream); |
69 static SkString FormatString(const char* input, size_t len); | 69 static void WriteString(SkWStream* wStream, const char* input, size_t len); |
70 }; | 70 }; |
71 | 71 |
72 #endif | 72 #endif |
OLD | NEW |