OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef SkPDFUtils_DEFINED | 10 #ifndef SkPDFUtils_DEFINED |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 SkWStream* content) { | 51 SkWStream* content) { |
52 SkPDFUtils::EmitPath(path, paintStyle, true, content); | 52 SkPDFUtils::EmitPath(path, paintStyle, true, content); |
53 } | 53 } |
54 static void ClosePath(SkWStream* content); | 54 static void ClosePath(SkWStream* content); |
55 static void PaintPath(SkPaint::Style style, SkPath::FillType fill, | 55 static void PaintPath(SkPaint::Style style, SkPath::FillType fill, |
56 SkWStream* content); | 56 SkWStream* content); |
57 static void StrokePath(SkWStream* content); | 57 static void StrokePath(SkWStream* content); |
58 static void DrawFormXObject(int objectIndex, SkWStream* content); | 58 static void DrawFormXObject(int objectIndex, SkWStream* content); |
59 static void ApplyGraphicState(int objectIndex, SkWStream* content); | 59 static void ApplyGraphicState(int objectIndex, SkWStream* content); |
60 static void ApplyPattern(int objectIndex, SkWStream* content); | 60 static void ApplyPattern(int objectIndex, SkWStream* content); |
| 61 |
| 62 // 3 = '-', '.', and '\0' characters. |
| 63 // 9 = number of significant digits |
| 64 // abs(FLT_MIN_10_EXP) = number of zeros in FLT_MIN |
| 65 static const size_t kMaximumFloatDecimalLength = 3 + 9 - FLT_MIN_10_EXP; |
| 66 // FloatToDecimal is exposed for unit tests. |
| 67 static size_t FloatToDecimal(float value, |
| 68 char output[kMaximumFloatDecimalLength]); |
61 static void AppendScalar(SkScalar value, SkWStream* stream); | 69 static void AppendScalar(SkScalar value, SkWStream* stream); |
62 static SkString FormatString(const char* input, size_t len); | 70 static SkString FormatString(const char* input, size_t len); |
63 }; | 71 }; |
64 | 72 |
65 #endif | 73 #endif |
OLD | NEW |